Kyle Hayes

Tech, Musings, Life

Why Not to Use ORM

| Comments

After a discussion today with Peter Farrell, I concluded that it was not a good idea to try an mimic an ORM framework if your application or project does not allow to use a pre-built ORM framework. It creates a mess of complications that if not managed automatically by a framework will cause hours, days and months of complications in getting your code just right. Also, just wait til you have to change something.

My team member and I have spend the past couple of months working on a project that involved a fairly complex relational database. No issue, as we had initially decided that we would use the Transfer ORM framework. That was until we realized the complications we would have when using it in our Flex application. And since Bender is still in the very early stages of development it would not work out for us in our environment.

Well after about a month of ColdFusion development pain attempting to write the code to mimic ORM capabilities to represent only a few tables and their relationships to each other, today my team member and I agreed we needed to simplify the design and decouple the components. Now that I think about it, it will be much easier to manage and still very easy to use. We are using Brian’s Illudium PU-36 CFCGenerator to generate all of our CRUD CFCs.

By the way, Brian, excellent job on this generator! It works great!

So the moral of the story, if you are not using an ORM framework (like Transfer) don’t attempt to mock one by building one manually.

KISS.

Comments