Land of the ORMs

As many of you know I have made some strong statements in the past regarding ORMs (in fact I’ve probably lost readers over it).  Recently in my day job, I was given two projects that I decided to use an ORM for (and I used different ones each time).  I used the writings of my fellow blogger, David Haydn, to help me settle on an ORM for each project.

Project #1 – CastleProject’s ActiveRecord with MS Access
Yes, you read that right.  I had to use Access with a fairly small web project (this was the client’s spec not mine).  So as I looked around I saw that there was a driver for the Castle Project’s ActiveRecord to use MS Access.  Development went fairly smooth although not necessarily any faster than when I use CodeSmith to generate a DAL (although admittedly, I was still learning the Framework a little).  At the end I did have to do a marathon run of replacing Castle’s ActiveRecord due to Medium (with some custom changes to allow Access via OLEDB) security in a hosted environment… The punch line is that this would have worked, but only the web site could use OLEDB (any assemblies that one was using were not trusted enough to do OLEDB).  All in all it wasn’t a horrible experience.  I would use Castle ActiveRecord again, but I won’t be going out of my way to do so.  I didn’t feel that it bought me much (yeah, being able to query via code is cool… even if you are writing SQL dynamically <wink />)

Project #2 – ActionPack/SubSonic with MS SQL
I had seen a number of people raving about what a time saver this one was as well as the power it gives you.  After watching the 10 minute video of it I was sold.  This was the 1 ORM I could probably use at the corporation where Stored Procs were the only legitimate method for accessing a table.  While I am still on the fence over the generation of SQL statements at runtime, this is the project that might convince me.  The project is not completely done, but I have been able to do quite a bit with a full set of tools.  What I haven’t been able to accomplish with the ORM I have been able to easily substitute in Stored Procs (and use them easily).  I’m using the CodeGen method so I can generate my base ORM/DAL classes and then I have a separate project where I have extended these classes.  I’ve had a couple issues that a recent code refresh has helped me with.  The only weird thing I have really had to do was recompile their source code to get rid of the MySQL driver (since I’m not using that and am not so sure what my boss would say if he saw it in the bin directory of the site).  This has been an awesome experience, and I’m thinking of scrapping my CodeSmith templates because this provides everything that my CodeSmith templates provide me, and provides so much more than what I’m already doing (for instance all collections can accept a DataReader as a parameter for populating the collection; the storedprocs class provides a way to easily execute a storedproc and get a reader; being able to throw together a quick query without having to launch the SQL Server tools has also come in handy… I’m impressed to say the least).  This tool may have converted me…

 [tags: ASP.NET, ORM, SQL Server, C#]

Print | posted on Tuesday, December 12, 2006 8:57 PM

Feedback

# re: Land of the ORMs

left by at 12/13/2006 7:12 AM Gravatar

Take a look at LLBLGen and you would have been ready by now....using the most complete and professional O/R-mapper tool around.

# re: Land of the ORMs

left by at 12/13/2006 12:28 PM Gravatar

Danny,

If the main programmer of LLBLGen wasn't so arrogant (and mean) I probably would have... He's had words with me that were not in the best of spirits, and from what I considered a simple post (that really wasn't all that attacking of the technology... although the later posts did get a little meaner from my perspective).

It's still all about eliminating SQL and Stored Procs which is a mistake in same cases (in my book).

# re: Land of the ORMs

left by at 12/13/2006 1:19 PM Gravatar

I'm a huge fan of Subsonic as well.  However, I'm a little hung up on the fact that it doesn't support web application projects for the code generation.  That, and my particular host, GoDaddy, has problems with the INFORMATION_SCHEMA view that SubSonic tries to use.

I have shied away from starting other projects because I want to use an ORM as fully featured as SubSonic.

# re: Land of the ORMs

left by at 12/13/2006 4:54 PM Gravatar

.netTiers Rocks. I haven't had any issues with it.  The learning curve is there, but probably gets you by far the framework features around.  If you know 2 shakes of anything, you shouldn't have issues.  Their typed datasource controls and typed winform/web controls are awesome to say the least.  CAB is supposedly coming along as well, and takes the developer experience to a killer level.  Working with typed information at the control level is a blessing.  It's a must have for our team.

# re: Land of the ORMs

left by at 12/13/2006 9:32 PM Gravatar

Check out Paul Wilson's WilsonORMapper. It's great and he's a great guy.

# re: Land of the ORMs

left by at 12/13/2006 9:37 PM Gravatar

Ok, ok...

This was not an invitation for everyone to list their favorite ORM... I still am an unbeliever, but I thought I would share that I'm being wooed by the dark side (a little... not much).

The solutions where I built the Data Access still feel a little more comfortable to me (I know that they work and that they work well)

# re: Land of the ORMs

left by at 12/15/2006 1:47 AM Gravatar

Jay,

I can say that Frans is very defensive of LLBLGen if you have any criticisms of the product.  I used it a couple of years back and while there were features that I really loved, overall i had a miserable experience with the product once our application went live and into maintenance.  I'm afraid i got into a flame war on ASP.NET forums shortly after i tried his product.  I was looking for other O/R Mappers and i criticised his approach and many of the bugs he had.  I know his product has improved a lot but I just NEVER could get it.  I just don't like Frans' appraoch to ORMing.

We've used NetTiers and Wilson ORM and both are good products and  are running successfuly on several of our production apps.  They don't have as many features as LLBLGen but they seem to work better and are easier to understand and use.  I'll have to try Sonic though as it looks very promising.

Fregas

# re: Land of the ORMs

left by at 12/15/2006 11:16 AM Gravatar

Fregas,

The problems I had with Frans was it was like he came and picked a fight with me over a generic ORM commentary.  I hadn't singled out his product nor had I even attacked it.  I, historically, have used CodeSmith to generate a DAL that exclusively uses Stored Procs, and at the time was really saying what does an ORM buy me.  Honestly, I would say the same types of things tpday...

Frans started off by accusing me of NIH (Not Invented Here) syndrome, and then tore at me from there.  As a result I think his overall approach to me did the opposite, I'm even more dubious of the technology.  Whenever a programmer says they are smarter than me and that there way is the best way (with no real backing), I see a number of co-workers from my past... all of whom were not as good as they claimed and tended to be hiding the fact that they couldn't back up the claims.  I'm not saying this is true about Frans or ORM technology ('cause well... read the post again), but I still feel that those plugging them are making claims that aren't totally true.  

The real problem I see is that ORM technology is a technology tends to provide a deep object model.  If you plan on using one you'd better learn it before you try to use it, and you'd better keep the number of ORMs you are using down to a minimum because there are way too many object model's to remember.

BTW, I also have DevExpress' ORM available to me and felt that it bought me nothing.  I'm still generating both DB and classes, so in my mind my CodeSmith Templates are light years ahead.

I also have access to a couple others that I haven't tried yet (and because of the rule about learning the technology I migth not do more than dip my feet in)

# re: Land of the ORMs

left by at 12/21/2006 1:17 PM Gravatar

I know Frans as a very straight guy with an awful lot of knowledge about O/R-M's and .NET development in General. He definitely can be very explicit about certain things, but mostly.....he knows what he's talking about so if you've had a bad experience with him, it must have had a reason.

Danny

# re: Land of the ORMs

left by at 12/21/2006 2:30 PM Gravatar

I'll find the link for you, but the truth is I think I may have caught him on a bad day, but at the time he was very antagonistic (something I've been told he does from time to time).

By no means am I saying he's not smart... just that I really felt I was attacked for a comment not too unlike what I said here (I've actually made stronger prior statements and in that particular exchange I made the strongest statements I've ever made in response to the attack).

I'm not a TDD guy (I test I just don't do TDD), and have worked in large corporate environments... ORMs make a little less sense when you aren't doing TDD or are in a corporate environment where the servers and databases are managed maintained by a different team (hence Stored Procs are essential for those folks to find your SQL so it can be tuned).

# re: Land of the ORMs

left by at 3/17/2007 8:33 PM Gravatar

Jay, don't forget that Frans isn't a native english speaker. He native language tends to translate into a style of english that comes across as abrasive even when he doesn't intend it to be that way. Basically, Frans is a very nice guy who often gets misunderstood. He is certainly not mean. He is also open to criticism.

I didn't stop by here to defend Frans. I came because I'm looking for a comparison of Subsonic vs. LLBL Gen Pro... I'm still searching...

Title  
Name
Email (never displayed)
Url
Comments   
Please add 2 and 5 and type the answer here: