Blog

horizontal line graphic

Subscribe to Kevin Southworth's Blog  Subscribe to my RSS feed | Categories | Search

SubSonic vs. EntitySpaces – A Battle of OR/Ms

Tuesday, January 30, 2007 @ 11:11 PM :: 6591 Views :: 19 Comments ::
Categories: .NET, Software Development, Web Development

I was quite overwhelmed recently when I started researching  OR/M tools for the latest ASP.NET 2.0 project at work.  There are so many to choose from, all with their own unique take on what it means to be a good object-relational mapping tool.  I only wanted to spend a day or two researching/evaluating OR/M tools, and I narrowed it down to SubSonic and EntitySpaces for my final showdown.

SubSonic

I first heard about SubSonic about 6 months ago from one of the many ASP.NET blogs I subscribe to.  The goal of the project is to bring some of the cool RAD tools from the Ruby-on-Rails world into ASP.NET.  One of the nicest features of SubSonic is that it mostly “just works” without too much effort.  There’s no crazy-complicated XML mapping files (I’m looking at you NHibernate…) or mountains and mountains of auto-generated code to dig through (N-Tiers).  SubSonic utilizes a cool feature of the VS2005 and ASP.NET environment called “Build Providers”. All you have to do is make a few adjustments to your web.config file, add a special file to your App_code directory and you’re done!  Whenever you compile/build your VS solution, SubSonic reads your database schema and dynamically generates Data Access classes.

EntitySpaces

I only recently became familiar with EntitySpaces.  A former co-worker of mine really likes the d00dads architecture, the precursor to EntitySpaces.  EntitySpaces takes the code-generation approach, utilizing the popular free code-generation tool MyGeneration.  EntitySpaces is essentially a few .NET dll’s and some MyGeneration code templates.  You load up MyGeneration, open the Entityspaces templates, point them at your database tables, and MyGeneration will spit out a bunch of Data Access and Biz Logic classes in either C# or VB.NET.  My favorite features of EntitySpaces are it Scaffolding support (to auto-generate administration screens for all of your database tables) and its great support for hierarchical data models.

Shot of a scaffold page (notice the drop-down auto-generated for the FK column)

es2_CropperCapture[1].Jpg

SubSonic

Good Stuff

·         Free and Open Source!

·         Easy to get started / mild learning curve

·         Dynamic Queries

·         Strongly-typed wrapper classes for all your stored procedures

·         Active forums, frequent releases

Chinks in the armor

·         Scaffolding support is buggy

·         Doesn’t handle GUID keys very well

·         Weak support for navigating PK/FK relationships

·         Geared towards ASP.NET only (WinForms is possible)

EntitySpaces

Good Stuff

·         Auto-generated scaffolding is very powerful / time-saving

·         Dynamic Queries

·         Very good support for navigating PK/FK collections in code

·         Able to regenerate Data Access code without affecting your custom business logic

·         Serialization of objects for web services, etc.

·         Active forums / support

Frown Face

·         Not free or open source ($80 for Express edition)

·         No strongly-typed access to stored procedures (it is scheduled for next release though)

Final Thoughts

In the end I chose to drop the $80 for EntitySpaces because of its superior Scaffolding and PK/FK Hierarchical support, both of which have been big time-savers so far, allowing me to focus more on the “real guts” of my application instead of Data Access code.  The addition of stored procedure wrappers in the next version will make it even more attractive in my opinion.   However, I’m definitely going to keep an eye on the SubSonic project, since they are adding features all the time.  The biggest things preventing me from using SubSonic right now are the relatively buggy scaffolding support for GUID data types, as well as the weaker support for navigating hierarchical PK/FK collections in code.

Rating
Comments
By Martin @ Friday, February 09, 2007 3:21 PM
Hi

I don't usually post comments on blogs - especially when they're comparing different apps/frameworks etc as I really don't have time to get embroiled in flame wars between camps but thought in this instance I'd take a different stance (and no, I'm not asking to get involved in a "who's best battle" - it's all an individual thing).

I must start by saying that I've been looking at different OR/M's and DAL generators for a while now (a couple of years on and off - watching what's happening really).

Now, my reasons for looking for framework/ORM type providers is simple - I want to concentrate on the elements of my applications that are 'unique' - i.e. the business problem rather than how to a) describe my objects (although I've already had to do this on the DB side) and/or how to deal with persistance/querying etc. While the business objects may differ between projects, the plumbing to get these working shouldn't differ too much (if at all).

Anyway, I've looked at quite a few possible solutions for this aspect (including doodads, NetTiers, LLBLGen, LLBLGen Pro, ORM.Net, RapTier to name but a few) and although they all have something to offer, my final choice (and my buying choice) fell to EntitySpaces and to be frank, I haven't looked back.

As I say, each and every one of the frameworks that I looked at had something very valuable to offer, and my "process of elimination" between them probably taught me more about what I want/don't want more than any other exercise, but when it came down to it, with pretty much everything else other than ES, I always got to a point where I had to work around an issue with the framework.

For example, some have excellent data binding support but lack a decent query API, others are the reverse. Some are built with things like the MS Enterprise Application Blocks in mind and the integration is seamless, others require fudging to integrate etc. The list could go on (for me).

Now, for me at least, EntitySpaces gave me exactly what *I* needed - no huge learning curve which left me to concentrate on what I wanted/needed to, integration with things like the MS Exception Handling Block with little real work, an absolutely excellent query API etc etc. To be frank, there is nothing I've had to try to hack at this point - obviously that may change, but it's just a relief for me as the need for hacks tend to crop up quite quickly using some of the other frameworks I've tried.

To finish, all of the frameworks I've tried have something very valuable to offer, and I'd heartily recommend that anyone go down the route of trying for yourself (given sufficient time of course), but for me, EntitySpaces does what I need without me having to think twice about it and that is what has made it the perfect (and only real) choice for me.

Enough rambling (and apologies for taking up so much room - guess I should share my wordcount between blogs instead of dumping them all in one eh?!)

Cheers
Martin

By Chris Pritchard @ Monday, February 12, 2007 1:11 PM
ES is an awesome tool. For anyone to give it a frowny face for the fact that they charge for it is kinda on the lame side. It is not by coincidence that this is the best tool out there. It could have something to do with the fact that they do charge a nominal fee to use it. I know that is probably a minor complaint, but compared to a tool that needs work arounds from the get go, it seems like a bargain :)

By Nigel Stratton @ Wednesday, February 21, 2007 3:12 PM
First I would expect ES to charge, how else do they put bread on the table so they can keep on coding?

How do I use scaffolding, autogenerating dataentry forms?

By Kevin Southworth @ Wednesday, February 21, 2007 11:55 PM
The point of my post was just to show the pros/cons to each framework, and if you're looking for a free OR/M solution then of course the fact that ES is not free is going to be a con ;) However, I completely agree that EntitySpaces is well worth the price!

As for scaffolding, all you need to do is to download the ASP.NET templates from the EntitySpaces website (it's a separate download from the main ES framework) and then run them through MyGeneration and it'll build out your scaffold pages for you.

By Rob Conery @ Friday, February 23, 2007 1:26 PM
Hi Kevin - a nice write up! Thanks for taking the time to play with SubSonic :). I am always interested to know what people are thinking with their evaluations and it's always of interest to know where the shortcomings are.

In terms of buggy scaffold - some detail might help. I think you might have picked up on some threads in our forums where users were having issues with many-to-many relationships. If not, and you encountered bugs, please do let me know.

Finally - I wish you could have had a chance to play with 2.0, which is due out in 4 weeks. If you're interested in a beta test, I'll happily send along to you :).

Thanks again for the writeup....

Rob

By Kevin Southworth @ Friday, February 23, 2007 2:31 PM
Thanks for the comment Rob! I didn't know there was a SubSonic 2.0 in the works, I will definitely check it out when it releases and post a follow-up to my review here.
Keep up the great work with SubSonic!

By Ricky kay @ Sunday, February 25, 2007 7:55 AM
Entityspaces is good but there is http://www.easyobjects.net/
But even more powerful is nettiers.com
yes you need to but codesmith but i have found nothing in comparison for MY projects. ps i have the following products

llblgenpro2
wilsonormapper
codesmith
mygeneration
subsonic
ado.net vNEXT CTP (microsoft new product)
meremortals framework
strataframe(thinking of buying)


ByMike Griffin @ Monday, January 14, 2008 8:18 AM
From the looks of the lastest post by Rob SubSonic has cloned our (EntitySpaces) DynamicQuery API almost exactly, so you know EntitySpaces is leading the way.

By Rob Conery @ Monday, January 28, 2008 12:17 AM
Cloned? Mike I don't know anything about EntitySpaces and if it was "cloned" it was not intentional. I think both of us value fluent interface SQL.. yes?

By Donna @ Friday, July 11, 2008 4:12 PM
This article is very helpful, but it's now 1.5 years old.

Might you have some updated information on these two?

By Donna @ Sunday, July 13, 2008 7:06 PM
If you do decide to update any of this information, could you please consider including information about:

1. LLBLGen Pro,
2. Opf3,
3. Microsoft's Entity Framework?

Thanks!

Donna

By Donna @ Sunday, July 13, 2008 7:08 PM
By the way, for those concerned...

I contacted Entity Spaces a week ago two different times and have yet to get any response. I have all but written them off in my consideration for an OR/M solution. Anyone else experience this?

By Martin @ Monday, July 14, 2008 3:24 AM
Hi Donna

I'm surprised you haven't had a reply from the EntitySpaces team - they're usually very (very) quick to respond to enquiries/support issues - did you use the support@entityspaces.net email address?

I wouldn't write EntitySpaces off - having had experience of a lot of different ORMs it won hands down for my needs.

Cheers
Martin

ByMike Griffin @ Monday, July 14, 2008 10:34 AM
Donna, sorry about that. On our about page it says "Please do not email us directly for technical support, we have support forums for that purpose" and I realize many probably don't consider their questions to be "technical support" but nonetheless you cannot imagine the mail I still get, had you posted on our forums you would have probably received a response in under an hour. The reason we like to answer questions on the forums is then they are there for others to see.

By Mike Griffin @ Monday, July 14, 2008 10:45 AM
Donna, I did just reply and gave you futher contact info.

ByMark McG @ Thursday, July 31, 2008 11:06 AM
We have been using entityspaces here for quite a while now and think it is fantastic. The small cost of a licence is nothing compared to the time it has saved us on projects. It's fantastic mobile support has allowed us to churn out databases onto Windows Mobile devices that would make quite a few desktop developers quiver in their boots with no slowdowns what so ever.

Hats of to ES!

ByJean @ Tuesday, September 23, 2008 8:16 AM
I've just used Subsonic on a project and this lightweight solution served its purpose very well.

It was also easy to setup and learn quickly. The only feature I needed which it didnt have was creating innner joins in the DAL queries, but I could still use write custoim TSQL stored procedures for that.

Thanks for an awesome ORM Rob!

By Steve Albert @ Thursday, December 04, 2008 5:16 AM
CIALIS -THE KNOWN GENERIC DRUG FOR IMPOTENCE

Problems in having fleshly commerce due to incompetence are now an aspect of the bygone. Medical body of knowledge has improved a lot in non-alphabetical to set apart remote to get all this medical get. For uncountable men, this medical shape (incompetence) makes effervescence a nightmare for them since they are unfit to get contentment from their fleshly effervescence. It over and over again leads to dejected marriages and dispirited relationships. For such men, now there is hope. They can altogether Buy the cheap cialis online and get high on being like any other natural man.

Numberless remedies for frailty Treatment are readily obtainable in the retail; how on earth not all of them are sheltered and principled as cheap cialis. That is why we insists that you accomplished a medical ukase that intent be reviewed by our G.M.C. approved doctor once you on be prescribed Cialis.

Reclusion is entirely critical. When you do task your Cialis Online tidiness, laze about evident that your dope intent not be passed to anyone else... Cialis is a most well-liked remedy that helps ruckus incompetence. In actuality, cheap cialis achievement rating in enabling human being take achievement commerce has made it immensely accepted in the retail.

Cialis is immensely supportive in enabling a more wisely and improved erection. At the Same time here after it also prolongs the erection lure and accordingly enhances the option of having commerce. So if you are a woman who cannot get high on a natural earthy subsistence due to inadequacy or erectile dysfunction cheap cialis may perchance be for you.

Author: Steve Albert http://www.onlinepharmacy.vg/catalog/-c-32_469.html


By Board Smith @ Saturday, December 06, 2008 12:39 AM
Why Men Are tangled to Purchase Cialis ?

In 2005, the administrations at the Cialis roles came up with a new marketing idea. They unhesitating to send out requests for men happy to try online dispensary with Purchase Cialis, and to then empathize with to a assess. They wanted to reach men who energy not already from Purchase Cialis. They unhesitating to send the existence of ss to varied in divers of the less-developed countries. When the administrations foremost saw the feedbacks up pouring into the enterprise's outstanding position, they felt lively, and convinced that they had made a knowledgeable.
.
Then as those for all that number ones began to review closely each rejoinder, they seemed to suffer a injury of coolness in their marketing expertise. From Russia the number ones in the Purchase Cialis positions got more than one embodiment of a the worse for wear-looking boatman. His whisker hung relaxed and protracted at the sides of his head.
He had a protracted mustache on a braid’s face.

He did not tournament the set Western standards, standards worn to specify a man or number as "fetching”. The administrations in the Cialis' roles were conforming. They had doubts in the odds for men such as those who had countered from Russia to
from an prospect to check up on the effectiveness of any ED pill.

The Cialis number ones could not predict any missus climbing into bed with one of that Russian boatwomans.Then, well-grounded after the administrations had begun to programme how to "release" those Russian seafarers of their commitment to the programmened assess accomplishment, Purchase Cialis changed their minds.
A tiro of one official was attending a collaboration college. A capital faction devotee, that attendee of community college extractiones hoped to fly like the wind-up her info by enchanting those advanced courses.

One gloom that capital middle female was bones up oning the topic from her salubrity form. It was a register written by Dianne Hales. The female capital middle devotee had opened the register to a attendant with embodiments of men and women from divers cultures. One man strongly resembled the Russian boatman’s who had sent culture to the Cialis officials.

According to the info provided by Ms. Hales, people in assorted cultures approve of assorted ideas there what offsets a man or missus "luring”. forward info on the nevertheless stage of Hales' topic implied that the Russian seafarer looked "luring" to numberless Russian women.

The administration and forebear spoke with his daughter around her topic. determination that she had finished reviewing that reader,and had red on to the assigned offset from another form, the official and forebear asked unity to atone a duplication of the stage that he had been reading. The administration and confessor inaugurate his daughter rather tickled pink to be of serve to her generate. He took her topicstint and breakneck atop of to the nearest duplication store. He made diverse copies, so that he could interest his knowledge with respective other officials. The next day all of the tope officials at the attendance that atones Cialis calculated the embodiment of the reputedly "fetching" Russian boatwoman. Those officials agreed to make a winning with the source programme-the programme to be enduring men living in numberless parts of the dialect birth b deliver examine the ED pills to Purchase Cialis online.

Author: Board Smith http://www.onlinepharmacy.vg/catalog/-c-32_469.html



You must be logged in to post a comment. You can login here