[Pdx-pm] Tech Talks
Ovid
poec at yahoo.com
Wed Mar 19 18:55:52 CST 2003
--- Joshua Keroes <jkeroes at eli.net> wrote:
> Got ideas for a talk? Thought about a good one at the last meeting?
> I heard some good ones there and I'm sure we have plenty more out
> there.
>
> Send me your half-thought-out thoughts, your ideas awaiting fruition,
> your caffeinated carbonated full-bore carbureted [wait, bore?] lectures;
> your... future pdx.pm meetings.
Okay, I'm a blithering idiot (no surprise there, eh?), but I'll take the bait.
If you don't have anything lined up, I'll commit to throwing together my talk:
=head1 NAME
use strict 'sql';
=head1 SYNOPSIS
my $sql = 'SELECT *' and die "Don't do that!";
my $data = $sth->fetchrow_hashref and die "Or that!";
my $sql = 'SELECT this FROM that' and die "Still bad";
use base 'Class::DBI'; # much better
=head1 OVERVIEW
Many people misuse SQL. While some of the above can be fine for a short script, we should be
careful about how SQL is used in a production environment. C<use strict 'sql';> will detail why
the above constructs can lead to non-scalable code.
First, we'll show some examples of bad SQL and then move on to better SQL with bad implementations
(hint: I don't avoid C<&DBI::fetchrow_hashref> for performance reasons). We'll finish with a
quick discussion of how object persistence modules can help lead us lead us out of the quagmire.
=head1 NOTE
I'll primarily focus on C<Class::DBI> for the object persistence, but I'll touch on some of the
other OO Persistence modules such as Tangram and Alzabo. I'll also discuss what I think is a bit
of a design issue with C<Class::DBI> (sorry Schwern!) and, by the end of the talk, you'll
understand why I feel that way.
Side note: despite the design issue I alluded to, C<Class::DBI> rocks! Joe Bob says "check it
out!"
=cut
Cheers,
Ovid
=====
"Ovid" on http://www.perlmonks.org/
Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/
Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt
__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com
More information about the Pdx-pm-list
mailing list