Spring.net+nhibenate+asp.net MVC +extjs Series 2----Overall architecture

Source: Internet
Author: User

Start with a simple Directcenter project to introduce this framework, directcenter mainly divided into user management, department management, the company manages three modules. First build the solution Directcenter:

Directcenter:

Directcenter.model (Class Library project) entity class Library, which includes the Hibernate mapping file (you can put the mapping file to the DAL layer, so that Model is also simpler, and the DAL is only the complete implementation of NHibernate)

Directcenter.idal (class Library project) data Access layer interface

Directcenter.dal (class Library project) database access layer implementation (with NHibernate)

DIRECTCENTER.IBLL (class Library project) business Layer Interface

DIRECTCENTER.BLL (class Library project) business layer implementation (using Idal, injecting the actual data access layer through the spring.net IOC)

Directcenter.app (Class Library project) system configuration, including some nhibernate,spring.net configuration information, the business layer of the DAL injection.

Directcenter.unittest (class Library project) uses NUnit to unit test the business layer

Directcenter.dto (class Library project) Data transform object for entities that interact with the foreground UI layer. The reason for this is to consider not just the Web project, but also other UIs, including WebService. (There may be a lot of people will ask the model already, why do I need a dto?)

Directcenter.controllers (Class Library project) Web controller. The user requests and the backend business layer's relay, receives and analyzes the user request, invokes the business layer completes the request, then distributes to the user. (Note that this is called IBLL, the business logic interface, and is injected into specific business implementations through the Spring.net IOC).

Directcenter.web (Web application) Simple view layer, mainly by ExtJS complete interface and AJAX request.

Of course, you can add a Controllers unit test project here, but I think it's not very useful here. Because here controllers work is more unified and simple.

First design and build the database, fields and descriptions are as follows:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.