Thanks for the response. I am familiar with DI/IoC. I am trying to visualize this using sub-projects for each customer. The caveat is, not every customer will have changes to the same class.
I probably need to restate what I am looking for with a better explanation. The example I gave above was just something I saw from another person’s question on the link provided. I will ask differently based on a couple of places I worked.
Let’s say I have an application that is considered the core product. This core product is purchased by several customers. However, some customers need custom changes, but not all. Each custom change is different.
- Make a copy of the core product for each customer and customize. This is easy to do on front end, but terrible for upgrades.
- The core product had a customer folder which contained each customer and their custom code. If the core product had a class name BatchProcessing and there was a customer called ACME that needed that class customized, the class would be named ACMEBatchProcess that extends BatchProcessing. When a change was made to the core product, there was no need to make it for each customer. Only if an issue occurred during each build/unit/integration testing was it addressed. Upgrades were very easy. See diagram below.
|-- ACMEBatchProcessor extends BatchProcessor
|-- XYZBonusProcessor extends BonusProcessor
Both of these approaches work, especially if the core code is sold as a whole to each customer.
Now, this is where my question begins. Let’s say we need to break the core product up into separate products, because the code is way too big. also, not each customer is using everything, which would allow us to sell the products separately. The approaches are:
- Separate core products/application. This would mean maintaining custom code on separate products, multiple deployments.
- Create sub-projects. The build for each customer would contain the sub-projects to include.
So, what I am looking for is the approach of using sub-projects, but also be able to customize the code per customer.