简体   繁体   中英

Architecture Clarification for 3-tier web application

We are planning to use EXTJS framework for presentation layer which would be calling WCF based Rest Service or WebAPI Service(Http services) . My requirement is to have 3 tier architecture (physical separation) so my understanding is that we need to put Service layer on another server and host services on IIS there to be consumed by presentation layer hosted on different IIS server. I am getting few doubts regarding this architecture.

  1. Should we use Webform approach to host EXTS libraries as in this case ASP.Net MVC would be irrelevant considering that all the rendering logic is done by EXTJS.

  2. If we host services on another server which service authentication should be used .In this case I think we can't use Form Authentication as the web and service are hosted separately.

  3. Is it really required to host Service layer on another server to make it three tier ,considering the third tier is the Database server. Isn't browser a tier considering EXTJS library directly renders on the browser.

Since no body answered i will try to answer myself based on my research and response i got from another forum.

  1. We can use MVC approach as well, the Controller method can be used to return JSON result for the EXTJS API to consume. But the downside is with this approach we cannot use strongly typed model in views along with other features like use of Html helper and automatic validation based on the models. With this approach we can still use MVC routing or can go entirely with a Single View and ExtJs Routing.

  2. Place the services your Ext.js needs on the web tier, where your Webforms/MVC application also runs. Separate your business logic/data logic via other services on another server if needed (second tier). Don't call these directly from your Ext.js. Keep presentation in the first/Web tier.We can use Form Authentication to call service in web-tier and Windows authentication to call the service from Webtier to second tier.

  3. From the server side perspective a browser's not really considered a tier.However with modern approaches it's debatable.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM