[yapc] BOF requests?
Christopher L. Everett
ceverett at ceverett.com
Thu Jun 5 15:25:16 CDT 2003
Andrew Brosnan wrote:
>
> So are you saying that you now use Class::DBI rather than the DBI
> module? I've been wondering recently about Class::DBI and would be
> interested; especially advantages/disadvantages vs DBI.
Between Class::DBI and HTML::Template my web applications are
becoming just some glue between classes that handle getting
data to/from the browser via the web server and Class::DBI.
The overhead is something to track carefully.
But, you only need to set up a table using Class::DBI once. I've
begun using it it as the place where I define the various aspects
of how we do business, eg in one place I have:
my $account = Physemp::Model::Account->retrieve($account_id);
$account->full_database_access_enabled({
begins => $self->{formdata}{start_date},
ends => $self->{formdata}{end_date}
});
and another I have code like
my $account = Physemp::Model::Account->retrieve($account_id);
return DECLINED unless $account->full_database_access_enabled;
and so on.
The last project I did, was recoding somethin I already had up
with Class::DBI. It dropped about 40% in actual Perl code size
measured in bytes, but had more functionality built in.
YMMV, of course.
There. Someone had to sling some code around, so I went ahead
and did it :)
--
Christopher L. Everett
Chief Technology Officer
The Medical Banner Exchange
Physicians Employment on the Internet
More information about the yapc
mailing list