For a client with multiple platforms, I DO NOT NEED WCF or can I get it with MVC 3?

I have a web application in MVC 3 (3-tiered with a data access layer) that I would like to extend to native iPhones and Androids, etc. as presentation devices.

Is it possible to use the same controllers with some modifications, or is it better to organize the logic for accessing the WCF service?

What do you recommend in terms of good scalability and performance?

+3


source to share


2 answers


For scalability, it would be better to have your business logic in a service that just calls your UI (MVC site, iPhone app, Android app). I personally suggest using ServiceStack over WCF as it simplifies your calls to POCO objects. This will help improve scalability as well as maintenance as it will make your problems much easier (I suggest you read the SOLID principles ). If you need to make changes to your user interface, these changes will not affect your business logic (which could change your iPhone application)



+1


source


It all depends. You can certainly take the route Justin recommends. There is a lot of work to do.

MVC4 has a WebAPI that provides you with RESTful services from an MVC controller-like environment. This allows you to add a service layer to your MVC application with minimal effort.



For any large scale, you should probably go with a full WCF implementation.

FYI, MVC4 is in beta but there is go-live license and you can install WebAPI without installing MVC4, it is available via nuget.

+1


source







All Articles