CPAN Module Review: Jifty::DBI
Jifty::DBI is yet another database abstraction layer, with object-relational mapping and (more importantly to me) schema generation. It's part of
Jifty, the new web development toolkit from Best Practical (creators of RT) and it's a re-imagining of
Despite its history, the public distribution is fairly new and has some rough patches, mostly related to documentation and understanding. I experimented with the latest stable release (0.16) for a couple of afternoons. Here's what I learned.
|Take a look at DBIx::Class - which has schema generation via SQL-T, and has a decent amount of documentation. Multi-way joins are trivial, as are many-to-many and prefetching.|
I just skimmed this article, but some of the earlier code reminded me a lot of my first attempts to play with Class::DBI, before I learned that I could have it figure out for itself what the database looks like. I really hate repeating my database design; is there any way within Jifty to do this automatically?
A, I didn't see a way to make
|Chromatic is correct. The "Jifty Way" is to use Jifty to manage your database schema. Jifty::DBI is very much "the first part" of Jifty (jifty.org) that was made publicly available. When using Jifty, at least a couple of the warts mentioned go away ;) We thought long and hard about whether to even release the module on its own, but enough people asked that we decided to do it. But for something that feels coherent, I'd strongly recommend using Jifty::DBI in the context of Jifty itself|
|Jifty::DBI uses DBIx::DBSchema already, and DBIx::DBSchema does know how to scan and reverse-engineer the schema of an existing database... (new_native and new_odbc)|