Nopcommerce Mall System--source code structure and architecture

Source: Internet
Author: User
Tags nopcommerce

This document is a guide for developers to understand the structure of the Nopcommerce solution. This is a document about the new Nopcommerce Developer learning the Nopcommerce code. First, the Nopcommerce source code is very easy to get. It is an open source application, so all you have to do is simply download it from the code host. The items and folders will be fully listed after you open VS, and we recommend that you also open your vs to browse projects and files while looking at this document.

Most projects, directories, and files can be given a rough idea of the designer by name . For example, in this Nop.Plugin.Payments.PayPalStandard project, you can guess what it is just by looking at the name.

\libraries\nop.core

The Nop.core project contains a series of core classes of nopcommerce such as caches, events, auxiliary classes, and business objects (such as orders and customer entity classes)

\libraries\nop.data

The Nop.data project contains a series of classes and functions to read and write to a database or other data storage medium. the Nop.data library helps separate the logic of data access from the business object (separation of concerns). Nopcommerce uses the Entity Framework (EF) Code-first method. Code-first allows developers to define entities in source code (all core entities are defined in the Nop.core project), and then use EF to generate C # class-based databases. This is why it is called Code-first. You can then use LINQ to query the object because it quietly translates the code into an SQL statement and executes it in the database. Nopcommerce uses a fluent API to fully customize the persistence mappings. If you want to know more code-first please visit here or here.

\libraries\nop.services

This project contains a set of core services, business logic, validation, and data-related calculations, if needed. Often called the Business Access Layer (BAL).

Projects into \plugins\ solution folder

Plugins is the solution folder for VS, it is in the root directory of your solution on the hard drive. Because the entry path for the project at compile time is ". \.. \presentation \nop.web\plugins\{group}. {name}\, so the DLL for the plugin is automatically placed in the \presentation\nop.web\plugins\ folder to place the deployed plug-in. This also allows the plugin to include static files such as CSS or JS, without having to copy the files between projects.

\presentation\nop.admin

Nop.admin is an MVC Web application project. If you have not yet used ASP. NET MVC, please read more about it here. You may have guessed that this is the management background in the presentation layer, and you can find it in the \presentation\nop.web\administration folder and the project cannot run.

\presentation\nop.web

Nop.web is also an MVC Web application project, the presentation layer of the front shop, which is the project you really want to run, and it's the starting item for the entire application.

\presentation\nop.web.framework

Nop.Web.Framework is a public class library project that represents a layer, including some common display features that can be used in the background and foreground.

\test\nop.core.tests

Nop.Core.Tests is a test project for the Nop.core project.

\test\nop.data.tests

Nop.Data.Tests is a test project for the Nop.data project.

\test\nop.services.tests

Nop.Services.Tests is a test project for the Nop.services project.

\test\nop.tests

Nop.tests is a class library that contains common classes and helper methods to be used in other test projects. It does not have any test cases.

\test\nop.web.mvc.tests

Nop.Web.MVC.Tests is a test project that represents a layer .

Nopcommerce Mall System--source code structure and architecture

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.