We have the following setup
Current Solution:
Business Logic (Class Library)
Data Layer (Class Library containing EF,Web Services wrappers etc)
WebProject1
BUT we now want to write another Web Project (Web Project2) which would be almost identical to WebProject1 except for the fact that it would alter properties and input variables to functions/voids inside the Business Logic class to provide a different set of data for another completely different user. (Needs rewording). Think of Facebook as WebProject1 and Myspace as WebProject2. Same concept, same business layer almost but different products altogether.
Future Soltion
Business Logic (Class Library)
Data Layer (Class Library containing EF,Web Services wrappers etc)
WebProject1
WebProject2 (similar to WebProject1 but different authentication, different UI, different pages etc)
WebProject3 (possible)
Without completely destroying the Business Logic (as the class would now have to allow for 2 paths per set of input variables) how can we structure this to aviod doubling up on any code?
Edit: Explain the business logic
WebProject1 provides data based on a database filter called "ByCompany"
WebProject2 will provide the data based on a filter called "BySite Both projects will be consumed by different audiences which will not know that the other website exists.
Eg possible future logic could include something like this:
BusinessLogic.EmployeeList employeeList = new BusinessLogic.EmployeeList();
employeeList.LoadBySite("ConstructionSiteC");
employeeList.LoadByCompany("JohnDoesTractors");
The dilemma is:
Should we maintain two Business Logic class libraries? Should we add preffixes to the class names to denote their corresponding WebProject parent? Should we create base classes and inherit if there are overrides we need to make? Should we create more interface based business logic? Should we just have two separate solutions that draw from the same DAL?
The projects will likely get quite large (over business logic 300 classes) and we want to minimize double ups as much as possible. What is the your method or suggestion?
Thankyou!