Code generator vs ORM

I went to web programming, with its newer languages that lack proper data handling (which leads to the perceived need for ORM) at the same time I built my be-all-end-all code generator. Have never looked back.

One reason I would never consider an ORM is because I actually know how databases work, very well thank you. I don't something to try to make it look like I'm not using a Relational database, I want something to get me the power of the database with as little work as possible -- and that will never be an ORM because that is not what they are about.

In my experience a good dictionary-based generator is the truest D-R-Y programming (Don't repeat yourself), it can free me from the nit-and-pick of working with the DB and allow me to concentrate on what matters, getting good biz logic written on top of a solid table design.

EDIT: Two more points:

1) Going a non-ORM route is, if nothing else, lonely, inasmuch as ORM is so much the rage it is hard to find the people who never needed it and don't see the point. But let your technical judgement guide you.

2) A couple of years ago I wrote a blog entry, "Why I do not use ORM", which I will not link to because it was too inflammatory. After some time I tried again to capture the sense of why it is possible to look at ORM objectively and see no value, without being inflammatory, and that link is: http://database-programmer.blogspot.com/2010/12/historical-perspective-of-orm-and.html


Depends; do you like doing useless busywork with the database, or would you prefer to have it all generated?

Seriously though, for me, there is absolutely no question. Every knew project should start with an ORM, and for me, LLBLGen is the best. It's not free though. But it saves so much time in developing the data layer, and provides a nice structure to work with.

Really, it's a matter of deciding how you want to spend time. If you see value in working in the data layer, because of some series of reasons you can justify, when weighed against something like LLBLGen, then do it. But for me, I do not.

Of course, I agree with you, having to constantly change ORM's is not ideal. So I suggest you spend a bit of time (perhaps a few weeks) determining which one is the best for the style you like to develop in, and the way you structure your projects, and then go for it. Most of the main ways are very well supported these days anyway, so you couldn't be faulted to choosing one of them and standardising it.