Click here to Skip to main content
15,922,523 members
Home / Discussions / Design and Architecture
   

Design and Architecture

 
QuestionRe: Dynamic DB Connection based on user type Pin
led mike31-Jul-08 7:23
led mike31-Jul-08 7:23 
AnswerRe: Dynamic DB Connection based on user type Pin
vicky45731-Jul-08 10:31
vicky45731-Jul-08 10:31 
AnswerRe: Dynamic DB Connection based on user type Pin
Mark Churchill2-Aug-08 18:05
Mark Churchill2-Aug-08 18:05 
QuestionBig Desktop Database Application - Architecture Help needed [modified] Pin
abhijitbkulkarni24-Jul-08 2:39
abhijitbkulkarni24-Jul-08 2:39 
AnswerRe: Big Desktop Database Application - Architecture Help needed Pin
Pete O'Hanlon24-Jul-08 8:49
mvePete O'Hanlon24-Jul-08 8:49 
GeneralRe: Big Desktop Database Application - Architecture Help needed Pin
abhijitbkulkarni24-Jul-08 10:17
abhijitbkulkarni24-Jul-08 10:17 
GeneralRe: Big Desktop Database Application - Architecture Help needed Pin
Paul Conrad27-Jul-08 13:41
professionalPaul Conrad27-Jul-08 13:41 
QuestionDogfooding? Pin
Philip Laureano22-Jul-08 11:38
Philip Laureano22-Jul-08 11:38 
AnswerRe: Dogfooding? Pin
Pete O'Hanlon23-Jul-08 9:42
mvePete O'Hanlon23-Jul-08 9:42 
GeneralRe: Dogfooding? Pin
Philip Laureano27-Jul-08 13:35
Philip Laureano27-Jul-08 13:35 
QuestionQueue or how to syncronize without locking [modified] Pin
dotnetCarpenter20-Jul-08 11:04
dotnetCarpenter20-Jul-08 11:04 
AnswerRe: Queue or how to syncronize without locking Pin
dotnetCarpenter21-Jul-08 0:45
dotnetCarpenter21-Jul-08 0:45 
GeneralRe: Queue or how to syncronize without locking Pin
dotnetCarpenter21-Jul-08 5:56
dotnetCarpenter21-Jul-08 5:56 
QuestionThumbnail image or Control Pin
netJP12L17-Jul-08 9:52
netJP12L17-Jul-08 9:52 
AnswerRe: Thumbnail image or Control Pin
Pete O'Hanlon17-Jul-08 9:58
mvePete O'Hanlon17-Jul-08 9:58 
GeneralRe: Thumbnail image or Control Pin
netJP12L17-Jul-08 10:04
netJP12L17-Jul-08 10:04 
GeneralRe: Thumbnail image or Control Pin
Pete O'Hanlon17-Jul-08 10:06
mvePete O'Hanlon17-Jul-08 10:06 
QuestionA matter of coupling Pin
Leslie Sanford15-Jul-08 6:59
Leslie Sanford15-Jul-08 6:59 
AnswerRe: A matter of coupling Pin
Pete O'Hanlon15-Jul-08 9:37
mvePete O'Hanlon15-Jul-08 9:37 
GeneralRe: A matter of coupling Pin
Leslie Sanford15-Jul-08 11:28
Leslie Sanford15-Jul-08 11:28 
Pete O'Hanlon wrote:
I would definitely take a look into Dependency Injection


I did a search and found Martin Fowler's article on Dependency Injection.[^] Iteresting read.

My situation is similar but not exactly the same to that described in the article, but I think the principle is still applicable, more or less.

Basically, I have one class that offers a set of services, mainly simple notifications when certain things happen within the application. Next, I have a group of class's that use these services. Which services are used can vary from class to class.

The problem I run into is when I start trying to manually wire things up. So I've got my Service over here and my Clients over here, and I have to remember which services a client needs when wiring them together.

The solution that I've settled on is to pass the Service to each Client when it is created. Then the Client can subscribe to those services it needs. The containing class, the one containing all of the Clients, doesn't have to know how to hook up Clients to the Service; it just pass the Service along.

I think I like this solution. It has greater coupling in that Clients are familiar with the Service, but this can be mitigated by hiding the Service behind an interface, which I think is what Dependency Injection does, more or less.

Anyway, thanks for the reply. I'd heard of Dependency Inversion but not Dependency Injection.
GeneralEliminate coupling to concrete class assembly by (Dependency Injection) Spring.NET Pin
Fakher Halim17-Jul-08 6:38
Fakher Halim17-Jul-08 6:38 
GeneralRe: Eliminate coupling to concrete class assembly by (Dependency Injection) Spring.NET Pin
Pete O'Hanlon17-Jul-08 8:51
mvePete O'Hanlon17-Jul-08 8:51 
GeneralRe: Eliminate coupling to concrete class assembly by (Dependency Injection) Spring.NET [modified] Pin
Fakher Halim17-Jul-08 9:38
Fakher Halim17-Jul-08 9:38 
GeneralRe: Eliminate coupling to concrete class assembly by (Dependency Injection) Spring.NET Pin
Pete O'Hanlon17-Jul-08 9:57
mvePete O'Hanlon17-Jul-08 9:57 
GeneralRe: Eliminate coupling to concrete class assembly by (Dependency Injection) Spring.NET Pin
Fakher Halim17-Jul-08 10:01
Fakher Halim17-Jul-08 10:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.