If you could add something to Kentico, what would it be and why?

Official support for "Feature Folders" pattern in Kentico 12 Mvc

When ASP.NET Mvc was first launched it was a significant change in project and framework design compared to Web Forms. Microsoft needed to place the Framework changes front and center for help developers understand the new pattern.

Now Mvc has been around for 10 years in the ASP.NET world and other patterns, especially in front-end javascript developemt but also in ASP.NET Core, have shown to be more scalable and maintainable.

Feature Folders is a pattern that supports focusing on business feature requirements in naming and file path conventions.

Developers rarely work on "Models" or "Controllers" or "Views". Instead they are tasked with working on "Features".

If I need to build out a new feature for the home page, in a traditionally structured Mvc application I need to find the right controller in the "Controllers" folder, the right view model in the "Models" folder and then dig through the "Views" folder to find the right view file.

Once I have all these open, if I'm adding a new route then I go and create files in each of these locations. There is no 'locality' connecting them - it isn't obvious visually what makes up a feature.

Feature Folders would argue that the HomeController.cs, HomeViewModel.cs and Index.cshtml for the HomeController.Index() action should all be in a folder together named after the feature (ex /Features/Home). It would also make sense to keep related services in this folder to if they weren't kept in a separate project (ex IHomeRepository/HomeRepository, IHomeArticlesQuery/HomeArticlesQuery).

ASP.NET Core fully supports a Feature Folders approach as an option for Mvc and uses it exclusively for Razor Pages with its /Pages folder.

The use of Feature Folders the ASP.NET community has been strong since MVC5.


The benefits of this approach quickly become apparent with large applications trying to keep feature implementations isolated or with many developers working on separate features in a code base.

K. Scott Allen even developed a Nuget package for ASP.NET Core for easy Feature Folder configuration

It would be very helpful to Kentico Mvc developers to be able to use this approach in their projects through customizing the Razor View Engine and have it be an officially supported solution by Kentico.

45 votes
Sign in
Sign in with: Facebook Google
Signed in as (Sign out)
You have left! (?) (thinking…)
Sean Wright shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →


Sign in
Sign in with: Facebook Google
Signed in as (Sign out)

Feedback and Knowledge Base