Independent modules?

Topics: CAB & Smart Client Software Factory
Jan 13, 2006 at 3:15 AM
originally posted by: DotNetRules

Hi all, I’m trying to get my head around the notion of “completely independent modules”, for example… module B may need to send state objects to Module A (but not in all cases) then Module A regardless needs a reference to Module B. How can this truly be “independent modules”?

Regards

Simon
Jan 13, 2006 at 6:12 AM
originally posted by: DLorenz

Well, I'm not entirely sure what you are doing, but it may be possible to not reference one module from another. Instead, you could simply raise a global event (EventPublication) that the other would receive (EventSubscription). You can even use these in the ModuleInits, if you really want to.
Jan 13, 2006 at 7:44 AM
originally posted by: mhildner

Not sure if this will help, but I do exactly what DLorenz said.

In my case one module allows the user to look up warrant information on a person. Another module does criminal checks against state and federal databases. The warrant module publishes and event, and the criminal check module listens. If the client has not purchased one of the modules, it still works fine.

Since both modules need access to certain types (a person class for example) those types are put in another .dll, which both modules reference. That way the modules don't reference another module.

Mike