2008/5/29 Paul Makepeace <[EMAIL PROTECTED]>: > I don't understand the objection to having SQL in code. If I pull out > data out of a hash I don't necessarily have to abstract that into some > file elsewhere. Why should I do that if I'm pulling data out of a > database?
It's not the pulling the data out of a cache, it's the scattering of SQL all over the place that requires changing by hand when the schema is updated or code is refactored, etc. Not to mention (oops) the big ugly chunks of SQL you can get making the code harder to read, and can be unwieldy - especially when some of it is built on the fly (and the building on the fly gets more and more complex). You don't have to abstract it with ORM or SQL::Abstract (although I use the latter heavily), you can embed it in a function (tucked away at the bottom of your code, easy to find and update, re-usable) or stash it in a "phrasebook" A. -- http://www.aarontrevena.co.uk LAMP System Integration, Development and Hosting _______________________________________________ BristolBathPM mailing list [email protected] http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm
