Architecture Suggestions/Recommendations for a Web Application with Sub-Apps [closed]

妖精的绣舞 提交于 2019-12-13 22:05:23

问题


I’m starting to plan an architecture for a big web application, and I wanted to get suggestions and/or recommendations on where to begin and which technologies and/or frameworks to use.

The application will be an Intranet-based web site using Windows authentication, running on IIS and using SQL Server and ASP.NET. It’ll need to be structured as a main/shell application with sub-applications that are “pluggable” based on some configuration settings.

The main or shell application is to provide the overall user interface structure – header/footer, dynamically built tabs for each available sub-app, and a content area in which the sub-application will be loaded when the user clicks on the sub-application’s tab. So, on start-up of the main/shell application, configuration information will be queried from a database, and, based on the user and which of the sub-apps are available, the main or shell app would dynamically build tabs (or buttons or something) as a way to access each individual application. On start-up, the content area will be populated with the “home” sub-app. But, clicking on an sub-app tab will cause the content area to be populated with the sub-app corresponding to the tab.

For example, we’re going to have a reports application, a display application, and probably a couple other distinct applications. On startup of the main/shell application, after determining who the user is, the main app will query the database to determine which sub-apps the user can use and build out the UI. Then the user can navigate between available sub-apps and do their work in each.

Finally, the entire app and all sub-apps need to be a layered design with presentation, service, business, and data access layers, as well as cross-cutting objects for things such as logging, exception handling, etc.

Anyway, my questions revolve around where to begin to plan something like this application.

What technologies/frameworks would work best in developing a solution for this application? MVC? MVP? WCSF? EF? NHibernate? Enterprise Library? Repository Pattern? Others???? I know all these technologies/frameworks are not used for the same purpose, but knowing which ones to focus on is a little overwhelming. Which ones would be the best choice(s) for a solution? Which ones work well together for an end-to-end design? How would one structure the VS project for something like this?

Thanks!


回答1:


I believe that ASP.Net MVC is the best basic framework for such projects. It is very flexible and customizable, so you could build your own high-level framework for your apps at the top of ASP.Net MVC.

Also I would like to recommend you to use MEF for pluggable sub-applications registration - it is absolutely the best framework for extensions in .Net.

Remember to use IoC/Dependency Injection containers to keep your solution components as much independent from each other as it possible. My favorites are Structure Map and Autofac, but it depends on project and architecture, so you need to read some reviews, there are lots of them in Internet.

I can't tell you what ORM framework would be a best for your solution. Moreover, I believe, that it should be located at Data Access Layer and do not affect other layers of your application. It is nice idea to use DTO (Data-Transfer-Object) at top layers to keep your Business logic/UI completely independent from DAL.

Also it is nice idea to implement some common services layer like authentication, logging etc. at main host application and make them common for each extension application. BTW, for logging I usually use log4net.



来源:https://stackoverflow.com/questions/4719196/architecture-suggestions-recommendations-for-a-web-application-with-sub-apps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!