Reputation: 869
I am working in my Application Architecture and i am wondering if i should use WCF or not. The UI will be a public website written in ASP.NET MVC 3 but in the future possible Iphone/Android applications... So now i have a data layer (Entity framework + repository), business layer (Class library) and UI (ASP.NET MVC) communicating via ViewModel.
I understand that in a good SOA application the business layer should be exposed as a webservice but i am wondering about performance issues, beacause my website traffic will be high and hosting the WCF and the website in IIS in the same machine is a waste of time and of performance since to communicate they have to serialize/deserialize objects.
Is keeping my business layer in a dll (class library) and deploy it in the ASP.NET application better then hoting it in a wcf service ?
Thanks for help.
Upvotes: 1
Views: 431
Reputation: 5880
I think that leaving things as just a dll for right now would be the simplest solution until you firm up your requirements for iphone/android solutions. We use WCF extensively where I work, and it can be very fast.
That said, creating a WCF service on the chance you might need it later seems premature and its always easy to add a web reference later and remove the dll. You can't get the hours spent on a WCF service back (and the risk of needlessly adding another layer between your app and its data) as easily.
Upvotes: 1