Splitting an ASP.NET MVC site across multiple projects.
-
So there's a push to make our large monolithic MVC application "modular". Even with all the business logic living in separate webservices, the front-endish part of views, controllers, CSS and JS is a large and not very maintainable behemoth.
The idea is, we make separate applications for each module. Separately deployable, potentially living on different VMs, and maintained generally independently from each other. But we also need a set of "common" assets - both to get an uniform look and feel and not to duplicate things like sign-on or some "About" page or something like that.
So here's the question - is there any standard approach to have separate MVC projects use views, controllers and assets from the common one? So far we've found some three or four methods, all of them somewhat hacky (either requiring IIS to be properly configured for deployment, or embedding JS and CSS files as resources and capturing requests for them) - and neither of them seems like we're doing it properly.
-
@Maciejasjmj said in Splitting an ASP.NET MVC site across multiple projects.:
all of them somewhat hacky
this. I don't think it would be very maintainable either...
-
@Maciejasjmj Does it have to be MVC (the shitty incomplete library) and not merely MVC (the design pattern)? Because in the latter case, this is pretty trivial.
-
@Tsaukpaetra said in Splitting an ASP.NET MVC site across multiple projects.:
I don't think it would be very maintainable either...
Why not? If it worked like I think it should, it should make things much easier to maintain (eg. changing the login page to include a CAPTCHA will not require applying the exact same set of modifications in 15 or so projects, just the common library).
@blakeyrat said in Splitting an ASP.NET MVC site across multiple projects.:
Does it have to be MVC (the shitty incomplete library)
I think it does, yeah. What we already have is written in it, and from what I know we don't have the time and money budget for a total rewrite.
@blakeyrat said in Splitting an ASP.NET MVC site across multiple projects.:
and not merely MVC (the design pattern)?
Not like we really use that...
-
@Maciejasjmj said in Splitting an ASP.NET MVC site across multiple projects.:
Why not? If it worked like I think it should, it should make things much easier to maintain (eg. changing the login page to include a CAPTCHA will not require applying the exact same set of modifications in 15 or so projects, just the common library).
That's the kicker, getting it set up like that.
I think our company is just , but we still can't even get our standardized logo to be embedded in executables from a common source, so I might just not have the experience of it working correctly.
-
-
Can you load a DLL from an ASP.NET MVC site? Yes? Then you can share assets.