Wednesday, July 18, 2007

This IS Interesting

From Dr. Dobb's Journal:

Modern object-oriented languages encourage you to see the world through the object lens. Databases get this object treatment through the use of Object Relational Mappers (ORMs). It's entirely natural for an object-oriented programmer to see data as objects, rather than SQL calls. But good 'ol SQL isn't going anywhere. What you want as a programmer is the flexibility to use objects when you want, and SQL when you want, and to be able to do all of this on everything from tiny, lightweight databases to huge corporate data stores. Something perhaps like Storm, the open-source ORM for Python. Recently, Jon Erickson sat down to chat with Gustavo Niemeyer, lead developer on Canonical's Storm project. (emphasis mine)
After messing with LLBGen for the last couple weeks, this hit home hard with me. Now, I'm not necessarily an ORM newbie, but I haven't quite been deep tactical into it. However, I'm a SQL guru... you know, I can breathe out a cross-join or a group by having, and all kinds of other crazy SQL things like that.

When I ran into a need to work with ORM on a deeper level (well, let's just say the need ran into me) I thought it was quite interesting how things played out. Initially, I wanted to write a stored proc that did the whole thing. Us DB folks do that - we think that all the code should be there, and some lightweight web service should call it. And maybe that's the future... but at this time, it frustrated the hell out of me - I knew all the ORMs were already there, so why am I trying to work from the back to the front?

So, I said "screw it, I'm gonna figure this out." This is an existing .NET web app, C#, LLBGen ORM, ASP.NET and the whole M$ 9 yards. So, here I am in there creating some new web services to integrate into our C++ Windows desktop app. And as I got into it, I thought, "yeah, this is cool". I was able to figure it out in a couple of hours, got some things going and finished my web service before the new web design was updated (that's another story for the startup side that we'll get to).

At any rate, I still think there's an interesting play between ORM and straight SQL. For some things, specifically web services, it's great to have a simple way to hit the DB with a straight SQL proc call. Over the years I think most people have gotten to where they can do just about anythin with SQL... although I think we can all agree that we hate cursors.

So, I think some of the tenets of Storm are awesome... maybe something will happen for .NET like this in the NEAR future.

No comments: