Clean Kentico12 MVC
An example of Clean/Onion Architecture with Kentico 12 MVC
📦/ ┣ 📂docs ┣ 📂src ┃ ┣ 📂delivery ┃ ┃ ┣ 📜Sandbox.Delivery.Core (Core abstractions / POCOs) ┃ ┃ ┣ 📜Sandbox.Delivery.Data (Kentico data access) ┃ ┃ ┗ 📜Sandbox.Delivery.Web (MVC / Web API) ┃ ┣ 📂management ┃ ┃ ┣ 📜Sandbox.Management.Core (Coe abstractions / POCOs) ┃ ┃ ┣ 📜Sandbox.Management.Data (Kentico data access) ┃ ┃ ┗ 📜Sandbox.Management.Web (CMS not included) ┃ ┣ 📂shared ┃ ┃ ┣ 📜Sandbox.Core.Domain (Shared abstractions / POCOs) ┃ ┃ ┗ 📜Sandbox.Data.Kentico (Shared Kentico data access) ┣ 📂tests ┃ ┗ 📂... ┗ 📜Sandbox.sln
Provide a source for architectural guidance and discussion for the Kentico Xperience community when building Kentico MVC applications.
Note: This is not a seed project. The repository can be cloned and added to a CMS application, but the primary goal here is a sandbox for patterns and architecture.
Feel free to copy and paste the code here into your projects (with attribution).
High Level Patterns
- Vertical Slices / Feature Focused
- Thin Controllers
- Request -> Handler -> ViewModel
- CQRS - Query -> Dispatcher -> Handler -> Response
- Dependency Injection
- Cross-Cutting Concerns via Decoration
- Centralized and type-safe Kentico / Output Caching
- Context Abstractions
- Guard Clauses
- Onion Architecture
How to Use this Repository
Clone this repository locally and open
Sandbox.sln in Visual Studio.
Then, explore the code base by following code lens references, and using the documentation and diagrams for explanations.
Optional: Connect the repository to a Kentico Xperience CMS (
Sandbox.Management.Web) application and database and use debugging and code changes to see how requests / responses flow through the architecture.