开发者

Deploy 3 Tier MVC application

I have created a Web Application in MVC 3 with razor. My solution structure is as follows:

A) Web Tier开发者_运维知识库 - Comprises of MVC
B) Business Layer
C) Data Tier 

I am required to deploy the three layers separately on 3 servers, on IIS. Can anyone advise how to proceed ?

Thanks


Since you are concerned about where to deploy your edmx file, I will just elaborate on the business layer.

First I would reiterate the distinction between layer and tier. You mention a seperate physical server for your business logic, therefore my answer will assume a physically separate business tier. And will henceforth refer to as a tier.

The EDMX file, although coupled to your database schema, is a business tier artifact. IT will have to be on the same physical location (in your case) as your other business classes (entities, data access plumbing, etc...)

In your situation, your biggest hurdle is the B component. Deploying A and C (a web application and a database respectively) onto separate physical tiers is not particularly difficult.

You will definitely need to build a WCF service Facade on top of your business logic classes to expose their functionality to the MVC website that resides on a different server. There are ample articles out there elaborating on the Facade pattern, but this is a direct approach that involves minimal changes in your architecture.


B needs to be wrapped by a webservice which A calls.

C is the database server? Simply install it on a seperate server.


A) This goes into an ASP.NET MVC application on ServerA

B) This goes into a WCF service hosted on ServerB that your ASP.NET MVC application will consume

C) This is the SQL Server or whatever you are using and which will be requested by the web service and this goes on ServerC

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜