开发者

ASP.NET System Structure

An example system might require:

  1. Presentation/administration (ASP.NET MVC site)
  2. Object model for data access, may be used by other apps (EntityFramework or similar)
  3. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜