Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 19, 2007 10:18 AM by Syndra
Jul 19, 2005 03:27 PM|LINK
My company is currently evaluating O/R Mappers (again.) The two that interest me the most are NHibernate and Paul Wilson's. Paul, I know what your vote will be so you don't count. :)
We're currently using CSLA with custom codesmith templates but it is pretty slow going and error prone. There's a LOT I don't like about CSLA. We have recently looked at IdeaBlade but it does NOT support identity columns which is a problem for existing databases
and very non-intuitive at the DB level. Also there is no inheritance or collection support. Another one we've used on a project is LLBLGen Pro. LLBLGen was ok until we found a bug where if you access a property, and the record represented by the property
does not exist in the database, LLBLGen instantiates a new object for you in the object model. However, when you go to save, it actually tries to save this new, "Blank" object as a record, which then throws a very obscure error later on. This happens constantly
with LLBLGen and is really annoying. LLBLGen actually did do a lot for you, however it was complicated to use, did not store the mappings in a XML or otherwise human readable file (which made comparison in source control impossible as well as copying and
pasting mappings from one file to another impossible) and did not support inheritance. Finally, we are also looking at NetTiers, which is a codesmith template. However, the newest version uses Enterprise Library, which throws xcopy deployment out the window.
It also does not support inheritance straight out the box although you can modify the templates mabye.
So in summary, we're looking for an O/R Mapper that supports the following:
-Inheritance (Amazing how many do not do this!)
-XML mapping/configuration file
-Preferably open source (or the ability to purchase the source code)
-Writes most SQL for us (preferably thru strongly typed queries)
-Ability to write custom sql if necessary
-Would prefer the ability to generate both business objects AND collections.
As far as Paul Wilson's and NHibernate, they seem to support most of this. Has anyone used any of these in an enterprise level, production app? I'm not taling a proof of concept or demo app, but a real production web or windows application that is currently
in use. If you have, what were your experiences like? How much time did they save? How many other problems did they cause?
Finally, has anyone successfully used any other OR Mappers that support these features?
(Thona need not apply.)
Jul 19, 2005 04:49 PM|LINK
Jul 19, 2005 07:03 PM|LINK
Jul 19, 2005 07:12 PM|LINK
We are in the process of writing several production applications that use XPO from DevExpress. It supports all of your listed requirements with perhaps that it doesn't currently generate classes from an existing database. However, there are plenty of other
tools that can do just this. We've had good success with XPO so far. It has been extendable whenever we have a requirement that isn't built in directly. It is an intrusive mapper, though, meaning your must inherit from a base class or implement an interface,
but many other mappers are likewise. I would also suggest checking out Versant's mapper as I've heard good things about it, though I've never used it...
Jul 19, 2005 07:50 PM|LINK
Jul 19, 2005 08:07 PM|LINK
Jul 19, 2005 08:36 PM|LINK
Jul 19, 2005 10:00 PM|LINK
I've used NHibernate a number of times and am quite pleased with it. However, the difference between an O/R mapping framework (like NHibernate) and code generation tools (like CodeSmith) is exactly where your list of requirements hits a bump. O/R mapping frameworks
do not generate code, and therefore will not "generate both business objects AND collections". Also the "ability to write custom sql" is more interesting in terms of what use case it which it will be involved than how to do it in a specific tool. Reporting
is a common case that brings out that kind of requirement. But, reporting does not need to run on an O/R mapping framework. Hell, it isn't even object oriented.
Why do you need to find a single tool to do everything? Use CodeSmith for code generation. Use an O/R mapping tool for Domain Model persistence (or more). For reporting do something else. Most of the problems I find in projects where 3rd party components are
used is that the developers try to do absolutely EVERYTHING within the boundaries of the product. There really is only one tool that COULD be flexible enough to handle anything, and that tool is Visual Studio.
Jul 20, 2005 12:40 PM|LINK
Jul 20, 2005 01:52 PM|LINK
WORM definitely gets my vote. We have used it in multiple enterprise apps and a couple of websites (all of which are still running just fine with no hint of issues from use of the maper) and it is just so easy and quick to use. It does everything that you
ask for. So does NHibernate, but the reason that we use WORM and not NHibernate is that NHibernate is just that little bit more complex that would make it less useable for us when compared to WORM.
Versant, aaahhhh, Versant. Brilliant products from that company (FastObjects just blew me away) and VOA.NET really captured my attention, but, alas, duing our testing of it we hit nothing but problems. Strange undocumented exceptions and a very unintuitive
approach to developing with the product (this could probably be overcome by experience though). I am absolutely positive that, in time, this will be a GREAT product. But not right now. It needs more testing and user feedback.