具有子应用程序的 Web 应用程序的架构建议/推荐
我开始为大型 Web 应用程序规划一个架构,我想获得关于从哪里开始以及使用哪些技术和/或框架的建议和/或推荐。
该应用程序将是一个基于 Intranet 的网站,使用 Windows 身份验证,在 IIS 上运行并使用 SQL Server 和 ASP.NET。它需要被构造为一个主/外壳应用程序,其中包含基于某些配置设置的“可插入”子应用程序。
主应用程序或外壳应用程序用于提供整体用户界面结构 - 页眉/页脚、为每个可用子应用程序动态构建的选项卡以及当用户单击子应用程序的内容时将加载子应用程序的内容区域。选项卡。因此,在启动主/外壳应用程序时,将从数据库中查询配置信息,并且根据用户和可用的子应用程序,主或外壳应用程序将动态构建选项卡(或按钮)或其他东西)作为访问每个单独应用程序的方式。启动时,内容区域将填充“主页”子应用程序。但是,单击子应用程序选项卡将导致内容区域填充与该选项卡对应的子应用程序。
例如,我们将有一个报告应用程序、一个显示应用程序,可能还有几个其他不同的应用程序。在主/外壳应用程序启动时,确定用户是谁后,主应用程序将查询数据库以确定用户可以使用哪些子应用程序并构建 UI。然后,用户可以在可用的子应用程序之间导航并在每个子应用程序中完成工作。
最后,整个应用程序和所有子应用程序都需要采用分层设计,包括表示层、服务层、业务层和数据访问层,以及用于日志记录、异常处理等的横切对象。
无论如何,我的问题围绕从哪里开始规划类似此应用程序的内容。
哪些技术/框架最适合为此应用程序开发解决方案? MVC?最有价值球员?世界科学基金会? EF?休眠?企业图书馆?存储库模式?其他的????我知道所有这些技术/框架的用途并不相同,但知道要关注哪些技术/框架有点让人不知所措。 哪些是解决方案的最佳选择?哪些可以很好地协同实现端到端设计? 对于这样的事情,我们将如何构建 VS 项目?
谢谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我相信 ASP.Net MVC 是此类项目的最佳基础框架。它非常灵活且可定制,因此您可以在 ASP.Net MVC 的顶部为您的应用程序构建自己的高级框架。
另外我想推荐您使用 MEF 进行可插入子应用程序注册 - 它绝对是最好的框架.Net 中的扩展。
请记住使用IoC/依赖注入容器来保持解决方案组件彼此独立尽可能。我最喜欢的是结构图和Autofac,但是这取决于项目和架构,所以你需要阅读一些评论,网上有很多。
我无法告诉您哪种 ORM 框架最适合您的解决方案。此外,我认为它应该位于数据访问层并且不会影响应用程序的其他层。在顶层使用DTO(数据传输对象)来保持您的业务是个好主意逻辑/UI 完全独立于 DAL。
另外,在主主机应用程序中实现一些通用服务层(例如身份验证、日志记录等)并使它们对每个扩展应用程序通用也是一个好主意。顺便说一句,对于日志记录,我通常使用 log4net。
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.