Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: OOP and import()

by fmerges (Chaplain)
on Dec 10, 2007 at 22:35 UTC ( #656258=note: print w/replies, xml ) Need Help??


in reply to OOP and import()

Hi,

Besides was Joost said so far...

Personally I don't like the fact of having a Config class that connects to a database and created a database handler... and even not talking about relying on some "magic" like the fact that use calls import while base does not...

Don't you think something is wrong in the design itself?

Why you don't have a Config class just for config purposes? Even the connection to the database can be in his own class or even in a base class for your model, so that it gets called via super... there are a few alternatives, but I really would leave Config for configuration, right now you think about connecting from it to a database, but it might be that later on, you think that it could be handy to _not_ connect to a database...

Resuming, think again about what you want to achieve, is there really any constraints of doing it the way you're thinking?

Regards,

fmerges at irc.freenode.net

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://656258]
help
Chatterbox?
[Discipulus]: figuring.. i'm still just use the side pm chat..
[erix]: (all this while karls guitar gently weeps...)
[planetscape]: (invade Hungary)++ #I'm hungry
[stonecolddevin]: i went too far down the irc rabbithole to hook this back up there
[Discipulus]: .. yes erix until NodeReaper put jhon coltrane again

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-06-22 21:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (531 votes). Check out past polls.