SubSonic vs. EntitySpaces – A Battle of OR/Ms
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](/Portals/0/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.
| 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?
|
|
|
Click here to post a comment |
|