Matt S Trout wrote:
On Tue, May 15, 2007 at 03:47:57AM -0700, mla wrote:
So with that design you'd get the centralized validation, which
is most critical to me, but then you could use SQL freely
and get back a collection of read-only active record objects
if you did fancy stuff.

You -can- pass a custom chunk of SQL to DBIC for the where clause and have
it Just Handle It. The fact that most people choose not to is, however, a
hint as to where the better engineering practice lies :)

Why is that the better practice?

You mentioned the fact that 'perl -c' can syntax check your query.
That's a good point, but OTOH, it can't check it for meaning (it's
still simple to produce the wrong results so you'll need to
test the actual, running query).

I can see it from a database-independence argument. In that case you
either abstract the SQL away or you have an easy way to override SQL
for specific engines.

Thanks,

Maurice

_______________________________________________
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/

Reply via email to