ASP.NET System Structure
An example system might require:
- Presentation/administration (ASP.NET MVC site)
- Object model for data access, may be used by other apps (EntityFramework or similar)
- Data service used by both the website and client apps (WCF Data Service)
To make a system both maintanable and configurable, how would it be best to seperate the functions?
Are there any problems with:
- Web project (ASP.NET project for combined presentation/admin site)
- Custom view model which maps to the 'external' object model
- Class library (containing the object model/data access classes)
- Data service (WCF Data Service exposing object model and/or any custom functions)
As far as I can see, parting the components out wo开发者_StackOverflow中文版uld allow for easier management, be it updates, moving services, load balancing, etc.
Any thoughts/experiences for or against?
That setup looks pretty good to me. I usually embed my json/xml/rss/WCF feeds in the web presentation project, just because they're basically doing the same thing as the html output, except they're outputting to some other format for transfer over the wire. But I think separating out your WCF is a good call because when the data feeds are embedded in the web project, it makes me a little nervous to update it, knowing so much else depends on those feeds.
精彩评论