Customer Specific Code

Topics: Web Client Software Factory
Jul 4, 2009 at 4:21 PM

I'm working on a web application where 90% of it is common 'product' code an the other 10% is customer specific.

I want some method of separating the customer specific presentation, business and data access layers from the product code as I don't the main product code to be bloated with customer specific code.

Ideally I'd like to have one solution for the product and one for each customer.

Can you help me to impliment this using WCSF ?

Thanks
Ajay Sawant

Developer
Jul 8, 2009 at 5:17 PM
Edited Jul 8, 2009 at 5:20 PM

Hi Ajay, 

Depending on your exact requirements, there are several ways you can achieve the scenario you described using the WCSF. 

WCSF helps in building composite web client applications. One of the key points that composite web client applications help solving is the separation of the whole application into discrete, functional modules. These will in turn allow the independent development of the individual business logic components.
The different options you have for implementing your solution will greatly depend on how you want to architecture your 'product' and 'client specific' features.
You might more information on the WCSF and technical concepts related to it in the MSDN  online help.

If the 'product' code and the 'customer specific' code deal with separated concerns, you could develop one module (possible more) containing the 'product' code and one module per client specific code/functionality. For example, if your product code deals with Products, Customers, etc and your 'customer specific' code adds more functionality over those entities (for example, Buy/Sell module) you could architecture your solution in such a way to have:

  • A Products module
  • A Customer module
  • One Buy/Sell module per client.

You should choose which Buy/Sell module to use when you deploy your modules. With this approach you will have several decoupled modules for the 'product' code and several decoupled modules for the 'client specific' code.

 If your 'product' code and 'customer specific' code deal with basically the same concerns, but differ in particular processing of data, your could develop one module for each of the concerns and implement different services for each of the differing process. Your 'product' modules will consume the services needed . For example, if all your customers will have Product, Customer and Buy/Sell modules with basically the same functionality, but each client has its own Selling workflow you could architecture your solution in such a way to have:

  • A Products module
  • A Customer module
  • A Buy/Sell module.
  • One Selling service per client (possibly each implemented in a separated f

You should choose which Selling module to use when you deploy your modules. The Buy/Sell module will implement the common buy/sell code to all clients, but will consume the selling service. As the service and the module will be decoupled, for the module it will be transparent how the service implements the selling workflow. With this approach you will have several decoupled modules for the 'product' code and the 'client specific' code implemented in several decoupled services.

Of course you could also find a mixture of both solutions suitable to your scenario, having both customer specific modules and customer specific services.

Hope it helps!

Matias Bonaventura
http://blogs.southworks.net/matiasb