Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

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.
Both.

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1021404]
help
Chatterbox?
[holli]: i was just thinking of the bare content.
[LanX]: Plenty of "templates" realised with CGI-HTML-function
[LanX]: well if you want you can fetch all XML and translate it to another board markup
[moritz]: at this time, a migration could consist of only migrating the rendered HTML of nodes
[moritz]: to a forum software that supports raw HTML input for legacy threads, and uses sane markup for everything else
[holli]: yeah, then vroom will personally stab me in the back at night
[holli]: exactly, moritz
[moritz]: with a big table of redirects to support the old links
[LanX]: do it
[holli]: well if you put some cleverness into the migration you can auto convert most of the links as well

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2017-11-20 19:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    In order to be able to say "I know Perl", you must have:













    Results (292 votes). Check out past polls.

    Notices?