Solution architecture - sdcruzinsight/Kentico13CoreBaseline GitHub Wiki
Library Structure
The Admin and MVC Solution is split up into different class libraries, each with specific purposes. Here's our full structure including the Kentico Admin project:
- WebApp (CMS)
- ref: XperienceModels
- ref: Admin.Custom
- Admin.Custom
- WebApp (CMS) specific functionality, .net 4.8 (can reference /Lib folder dlls)
- XperienceModels
- Shared models between WebApp (CMS) and MVC
- Only contains the Xperience generated class files (page types, info classes, etc)
- MVC.Models (Interfaces / Generic Models)
- Models
- Interfaces of Repositories
- Interfaces of Services
- Does not reference Kentico.Xperience
- MVC.Libraries
- ref: XperienceModels
- ref: MVC.Models
- Implementation of MVC.Model Interfaces, converting Xperience models to MVC.Model models
- Also may contain other MVC related code
- **References Kentico.Xperience.AspNetCore.WebApp **
- MVC.SharedRCL
- ref: XperienceModels
- ref: MVC.Models
- Razor Class Library / Shared resources
- **References Kentico.Xperience.AspNetCore.WebApp **
- MVC.Libraries.Tests
- Unit Testing on Implementations
- Database Testing on Implementations
- MVC (Site)
- ref: MVC.Models
- ref: MVC.Libraries
- Components
- Features
General Processes
Your MVC site will leverage your Interfaces found in MVC.Models. These interfaces should return DTO (Data transfer objects, or models) that are also in MVC.Models. Your MVC logic should then create it's ViewModel (in MVC project) from those DTOs.
MVC.Libraries implements the interfaces, using Kentico Xperience APIs, and converting the Xperience classes into the MVC.Model DTOs.
Any new repository / service needed should be created in MVC.Model (forcing it to be Kentico Xperience Agnostic).