Categories

Architecture of GrandNode

This document is a guide for developers to the solution structure of GrandNode. It is a document for a new GrandNode developer to start learning about the GrandNode code base. First of all, GrandNode source code is quite easy to get. 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. We recommend that you open the GrandNode solution in Visual Studio and browse through the projects and files as you read this document.

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 Grand.Plugin.Payments.PayPalStandard to guess what it does.

\Libraries\Grand.Core

The Grand.Core project contains a set of core classes for GrandNode, such as caching, events, helpers, and business objects (for example, Order and Customer entities).

\Libraries\Grand.Data

The Grand.Data project contains several classes for CRUD database operations. The most important is MongoDBRepository, which plays a role as repository layer between database and application Services. GrandNode uses the Mongo DataBase (all application core entities (domain models) are defined in Grand.Core\Domain). MongoDB is more simple and require less code than SQL counterpart.

\Libraries\Grand.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).

Projects into \Plugins\ solution folder

\Plugins is a Visual Studio solution folder that contains plugin projects. Physically it's located in the root of your solution. But plugins DLLs are automatically copied in \Presentation\Grand.Web\Plugins\ directory which is used for already deployed plugins because the build output paths of all plugins are set to "..\..\Presentation\Grand.Web\Plugins\{Group}.{Name}\". 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.

output

\Presentation\Grand.Admin

Grand.Admin is an MVC web application project. If you haven't used ASP.NET MVC before, please find more info here. As you may guess it is a presentation layer for admin area. Physically this project is located under \Presentation\Grand.Web\Administration directory. This project cannot be run.

\Presentation\Grand.Web

Grand.Web is also an MVC web application project, a presentation layer for public store. This is the application that you actually run. It is the startup project of the application.

build view

\Presentation\Grand.Web.Framework

Grand.Web.Framework is a class library project containing some common presentation things for both Grand.Admin and Grand.Web projects.

\Test\Grand.Core.Tests

Grand.Core.Tests is the test project for the Grand.Core project.

\Test\Grand.Services.Tests

Grand.Services.Tests is the test project for the Grand.Services project.

back to top