Search code examples
asp.net.netarchitecturemef

How to Separate enterprise application into modules?


We started in designing an ERP System customized for our client. It is a typical ERP has many modules like GL, finance, CRM and HR. We think to sell those Modules separately, ex: customer can buy only CRM or CRM plus HR. We need to know how to achieve that from aspect of application design and deployment? is there and pattern or best practice for doing that?. given that it is a .net web application. I know about MEF but it is different, it helps to install plugin to existing application at run time and this not our case.


Solution

  • You don't need to separate the code, you need to separate out the logical functionality, by deciding what is going to be sold in each unit.

    Then at each point where that function is needed, you check whether the user's licence allows that function. If not, you either hide the UI, or display a licence message saying the module has not been purchased.

    That way you can sell upgrades which only change the licence key and don't require reinstalling.