In our company, we need to create several web applications (made with MVC4) that inherit a navbar menu (that is, an HTML structure with styles and some scripts). This menu is not static. It changes according to the authenticated user's roles.
I've developed an assembly with the same structure as any MVC project. It is using EmbeddedResourceVirtualPathProvider. The child MVC 4 apps must reference this assembly in order to consume it's resources.
So far everything works and it seems a fairly decoupled approach instead of using a _Layout (Master Page) which would tie every child application to a single MVC 4 project. Areas were also discarded because we need to outsource some child applications and wouldn't want to send the entire parent MVC 4 project in order for them to compile it.
Is this approach a good practice?
Aucun commentaire:
Enregistrer un commentaire