ExtJS4.1 + MVC3 + Spring. NET1.3 + EF5 integration 1: Build a project framework

Source: Internet
Author: User

). This article is based on the official Spring. NET 1.3.2 version, but this version does not support ASP. NET MVC4. Currently, only 2.0 is supported. Therefore, change the project from MVC4 to MVC3. Please understand. In fact, I want to use the MVC4 WEB API. This article has time to write a separate article. It is just that the communication between ExtJS and MVC is not the same, and the others are basically the same. (2). I originally intended to explain the main functions, but I also need to use this project, so I added several more functions. 1. Project Development Environment: Wn7 + VS2012 technical framework: ExtJS4.1 + ASP. NET MVC3 + Spring. NET1.3.2 + Entity Framework5.0 Database: SQLite is used for testing and sharing convenience. This article uses SQLite lightweight database. If necessary, it can be transplanted to other relational databases at any time. 2. Project function introduction I am going to explain step by step the main functions of developing a website for small and medium-sized enterprises, from data persistence, business logic processing, to user presentation, and solve the problems encountered in each link. Projects are divided into two modules: foreground (common users) and background (administrator management). in ASP. net mvc, multiple modules are created by creating an Area. This article mainly demonstrates the development background. If I have time, I will improve the functions of the front-end module. Main functions: 1) The website mainly publishes articles (News, news, and messages), allowing users to comment and reply to the Administrator; 2) allows users to upload videos and images when publishing articles, it can also automatically take pictures in the video and scale and compress the images. 3) Another function of the website is the talent recruitment function, which allows user registration and administrator query. 4) different administrators have different permissions for background management. 3 database structure 4 build a project structure first look at the overall structure of the project: this architecture is similar to the traditional three layers, EF5 is the persistent layer, Dao is the data access layer, and Service is the Service layer, web is the presentation layer. A brief description is as follows (which will be explained later): EF5: uses the first Entity Framework 5.0 Framework technology of Microsoft, where the Model Entity class is automatically generated; IDao: data access layer interface, which can only be referenced by the service layer; Dao: Implemented by the data access layer interface, using Spring. NET injection to the Service layer; IService: Service layer interface, only allows reference from the presentation layer; Service: Service layer interface implementation, believe with Dao layer, use Spring. NET injection to the Web layer; DTO: Data Transmission object, used when views and actions transmit data to each other, and is responsible for the transfer between DTO and Model. Utility: the basic class of the entire project. It encapsulates some common classes and is referenced when used in other projects. Web: presentation layer. Here is the ASP. NET MVC3 project. After the solution and the eight projects are created, add references between projects: 1) The IDao references EF5 (using the entity class); 2) dao references EF5 (using the entity class) and IDao (implementing the data access layer interface); 3) IService references EF5 (using the entity class) and IDao; 4) service references EF5 (using the entity class), IDao, and IService (implementing the Service layer interface); 5) DTO references EF5 (using the entity class in it); 6) the Web layer references all other layers (in theory, you only need to reference IService and DTO. All references are just to facilitate the introduction of DLL in each project ). 7) references to other tools (such as log4net and spring.net ).

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.