[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: libraries - dependencies

From: Tim Van Holder
Subject: Re: libraries - dependencies
Date: Wed, 11 Jun 2003 15:21:44 +0200

> Query 2:
> I have a GUI module, I make it a library.
> I have a communication module which responds to
> requests from GUI module and does communication.
> This again is made a library. 
> Now you have
>       GUI -> communication
> The comm. library may
> receive requests from other users and it will
> communicate these requests to the gui module.
> Now you have
>       communication -> GUI
> I have combined them temporarily, but clearly
> it is not the solution. 

No, because your 'communication' serves multiple
roles - you need to refactor your code.

What you seem to have is 3 components:

- a [comm] library providing communications
- a [gui] that implements the core functionality
  of the application, as well as a GUI frontend.  Part of that
  functionality involves communication of some sort, so this
  uses the [comm] library.
- a [network_listener] which uses the [comm] library to listen
  for requests and sends them to the [gui]

Now the [comm] library is separate from the [network_listener]
and is only used to send/receive requests, not process them,
which eliminates the dependency loop.

[comm] <- [gui] <- [network_listener]

reply via email to

[Prev in Thread] Current Thread [Next in Thread]