ORM
(Object Relation Mapping) is the new automatic memory management. You wouldn’t want to go back to having manage
pointers and allocate and de allocate memory. This is how we advance. The less unnecessary complexity the better. I think most languages and platforms will
eventually have this built in. Rails
provides Active Record which is based on a Martin Fowler pattern of the same
name. Java has hibernate, cocoon and
about a hundred other frameworks most of which have/are being replicated into
the .Net space.
So
if you have a decent database design you can really take advantage of the ORM
to make your life so much easier. Of course
queries can be optimized etc if you need them to be but all of this logic can
be put into the Ruby (Java, .NET) language functions used to query the
database. Things like order by, limit,
sorting can also be specified.
The
nice part is that the schema needs to make sense to be used. The id field is always called “id”. Foreign keys are always named with the
tablename_id so it’s consistent. That’s
the advantage of Rails, there’s so much organization built in and you always
know where pieces of code are going to be, ie models, views, controllers,
libraries, etc.
How
many times have you opened someone’s project and had to hunt around trying to
find what you are looking for.
Why
do we have 2 x 4’s? Wouldn’t it be great
if each carpenter could choose the dimensions of lumber to use for each
project? Why limit the choice?
The
answer is obvious or should be and the same thing goes for software
development. Microsoft has done a great
disservice for developers by not mandating a coding standard which includes
indentation and style along with project organization.
This
is the only way we can continue to handle more complexity; we must delegate
some of it to the computer and use standards.