Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add/create modular architecture in ASP.NET 5 MVC 6 [closed]

I want to create a modular architecture in MVC 6, with several interchangeable modules. Mostly for separation of concerns on grand scale, some modules will be "base modules" (always included). But all should have the same level of decoupling. Now that we have DI and IOC builtin the architecture of this might differ vastly.

I have looked around all over SO and only found MVC 4/5 and MEF solutions, but seeing as the new Startup.cs has changed considerably, and added new methods and best practices, i was wondering if there was a new way to do this.

I did however find the aspnet/Entropy project on GitHub, and they have Mvc.Modules package, which might do the trick although this might not be an official thing anytime soon.

EDIT: It seems that the Mvc.Modules mentioned above isn't completely separated yet (controllers specifically), so it only half does the job.

like image 877
Jess Nielsen Avatar asked Sep 05 '15 07:09

Jess Nielsen


1 Answers

Since MVC 6 is currently under development, it might be a better idea to look at the source code (especially the tests) to find features that you want to use when you cannot locate what you need on the Internet.

MVC 6 has support for DI of both Controllers and Views. Here are the tests for Controllers and Views.

like image 163
NightOwl888 Avatar answered Oct 24 '22 05:10

NightOwl888