-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Modular multi-tenancy web application #2845
Comments
You will get stuck at some point when you decide to use the security (authentication) middlewares. Until they implement it, one can say that the ASP.NET 5 does "not" support multi-tenant scenarios. |
Fine @csunali, perhaps this multi-tenant scenario feature doesn't need to be a middleware to security work. Could be an another configuration to response controllers, cshtml and static files in shared .net project. A big need here is, isolate the pluggable application CRUDs like Agenda, Product and others to main Web Application. |
Right, you don't have to use the authentication middlewares for every project but you having mentioned your project being a CMS project and CMS implementations always having a backend made me think that you will eventually have to implement authorization and authentication features. So, if you ever consider using OpenId Connect or such features (and you will if you have public API methods that get exposed), the ASP.NET 5 does not support those scenarios until architectural changes are made to the core authorization middlewares. Apart from that, what you are asking for sounds quite achievable. I had a similar need and came across the following limitation of ASP.NET 5: You cannot have separate I have read discussions here and there where some fellows from the ASP.NET Team say that they don't want to search through assemblies for So, what I have done was implementing a custom I have ended up all my "module projects" having their own Startup classes. Actually more than one For controllers; they should work out of the box. MVC searches through the assemblies for them. Just make sure that their names do not conflict with each other no matter if they are in separate assemblies. For cshtml and static files; I put them within their own module project and set them to be "embedded" using By the way, the static files middleware has a bug currently, just make sure your first request does not hit a static file: aspnet/StaticFiles#65 |
Good tip @csunali, about security, really I will eventually have to implement authorization and authentication features. I should look all that what you said closely. May be a demo project. This scenario is a big box, because we are talking about system and their subsystem and how they interact between they self. They could have module dependences. Imagine, Product Module could be use Image Module for product's image. Post Module uses Image Module and Agenda Module. Today we have that legacy CMS in ASP.net Web Forms project, builded in 2006, using User Controls. In this year we are starting to rewrite everything in MVC, preferably in ASP.net 5 |
Needs Design +1 |
cc @danroth27 because this is related to the new ASP.NET Core Modules ideas. |
At this point, our guidance is to look at a module system such as the one Orchard Core provides. Orchard Core modules allow you to build modules as NuGet packages that can be added to your application on the fly. And you can use them as a low level framework without adopting the entire Orchard CMS infrastructure. Check out https://github.com/OrchardCMS/OrchardCore.Samples to see what this looks like. |
Take a look in this scenery below:
I need to develop a CMS portal for 200 custumers, this customers have a set of feature like agenda, curriculum, banner named feature module. Those modules are enabled or disabled for each custumers.
Now, thinking about architecture solution for a good develop process, I wish to separate each modules as a separated Visual Studio solution within their controllers(CRUD), css, js and cshtml for late soon run it in main web application project as a middleware feature like that.
or
Then if ASP.net 5 can give me that possibility to develop a web plataform system like my scenery?
To illustrate what I am saying look http://www.codeproject.com/Articles/614767/NET-ASP-NET-MVC-plug-in-architecture-with-embedded
Stackoverflow question: http://stackoverflow.com/questions/31296604/asp-net-5-middleware-feature-as-a-modular-application
Thanks
The text was updated successfully, but these errors were encountered: