I'm still twitching in disbelief. Class::DBI may have a lot of dependencies on modules from CPAN, but the interface itself is simple, easy to understand, and easy to use -- especially in the simple case. And I don't need to redefine fundemental constants of the universe in the process.
Javalternative (Score:1)
Remember, Hibernate is a reaction to EJB, which I believe was originally a conspiracy between Pope John XIII and the Byzantine Empire to divide up Africa.
overstating it a bit? (Score:1)
Re:overstating it a bit? (Score:1)
I'm not entirely convinced that
__PACKAGE__->constrain_column(name => qr/\w{1,16}/);
is that much more confusing than their XML, but the constrain_column stuff is fairly simplistic at the minute (interface wise. It's actually designed so that my base class can set up certain things to make it hook into CGI::Untaint in nice ways). I'm certainly tempted to allow:
__PACKAGE__->constr
Re:overstating it a bit? (Score:1)
That was even easier than I'd expected. (Other than perl needing to disambiguate via length()...)
} elsif (ref $how eq "Regexp") {
$class->add_constraint(regexp => $col => sub { shift =~ $how });
|+ } elsif (ref $how eq "CODE") {
|+ $class->add_constraint(
|+ code => $col => sub { local $_ = $_[0]; $how->($_) });
} else {
Tony
Re:overstating it a bit? (Score:1)
Hibernate has many good features. Here are some of the ones I would mo
Re:overstating it a bit? (Score:2)
I'm now beginning to contemplate a strictly bottom-up ORM approach, where you would get this information dynamically instead of by hand.
Actually, I'm starting to think ORM's are an unnecessary layer of goo.
Re:overstating it a bit? (Score:1)
Re:overstating it a bit? (Score:2)
Whatever. I really don't care if Hibernate or Hibernate's docs are making my skin crawl. I've been programming long enough to know that I'm looking for a thin shim that converts application-level concepts into database actions, and that I want that as a single aspect in my codebase. If the Hibernate folks are telling me that I need a full-bore seven layer burrito [pablotron.org] to use their code, I'd rather write my own CDBI-inspired abstr
Re:overstating it a bit? (Score:1)
Re:overstating it a bit? (Score:2)
I've written about three database abstraction frameworks in the last two years, none of which have had a dependency aside from DBI / database drivers. So it is possible, even if it doesn't scale up to handle every degenerate schema on the planet.
That's fine. What I'm looking for is probably outside the scope of what Hibernate is trying to deliver (or, best case, what the Hibernate docs have chosen to focus on). I can live with tha
8hrs > 30 min ? 'bad' : 'good' (Score:2)
I actually *like* the XML file since you can autogenerate the db schema with it, and also autogenerate the pojo's with it. You're right, the docs are very intimidating...but there are some good beginner articles [systemmobile.com] linked from the