3 ms·
My favorite pattern, which I use on almost all personal code is the phrasebook, implemented here in perl: http://search.cpan.org/~rani/Class-Phrasebook-0.88/SQL
by earino 12y ago
My favorite pattern, which I use on almost all personal code is the phrasebook, implemented here in perl: http://search.cpan.org/~rani/Class-Phrasebook-0.88/SQL/SQL.pm http://search.cpan.org/~rani/Class-Phrasebook-0.88/SQL/SQL.p...
Basically it's "give your SQL a symbolic name, define how your code interacts with that SQL, and use it as such."
Mind you, ORMs can be awesome, but in my experience ORMs are fantastic at implementing the parts of an application that aren't the competitive advantage of your application. The parts that actually make my code special, the parts where fundamental assumptions regarding codes interaction with data fall apart... those are the parts where ORMs don't particularly shine, especially as time moves forward.