Adapter pattern + Facade Pattern

jabber (jabber)
<本文发表于: 相约加拿大:枫下论坛 >
Dear Guest,

I think I have understood your probelm now.
You have a server, which can provide some basic services. To serve the customers from Company A, you need add some "pepper" in your services. To satisfy those from Company B, you need add some "sugar". ..... As you talked about adding clients, you were actually talking about add a class of clients. (This is your ignorance in your early posting. Adding a class of clients is different from adding a single client in the usual sense.) Whatever companies those clients come from, the services they enjoy are basically the same.

To solve your probelm, I suggest you use Adapter pattern to wrap your basic services,
then add some flavors such as "pepper", "sugar", "vinegar". depending upon the clients. This is the first step. The client is usally not interested in how your server provide services. So the second step is to use Facade pattern to output your services to different clients. If you use Java, this is usually realized using some static methods.

I thank you so much for offering me this opportunity to discuss the patterns. If you were in Virginia, I may invite you to have a dinner.
<本文发表于: 相约加拿大:枫下论坛 >

2000-10-24 -04:00

回到话题: I have several clients, there is a little bit difference among them, maybe I'll have more clients in future, how to design the architecture?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论