Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: OO Design question: configuration

by stvn (Monsignor)
on May 19, 2007 at 22:36 UTC ( #616370=note: print w/ replies, xml ) Need Help??


in reply to OO Design question: configuration

Take a look at IOC it is meant to solve just this kind of problem. We use it at $work for all our larger projects.

What it basically will do for you is to handle the creation and configuration of all your objects while transparently managing the interdependencies (even circular dependencies as well). You then fetch the objects you need from the IOC::Registry singleton, and they Just Work.

-stvn


Comment on Re: OO Design question: configuration
Re^2: OO Design question: configuration
by spurperl (Priest) on May 21, 2007 at 04:12 UTC
    Huge thanks for pointing me to this. I have never heard of IOC (now it's more popularly called DI - Dependency Injection) before, but it sounds just like the thing I had in mind.
      now it's more popularly called DI - Dependency Injection

      Yeah, I had it called that originally, the it grew into a larger "Inversion of Control" framework with the Proxy objects and such. However, once I started actually using it in practice, I found I had little need for the proxies, but by then it was too late to change the name.

      Plus, IOC was better as a namespace name, whereas DI is just kinda ugly :)

      -stvn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://616370]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (8)
As of 2014-09-18 23:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (128 votes), past polls