Multiple projects in MVC and WebAPI

4

I'm looking for a project template that involves multiple MVC and WebAPI projects. In the solution I'm thinking of designing (if possible) a content management solution for multiple clients and I'm thinking this way:

I wanted to have a Pai project where it would be the core "core" of my application and the rest would be sub-projects where I'll call them "modules" in which these modules could be versioned. Let's imagine the following senario:

Main Project in MVC where I manage users and clients. Then I need to develop a Notices management module, another Photos management.

SG.MVC - > Master Page, home page and module management

SG.Modulo.Core - > Interfaces required for module development and inclusion in the MVC application

SG.Modulo.Noticia.V1

SG.Modulo.Noticia.V2

SG.Modulo.Foto.V1

SG.Modulo.Portifolio.V1

How could I compile these modules into separate projects and then inject these modules into the main application, so there is no need to recompile and adapt the main application every time you have to include a new module delivering a unique project dynamically, an example would be a wordpress, joomla where modules can be inserted.

  

I thought about looking for the modules (compiled into dll ) saved in a folder, or managing the existence of this module in a database showing where the dll of each module is located. Any light at the end of the tunnel will be welcome.

    
asked by anonymous 08.02.2016 / 21:45

2 answers

3

I have worked in a company that owned a huge ERP and they had a very well done division of the various modules of the system. The framework they used was basically like this:

  • TFS was used for version control, and I confess it was a lot nicer than using Git;
  • Each module in the system had its own Visual Studio solution and everyone was in version control;
  • Base modules compiled for libraries (DLL);
  • Base modules had a custom build output directory that was specific to all of them, a folder that was not versioned, ie when a base module was compiled, a DLL was generated in that folder and the same was true for all the other base modules, in the end you had a folder with all the basic DLLs to run the modules, and that was the big key of the story, because in that way these DLLs could be easily referenced by the main modules, without any problems related to directories.

Well, this is an interesting way to address this problem and the way I would use it if I needed to build a large project in a way that could easily be expanded.

    
09.02.2016 / 02:33
1

I was able to inject Class Libraries into MVC using Unity.Mvc . However, some warnings need to be given:

  • Unity conflicts with ASP.NET Identity. I've never been able to resolve the setup to work;
  • Views must exist in the main module;
  • Route configuration needs to be done using [Route] .
09.02.2016 / 03:00