Vipul
Vipul

Reputation: 107

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

Upvotes: 0

Views: 1789

Answers (3)

Anas Karkoukli
Anas Karkoukli

Reputation: 1342

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.

Upvotes: 1

Darin Dimitrov
Darin Dimitrov

Reputation: 1038780

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

Upvotes: 1

jgauffin
jgauffin

Reputation: 101150

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

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

Upvotes: 1

Related Questions