Saturday October 23, 2004
06:28 PM
Another OO DB wrapper fails the join test.
So I'm working on
MKDoc and of course it comes with it's own system for avoiding SQL, this one dubbed simply "lib::sql". Now, I'm no big fan of OO DB wrappers, but the rest of the MKDoc code is quite well conceived, I thought this might be worth its (large) weight in code.
Nope. It doesn't even handle a simple two-table join! It's based on the idea that every object will map to exactly one table and that every query will address only that table. Sigh.
-sam
objects spanning tables (Score:2)
Once I have released at tested what I have done so far I plan to emable objects to span tables/joins in a nice way.
All I really need are some good test cases and suggestions for how you would expect the API to work.
@JAPH = qw(Hacker Perl Another Just);
print reverse @JAPH;
Re:objects spanning tables (Score:2)
-sam
Re:objects spanning tables (Score:2)
If your application is object oriented there are several gains from using a OOPF (object oriented persistance framework) such as pre-canned accessors/mutators, persistance, caching, searching and retrieving, much less code to write.
A well designed OOPF stays out of your way and doesn't require your database to become an inpenetrable mess, Class::DBI works nicely with any well structured schema.
@JAPH = qw(Hacker Perl Another Just);
print reverse @JAPH;