Client settings

We have a product with an installation base of about 50, more than 50% of these installations have settings in the code for business logic and are currently performed by huge IF and Switch operations.

We are currently updating the code to .NET 3.5 and want to handle the settings in a more manageable way. The only ways we can think now are to either stick to the large IF and Switch statements, or have separate files in Source Code Control for each client, which again does not seem ideal.

Is there an acceptable way to handle a large number of settings in the code base?

+3
source share
3 answers

, (, XML, , ), , ,

, (, , , / ), .

.

, . , , .

+2

inheritance? . , If case, , .

+4

DI Open/Closed, , , , .

For example, you can have a Transfer class in BaseLibrary, and then you can have a class. LoggingTransfer extends the transfer to the CustomerX library, which contains only code that configures the basic functions.

0
source

Source: https://habr.com/ru/post/1698593/


All Articles