Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I'm puzzled by what is the best way to deal with the framework of an application.
For example, say tables Music::Artist and Music::CD.
In CGI:Application I have a run mode say page1, that has to do processing on both tables.
The question is where does the code go. More percisly say a join, or a routine that gathers info from both tables.
It doesn't make sense to me that I should have things like Music::Artist->do_something buried in the Music::CD class. Do I stick all the real work in the base class Music::DBI? Then have all my run modes look like
sub page1 { my $self = shift; Music::DBI->do_all_the_real_work_that_page1_needs_done; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Best practices with Class::DBI
by saberworks (Curate) on Jan 20, 2006 at 21:39 UTC | |
by Anonymous Monk on Jan 20, 2006 at 22:16 UTC | |
|
Re: Best practices with Class::DBI
by stonecolddevin (Parson) on Jan 20, 2006 at 21:25 UTC |