Nopcommerce Source code Architecture--Initial knowledge of high-performance open-source mall system CMS

Source: Internet
Author: User
Tags nopcommerce

Many people say that by reading and learning the high-quality code of the gods is one of the quickest ways to improve your skills. I think by reading Nopcommerce source code, can learn a lot of enterprise systems, software development norms and some new technology, skills, can quickly improve our technical capabilities. So I recently decided to write a "Nopcommerce source architecture detailed" series, to detailed analysis of Nopcommerce architecture and principles.

Nopcommerce main use of the technology and characteristics:

1. Entity Framework

2. asp. NET MVC

3. IOC container + Dependency Injection (AUTOFAC)

4. Using entitytypeconfiguration+repository mode in EF + domain-driven development

5. Plug-in technology

6. Themes Theme Technology

7. Ajax

8. Validator Verification Technology

9. Interface-Oriented programming

10, event notification, log mechanism

11. Cache (System.Runtime.Caching.MemoryCache)

12. Site Planning Tasks

13. Message Queuing

14. Multi-lingual support

15. Jquery Ui+kendo UI

16, multi-store support, promotion, online payment

17. SEO Friendly Support

18. Other ASP. NET MVC and C # latest Core Technologies

Nopcommerce is a foreign high-quality open-source website system, the latest version is based on the entity Framework6.0 and MVC5.0, using the Razor template engine, has a strong plug-in mechanism, including payment distribution functions are implemented through plug-ins, based on the multi-language version of XML, very flexible language switching functions, including in the background can also edit the product's English and Chinese properties, very suitable for foreign trade, excellent Advanced program architecture , the performance is also very strong, custom product name and classification has a good SEO optimization. The overall capacity is much higher than some of the domestic programs that are poorly structured. NET marketplace, is the first choice for two development and large-to-consumer architectures. 3.0 started to support multi-store.

Foreground page Effect:

Background Management page:

Nopcommerce the latest version of the source code in CodePlex download.

Nopcommerce mainly from the top down Nop.web, Nop.admin, Nop.Web.Framework, Nop plug-ins, nop.services,
Nop.core, Nop.data. Reference to the third-party module ENTITYFRAMEWORK,AUTOFAC (control inversion, that is, dependency injection), TELERIK.EXTERN.MVC (background management with the interface, after 2.0 to start using).

is a Nopcommerce version 3.4 of the source structure:

1, Libraries

The project under the Libaries folder is mostly public library code.

Nop.core: Encapsulates the underlying core class, interface, to be used by the project. such as domain object classes, cache classes, interfaces, extension methods, and so on.

Nop.Data:EF related to data access related to class encapsulation and extension. The key is that MAPPING,NOP uses the code API to create a mapping between the model and the database table, named "Table name +map". Like what:

  1. Using System. Data. Entity. Modelconfiguration;
  2. Using Nop. Core. Domain. Blogs;
  3. Namespace Nop. Data. Mapping. Blogs
  4. {
  5. public partial class blogcommentmap : entitytypeconfiguration <blogcomment>
  6. {
  7. public blogcommentmap()
  8. {
  9. this. ToTable("blogcomment");
  10. this. Haskey(pr = PR. Id);
  11. this. hasrequired(bc = BC. Blogpost)
  12. . Withmany(bp = BP) . Blogcomments)
  13. . hasforeignkey(bc = BC. Blogpostid);
  14. this. Hasrequired(cc = cc. Customer)
  15. . withmany()
  16. . Hasforeignkey(cc = cc. CustomerId);
  17. }
  18. }
  19. }

In the future I will explain in detail how this mapping achieves the benefits of doing so at the level.

Nop.services: The real business layer of data processing is through interface-oriented programming to reduce reliance on specific implementations.

2, Plugins

Plugins folder is placed under the plug-in project, you can also follow the rules to develop their own plug-ins.

3, Presentation

Presentation Chinese meaning is the meaning of presentation and expression. That is, the project under this folder is the presentation layer of the solution.

Nop.admin: Background Management

Nop.web: Foreground Web Project

Nop.Web.Framework:Web and MVC-related extensions and public class encapsulation, such as: basecontroller,seo correlation, topic THEMES,AUTOFAC Dependency Injection Dependencyregistrart and so on.

4, Tests

Tests below are the unit tests for the corresponding project.

Nopcommerce Source code Architecture--Initial knowledge of high-performance open-source mall system CMS

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.