I need to develop a web application of hotel. Some hotels have lodge system as well. How can I make lodge as pluggable module. I went through many links and found that area might be a good solution but I couldn't find out the best solution. The foremost thing I need to check whether the lodge module is present or not. If lodge is present then in main project I need to add a button to go to lodge system. How is that possible? If so then please share me a tutorial or a link.
Asked
Active
Viewed 657 times
1 Answers
1
Look at MVC Razor Precompiled Views to keep views and code in another project. Use dependency injection to share common infrastructure code.
This github repo should contain what you need https://github.com/RazorGenerator/RazorGenerator
Potentially you can make Lodge a night package and share it between projects that way. Alternatively look at making code base multi tenated and make parts of application customizable per customer

GraemeMiller
- 11,973
- 8
- 57
- 111
-
sir will that allow me to use lodge in any other project? – Hacked user Jun 23 '17 at 09:14
-
Assuming you design it correctly yes. If you design against interfaces have logical UI components then would be posssible. I have made reusable identity modules that do similar. The user management views and management etc can then be shared across projects – GraemeMiller Jun 23 '17 at 13:15
-
@GraemeMiller, all the approaches I have seen on the internet require the main website to restart in case of adding a new plugin or area or update the existing one. I want to develop a website which should be able to add new module without restarting the parent website. Is it possible? – Rupendra Nov 28 '17 at 04:12
-
@Riky There are ways to do it with AppDomains but it is reasonably complex https://stackoverflow.com/questions/458699/how-do-i-implement-net-plugins-without-using-appdomains lots of other stuff out there. Basically, you will have issues with file locking existing DLL, memory leaks, etc to deal with additional complexity. Just search for plugin without restart. You really better need it rather than just accepting the restart – GraemeMiller Nov 28 '17 at 11:56