Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Which design pattern best suits this need?

Reply
 
Old 04-17-2008   #1 (permalink)
dizzy


 
 

Which design pattern best suits this need?

My client application will have a set of varying business functions.
These functions will be fullfiled via various 3rd party services (i.e.
web services, http post/get, remote data access or socket to socket
feeds). Some are action type services (i.e. create account or update
some info about a given user), and others are read only, retrieval of
data.

What i intend to do is to define the functions in an interface so
that the client code can be implemented against this interface; let's
call it IClientServices

Now the dilema i am facing is how to i get IClientServices to work
against the various services. One idea was to build a wrapper for
each service.
The concrete implementation (call it ConcreteClientServices) of
IClientServices can then use composition and delegation to interact
with the various services (the wrappers would be members
ConcreteClientServices). The issue here though is that if we move
from one 3rd part service, we obviously would have to create a new
wrapper for this new service...that's fine. However, what is
troubling is having to modify ConcreteClientServices each time we
change to a new service provider. With this method, i still have a
dependency on 3rd party services sort of...it's not a clean
separation. What is the best way to solve this problem?

Also, how do you handle a situation where a single set of related
business functions require interaction with two or more different 3rd
party services? Would it be best to build one adapter that uses
IClientServices, and through composition and delegation, does the
dirty work of figuring out which methods should be mapped to the
different services (rather than creating separate adapter for each
service as described in my above paragraph). Is the pattern here
considered Adapter or Provider?

thanks,
Mike

My System SpecsSystem Spec
Old 04-19-2008   #2 (permalink)
dizzy


 
 

Re: Which design pattern best suits this need?

hmmm...not a very active group? or is there a better another group
that better suits architecting topics?

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
RE: searching for a pattern in a string!! VB Script
String pattern PowerShell
Implementing the Factory pattern .NET General
Sorting an array on pattern? PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46