Reputation: 83
I was wondering if some one has implemented a 3 tier application using MVC and WCF as the middle tier? Were there any performance issues/drawbacks rather than implementing a typical middle tier using .dll's. I was envisioning a Middle tier of WCF which would access the DAL (linq to SQL), any advice/links are greatly appreciated!
Upvotes: 3
Views: 3924
Reputation: 221997
If you develop the web site which intensive use AJAX (per jQuery.ajax for example) you can implement it in the following way:
At such architecture of the application the ASP.NET MVC will be reduced to V (Views) using master pages. It can be generated different views depend on the user roles. The Model and the most Controller actions will be moved in the WCF. WFC methods could be tested with unit tests exactly so good as controller actions. If you will need some other data like dynamically generated pictures (Charts for example) or dynamically generated Excel or WinWord files you can return all the data from WFC methods exactly so easy like you can do this from the MVC controller actions.
At such design of your application I see no performance or other disadvantages. Both View of ASP.NET MVC and WFC have many caching possibilities which you can use on demand.
Upvotes: 0
Reputation: 364279
3 tier application with MVC and WCF generally means:
Where should you use this? Only when you really have to - you have strict requirement for that. This of course has huge performance impact because front-end uses remote call for every business operation. Remote call can be either between processes on the same machine but most often to the process on another server (in another network). It also requires better design of interactions to reduce number of calls to minimum as well as using asynchronous communication to invoke multiple calls in the same time if needed.
Upvotes: 6