Skip to content

seangwright/clean-kentico12-mvc

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 

Clean Kentico12 MVC

An example of Clean/Onion Architecture with Kentico 12 MVC

Repository Structure

📦/
 ┣ 📂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

Solution Project References

Goals

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
  • Result<T> and Option<T> (no null)
  • Dependency Injection
  • Cross-Cutting Concerns via Decoration
  • NodeAliasPath routing
  • 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.

External Resources

About

An example of Clean/Onion Architecture with Kentico 12 MVC

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages