Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: OO Perl: classes and database access

by jeroenes (Priest)
on Sep 27, 2001 at 20:41 UTC ( #115150=note: print w/ replies, xml ) Need Help??

in reply to OO Perl: classes and database access

Have you read "Code Complete" by McConnell? Read all about abstraction layers and independent components.

You have already had some suggestions about switching from database to flat file etc. Separation also holds for your user-interaction interface, whatever it is.

E.g., is clearly an interface thingy, so make it independent from your User-objects. That means: calls the user-class, and the user-class calls the database-interaction class, where holds the interface (web/CLI/GUI), user holds your (temporal) user data and the database class is left with calling whatever the database is.

You just apply this kind of reasoning to every relation you encounter while making up the program, and I think you will get around to some nice stuff pretty soon.

I'm not a real experienced OO'er or whatever, so listen to everybody else here for more advice. Browse tilly's nodes for example....


"We are not alone"(FZ)

Comment on Re: OO Perl: classes and database access

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2015-12-01 08:40 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (796 votes), past polls