Home All Groups Group Topic Archive Search About

2 way Dependancy Breaker Pattern

Author
2 Mar 2006 10:21 PM
Learnicus
Hello,

I have a Winforms app that accessess a webservice application that i have
written. Both of these use a common class called replication to carry
changes from an online database <> offline database.

Replication in turn holds the web references to the webservice such that
webservice refs replication.dll and replication.dll references webservices.
This creates some problem when building and sometimes i have to comment out
all references to the webservice objects and build a shell of
replication.dll so i can compile webservices and then go back and uncomment
the webservices refs in replication.dll and recompile it.

Is there a pattern or recommended practise for this scenario. I want to
abstract out one dependancy from the other but i cant think of a way to do
it becuase then the abstraction will still be dependant on either the
webservice or the replication and i'll just end up in the same spot but with
an additional class in the mix?

I hope this made sense.

Thanks

Lenny

Author
3 Mar 2006 8:17 AM
Cor Ligthert [MVP]
Learnicus,

The WindowForms app and the Webservice should be completely independent from
each other.

Although that they can use the same types of classes. By instance in this
case the dataclass(/es), most proferable probably datases/datatables.

Just my thought,

Cor


Show quoteHide quote
"Learnicus" <spamthis@nospam.com> schreef in bericht
news:eWyEyekPGHA.140@TK2MSFTNGP12.phx.gbl...
> Hello,
>
> I have a Winforms app that accessess a webservice application that i have
> written. Both of these use a common class called replication to carry
> changes from an online database <> offline database.
>
> Replication in turn holds the web references to the webservice such that
> webservice refs replication.dll and replication.dll references
> webservices. This creates some problem when building and sometimes i have
> to comment out all references to the webservice objects and build a shell
> of replication.dll so i can compile webservices and then go back and
> uncomment the webservices refs in replication.dll and recompile it.
>
> Is there a pattern or recommended practise for this scenario. I want to
> abstract out one dependancy from the other but i cant think of a way to do
> it becuase then the abstraction will still be dependant on either the
> webservice or the replication and i'll just end up in the same spot but
> with an additional class in the mix?
>
> I hope this made sense.
>
> Thanks
>
> Lenny
>