BackgroundWorker and Business Logic Coupling

G

Guest

All of the BackgroundWorker examples I've seen so far are toy in the sense
that the worker logic is embedded in the form. Normally business logic is
decoupled from presentation. However, I can't see any direct way to implement
the business logic without out a dependency on BackgroundWorker. It would be
fairly simple to write an adapter for whatever events are published by the
business logic component; you'd be duplicating about half the logic of
BackgroundWorker but I think it would be worth it from a safety and
consistency point of view. But I'm wondering what the design intent is here,
since it doesn't seem to documented anywhere. Anyone using this compenent in
the real world? Thx.
 
O

Otis Mukinfus

All of the BackgroundWorker examples I've seen so far are toy in the sense
that the worker logic is embedded in the form. Normally business logic is
decoupled from presentation. However, I can't see any direct way to implement
the business logic without out a dependency on BackgroundWorker. It would be
fairly simple to write an adapter for whatever events are published by the
business logic component; you'd be duplicating about half the logic of
BackgroundWorker but I think it would be worth it from a safety and
consistency point of view. But I'm wondering what the design intent is here,
since it doesn't seem to documented anywhere. Anyone using this compenent in
the real world? Thx.
BackgroundWorker is a component, but it doesn't have to reside on a form. It
can also reside on a component, so if you business logic is in a component you
can just drop the background worker on the component.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
 
G

Guest

Otis Mukinfus said:
BackgroundWorker is a component, but it doesn't have to reside on a form. It
can also reside on a component, so if you business logic is in a component you
can just drop the background worker on the component.
Good luck with your project,

Right, but you still have the dependency. Not everything is an IComponent.
For example a DTS package. I think what I hear you saying is implement the
adapter by implementing IComponent. That makes perfect sense, but still
wondering what the designers had in mind as the standard approach to a fairly
standard case. Thx.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top