By Peter Bell

Bunch of great ORM Links

I was digging around and found a great set of ORM links. Mostly for the .NET crowd so some of the articles are covering basics like the benefits of ORM over SPs, but there were a couple of nice articles.

In particular, one pointed out that you can't escape the complexity. I've programmed basic SQL for years without ever understanding how queries are executed and how to optimize them, but you'll be lucky to use an ORM for a week without getting into trouble unless you understand how the ORM operates and the implications of your choices in terms of the queries generated. This goes even for low traffic sites. It only takes a few users calling a page where you have an n+1 query problem with 500 records to completely ruin your day!

It includes posts on the downside of ORM (along with a good rebuttal and an example).

There is also a good post giving a sense of how much work it is to create a comprehensive ORM a la Hibernate (or in this case nHibernate), but I think Doug and Mark have shown that a modest subset of Hibernates functionality can still have value.

Also an interesting look at how you handle n+1 query problems in nHibernate.

Comments
On the issue of complexity, it's not surprising to find a product like Hibernate becoming incredibly complex. Hibernate has had to adapt itself to a wide variety of paradigms and uses.

We recently launched an ORM tool of our own, called Habanero, and it's been interesting to match up the tool to all the comparison lists out there. We developed the framework to work alongside the applications we were making for clients, and when it came to launch time, we had to stop and think about the many different development styles being used, and whether our framework would be flexible enough to adapt to these.

Perhaps, given the example of bloated systems, it's easier to use a really simple ORM tool that has an open source option, and then to append your own very specific needs onto that?
# Posted By Eric | 8/15/07 9:00 AM
Hi Eric,

Thanks for the comment. For anyone interested:

http://www.chillisoft.co.za/habanero/

Looks like an IronSpeed/Deklarit style application generator to create CRUD UI's as well as providing ORM features.

Looks like the UI definition is within the model definition which is OK assuming you never want to generate n-views of an object . . .

http://www.chillisoft.co.za/habanero/tour/2" target="_blank">http://www.chillisoft.co.za/habanero/tour/2


Nice GUI editor so you don't have to edit the XML by hand . . .

Active record style pattern with your custom business objects extending the Habanero business object class which handles persistence . . .
http://www.chillisoft.co.za/habanero/tour/3

A simple collection of data types for UI controls:
http://www.chillisoft.co.za/habanero/tour/4" target="_blank">http://www.chillisoft.co.za/habanero/tour/4

Looks like a nice project, and for anyone who is interested it is free beta until November.

We do something similar here (http://www.systemsforge.com - my day job!) although our goal is to generate entire applications so we have DSLs to describe screens and controllers as well as rich models with validations, transformations, custom data types, workflow rules, versioning, rollback, auditing, roles based security and a bunch of other capabilities that can be used or extended, but it is always nice to see more people developing these tools!
# Posted By Peter Bell | 8/15/07 11:14 AM
Is your application an ORM? I followed your link and reached a blog - are you developing at the moment with a release in view?

On the issue of UI generation and n-views, excuse my ignorance, but what are n-views? For instance, with Habanero you can define several different ui screens for the same object or you can use a panel generated and mapped by Habanero as part of a larger and more complex screen.
# Posted By Eric | 8/20/07 9:20 AM
Hi Eric,

We have a complete application generator. It includes ORM and a Data Mapper, but also allows for the generation of view and controller code as well as validations, workflows, notifications, etc. We're not planning a release - we just use it in-house so we can generate custom web apps "in minutes not months" for the website development companies we partner with.

By n-views I meant (as you correctly guessed) multiple views (where the number of views is n - an indeterminate integer). I'd missed the ability in Habanero to associate multiple screens to the object - I'd assumed from the structure of the XML that you just described a single view per object within it's XML - should have looked more closely!
# Posted By Peter Bell | 8/20/07 9:36 AM
BlogCFC was created by Raymond Camden. This blog is running version 5.005.