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

Re: persistent object framework

by dsheroh (Prior)
on Mar 02, 2013 at 10:10 UTC ( #1021404=note: print w/replies, xml ) Need Help??

in reply to persistent object framework

should I write *one* general persistent class for all three or write 3 class to correspond to 3 diffent types of data.

The best approach would be to write one general persistent class which defines the interface to your persistence mechanisms and then create plugins which it uses to communicate with each actual back-end data store. (This is the same model used by DBI, where DBI itself is the "general class" and the various DBD drivers are the "plugins".)

Another approach would be to derive subclasses for each back-end, but the DBI-style approach tends to be more flexible and provides a better interface for allowing users to configure how/where they want their data stored.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021404]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (5)
As of 2018-03-19 07:23 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (235 votes). Check out past polls.