该文件是指导发展的解决方案结构nopCommerce。 It is a document for a new nopCommerce developer to start learning about the nopCommerce code base.这是一个文件一个新的nopCommerce开发者学习有关nopCommerce代码基础开始。 First of all, nopCommerce source code is quite easy to get.首先,,nopCommerce源代码是很容易的得到。 It's an open source application, so all you have to do to get the code is simply download it from the web site.这是一个开源应用程序,因此,所有你必须做的得到的代码是简单地从网站下载。 The projects and folders are listed in the order they appear in Visual Studio.项目和文件夹中列出的顺序出现在Visual Studio。 We recommend that you open the nopCommerce solution in Visual Studio and browse through the projects and files as you read this document.我们建议您打开nopCommerce解决方案在Visual Studio中的项目和文件浏览,当你阅读此文件。
该文件是指导发展的解决方案结构nopCommerce。 It is a document for a new nopCommerce developer to start learning about the nopCommerce code base.这是一个文件一个新的nopCommerce开发者学习有关nopCommerce代码基础开始。 First of all, nopCommerce source code is quite easy to get.首先,,nopCommerce源代码是很容易的得到。 It's an open source application, so all you have to do to get the code is simply download it from the web site.这是一个开源应用程序,因此,所有你必须做的得到的代码是简单地从网站下载。 The projects and folders are listed in the order they appear in Visual Studio.项目和文件夹中列出的顺序出现在Visual Studio。 We recommend that you open the nopCommerce solution in Visual Studio and browse through the projects and files as you read this document.我们建议您打开nopCommerce解决方案在Visual Studio中的项目和文件浏览,当你阅读此文件。
Most of the projects, directories, and files are named so that you can get a rough idea of their purpose.大多数的项目,目录和文件的命名,这样就可以得到一个粗略的想法,他们的目的。 For example, I don't even have to look inside the project called Nop.Plugin.Payments.PayPalStandard to guess what it does.例如,我什至不看里面的项目称为Nop.Plugin.Payments.PayPalStandard猜测它做什么。
\Libraries\Nop.Core \库\ Nop.Core
The Nop.Core project contains a set of core classes for nopCommerce, such as caching, events, helpers, and business objects (for example, Order and Customer entities). Nop.Core项目包含了一组核心类nopCommerce,如缓存,事件,助理,业务对象(例如,订单及客户实体)。
\Libraries\Nop.Data \库\ Nop.Data
The Nop.Data project contains a set of classes and functions for reading from and writing to a database or other data store. Nop.Data项目包含了一组类和函数读取和写入到数据库或其他数据存储。 It helps separate data-access logic from your business objects.它可以帮助你的业务对象单独的数据访问逻辑。 nopCommerce uses the Entity Framework (EF) Code-First approach. nopCommerce使用实体框架(EF)代码优先方法。 It allows you to define entities in the source code (all core entities are defined into Nop.Core project), and then get EF to generate the database from that.它允许你在源代码中定义实体(所有核心实体定义成Nop.Core项目),然后EF生成的数据库,。 That's why it's called Code-First.这就是为什么它被称为代码优先。 You can then query your objects using LINQ, which gets translated to SQL behind the scenes and executed against the database.然后,您可以使用LINQ,它被转换为SQL幕后,对数据库执行查询对象。 nopCommerces use a fluent code API to fully customize the persistence mapping. nopCommerces使用能说一口流利的代码API来完全自定义的持久化映射。 You can find more about Code-First here or here .代码首先在这里或在这里你可以找到更多。
\Libraries\Nop.Services \库\ Nop.Services
This project contains a set of core services, business logic, validations or calculations related with the data, if needed.这个项目包含了一套核心服务,业务逻辑,验证或计算相关的数据,如果需要的话。 Some people call it Business Access Layer (BAL).有人把它称之为业务接入层(BAL)。
Projects into \Plugins\ solution folder \插件\解决方案文件夹中的项目导入
\Plugins is a Visual Studio solution folder that contains plugin projects. \插件是一个Visual Studio解决方案文件夹中包含插件项目。 Physically it's located in the root of your solution.实际上,位于根您的解决方案。 But plugins DLLs are automatically copied in \Presentation\Nop.Web\Plugins\ directory which is used for already deployed plugins because the build output paths of all plugins are set to "..\..\Presentation\Nop.Web\Plugins\{Group}.{Name}\".但是,插件的DLL文件会被自动复制到\演示\ Nop.Web \插件\目录下,用于已经部署的插件,因为所有的插件生成输出路径设置为“.. \ .. \演示\ Nop.Web \插件\ {集团},{名称} \“。 This allows plugins to contain some external files, such as static content (CSS or JS files) without having to copy files between projects to be able to run the project.这允许插件包含了一些外部文件,如静态内容(CSS或JS文件),而无需到项目之间的文件复制到能够运行该项目。
\Presentation\Nop.Admin \演示\ Nop.Admin中
Nop.Admin is an MVC web application project. Nop.Admin是一个MVC Web应用程序项目。 If you haven't used ASP.NET MVC before, please find more info here .如果你还没有使用ASP.NET MVC前,请您在这里找到更多的信息。 As you may guess it is a presentation layer for admin area.正如你可能猜到的,它是一个表示层管理区。 Physically this project is located under \Presentation\Nop.Web\Administration directory.该项目位于物理\演示\ Nop.Web \管理目录下。 This project cannot be run.这个项目不能运行。
\Presentation\Nop.Web \演示\ Nop.Web中
Nop.Web is also an MVC web application project, a presentation layer for public store. Nop.Web也是一个MVC Web应用程序项目,表示层的公用存储。 This is the application that you actually run.这是实际运行的应用程序。 It is the startup project of the application.它是应用程序的启动项目。
\Presentation\Nop.Web.Framework \演示\ Nop.Web.Framework
Nop.Web.Framework is a class library project containing some common presentation things for both Nop.Admin and Nop.Web projects. Nop.Web.Framework是一个类库项目,其中包含一些常见的表现的东西都Nop.Admin和Nop.Web项目。
\Test\Nop.Core.Tests \测试\ Nop.Core.Tests的
Nop.Core.Tests is the test project for the Nop.Core project. Nop.Core.Tests是的测试项目的Nop.Core项目。
\Test\Nop.Data.Tests \测试\ Nop.Data.Tests的
Nop.Data.Tests is the test project for the Nop.Data project. Nop.Data.Tests是的测试项目的Nop.Data项目。
\Test\Nop.Services.Tests \测试\ Nop.Services.Tests的
Nop.Services.Tests is the test project for the Nop.Services project. Nop.Services.Tests是的测试项目的Nop.Services项目。
\Test\Nop.Tests \测试\ Nop.Tests的
Nop.Tests is a class library project containing some common test classes and helpers for other test projects. Nop.Tests是一个类库项目,其中包含一些常见的测试类和其他测试项目的帮手。 It does not have any test.它不具有任何测试。
\Test\Nop.Web.MVC.Tests \测试\ Nop.Web.MVC.Tests的
Nop.Web.MVC.Tests is the test project for the presentation layer projects. Nop.Web.MVC.Tests是表示层项目的测试项目。
Most of the projects, directories, and files are named so that you can get a rough idea of their purpose.大多数的项目,目录和文件的命名,这样就可以得到一个粗略的想法,他们的目的。 For example, I don't even have to look inside the project called Nop.Plugin.Payments.PayPalStandard to guess what it does.例如,我什至不看里面的项目称为Nop.Plugin.Payments.PayPalStandard猜测它做什么。
\Libraries\Nop.Core \库\ Nop.Core
The Nop.Core project contains a set of core classes for nopCommerce, such as caching, events, helpers, and business objects (for example, Order and Customer entities). Nop.Core项目包含了一组核心类nopCommerce,如缓存,事件,助理,业务对象(例如,订单及客户实体)。
\Libraries\Nop.Data \库\ Nop.Data
The Nop.Data project contains a set of classes and functions for reading from and writing to a database or other data store. Nop.Data项目包含了一组类和函数读取和写入到数据库或其他数据存储。 It helps separate data-access logic from your business objects.它可以帮助你的业务对象单独的数据访问逻辑。 nopCommerce uses the Entity Framework (EF) Code-First approach. nopCommerce使用实体框架(EF)代码优先方法。 It allows you to define entities in the source code (all core entities are defined into Nop.Core project), and then get EF to generate the database from that.它允许你在源代码中定义实体(所有核心实体定义成Nop.Core项目),然后EF生成的数据库,。 That's why it's called Code-First.这就是为什么它被称为代码优先。 You can then query your objects using LINQ, which gets translated to SQL behind the scenes and executed against the database.然后,您可以使用LINQ,它被转换为SQL幕后,对数据库执行查询对象。 nopCommerces use a fluent code API to fully customize the persistence mapping. nopCommerces使用能说一口流利的代码API来完全自定义的持久化映射。 You can find more about Code-First here or here .代码首先在这里或在这里你可以找到更多。
\Libraries\Nop.Services \库\ Nop.Services
This project contains a set of core services, business logic, validations or calculations related with the data, if needed.这个项目包含了一套核心服务,业务逻辑,验证或计算相关的数据,如果需要的话。 Some people call it Business Access Layer (BAL).有人把它称之为业务接入层(BAL)。
Projects into \Plugins\ solution folder \插件\解决方案文件夹中的项目导入
\Plugins is a Visual Studio solution folder that contains plugin projects. \插件是一个Visual Studio解决方案文件夹中包含插件项目。 Physically it's located in the root of your solution.实际上,位于根您的解决方案。 But plugins DLLs are automatically copied in \Presentation\Nop.Web\Plugins\ directory which is used for already deployed plugins because the build output paths of all plugins are set to "..\..\Presentation\Nop.Web\Plugins\{Group}.{Name}\".但是,插件的DLL文件会被自动复制到\演示\ Nop.Web \插件\目录下,用于已经部署的插件,因为所有的插件生成输出路径设置为“.. \ .. \演示\ Nop.Web \插件\ {集团},{名称} \“。 This allows plugins to contain some external files, such as static content (CSS or JS files) without having to copy files between projects to be able to run the project.这允许插件包含了一些外部文件,如静态内容(CSS或JS文件),而无需到项目之间的文件复制到能够运行该项目。
\Presentation\Nop.Admin \演示\ Nop.Admin中
Nop.Admin is an MVC web application project. Nop.Admin是一个MVC Web应用程序项目。 If you haven't used ASP.NET MVC before, please find more info here .如果你还没有使用ASP.NET MVC前,请您在这里找到更多的信息。 As you may guess it is a presentation layer for admin area.正如你可能猜到的,它是一个表示层管理区。 Physically this project is located under \Presentation\Nop.Web\Administration directory.该项目位于物理\演示\ Nop.Web \管理目录下。 This project cannot be run.这个项目不能运行。
\Presentation\Nop.Web \演示\ Nop.Web中
Nop.Web is also an MVC web application project, a presentation layer for public store. Nop.Web也是一个MVC Web应用程序项目,表示层的公用存储。 This is the application that you actually run.这是实际运行的应用程序。 It is the startup project of the application.它是应用程序的启动项目。
\Presentation\Nop.Web.Framework \演示\ Nop.Web.Framework
Nop.Web.Framework is a class library project containing some common presentation things for both Nop.Admin and Nop.Web projects. Nop.Web.Framework是一个类库项目,其中包含一些常见的表现的东西都Nop.Admin和Nop.Web项目。
\Test\Nop.Core.Tests \测试\ Nop.Core.Tests的
Nop.Core.Tests is the test project for the Nop.Core project. Nop.Core.Tests是的测试项目的Nop.Core项目。
\Test\Nop.Data.Tests \测试\ Nop.Data.Tests的
Nop.Data.Tests is the test project for the Nop.Data project. Nop.Data.Tests是的测试项目的Nop.Data项目。
\Test\Nop.Services.Tests \测试\ Nop.Services.Tests的
Nop.Services.Tests is the test project for the Nop.Services project. Nop.Services.Tests是的测试项目的Nop.Services项目。
\Test\Nop.Tests \测试\ Nop.Tests的
Nop.Tests is a class library project containing some common test classes and helpers for other test projects. Nop.Tests是一个类库项目,其中包含一些常见的测试类和其他测试项目的帮手。 It does not have any test.它不具有任何测试。
\Test\Nop.Web.MVC.Tests \测试\ Nop.Web.MVC.Tests的
Nop.Web.MVC.Tests is the test project for the presentation layer projects. Nop.Web.MVC.Tests是表示层项目的测试项目。