Tell me which O/R Mapper is your favorite and why. I'm using Paul Wilson's O/R Mapper, and It's been great so far but my needs are growing as projects become more complex. Is there anything new going on in this arena, or is LLBLGen Pro and EntityBroker still
the top two?
Thona will flame me. I respect his knowledge and his product, but here's my two cents. First off, I don't have a comparison matrix. I still highly suggest LLBLgenpro though as it has a lower learning curve. I think thona's Entity Broker has more features, but
it's also more difficult to use. And if you're like me, you've got to have solutions quickly... and using an O/R mapper needs to be a quick and easy process, with minimal learning time and maximum efficiency. I think that Frans Bouma's product is superior
when the requirements listed above are high on your priority list. I feel as though Entity Broker would perhaps offer more advantages if you had the time to learn it, and deal with its idiosyncracies. The new entity broker might be awesome, but it's still
in the early stages of development and therefore it's difficult for me to say. Frans is building a new LLBLGenpro as well (I assume to coincide with the release of asp.net 2.0). I feel as though llblgenpro will give you everything you need and is a major leap
over writing your own data access layer. Plus you can go from relational model to compiled object model in less than 5 minutes. That's pretty cool. Cheers, -a
I would say LLBLGen Pro and EB are the top two getting exposure on this board. Whether or not they would be considered the top two best is questionable. I believe LLBLGen uses DataSets and anything using DataSets in my book loses big marks. One problem I had
with EB was that it lacked Oracle support. However I believe it supports that now. A couple to look into include
DataObjects.Net and
Genome.
Almost all mappers mentioned in this forum are too complicated. By that I mean that the syntax and API are not clear or intuitive enough for me to be able to understand and use within an hour or so of experimentation. (especially DataObjects.Net and Genome).
On the other end of the spectrum is the Wilson OR Mapper, which IMHO has the best interface for the "average" developer with beginner to intermediate OO knowledge - at a price of more advanced features such as a decent query engine and support for all but
the simplest inheritance. (but maybe it'll evolve....) The big two mentioned above (EB and LL) do a good job of being easy (intuitive) to use and having powerful features, which is why they will remain popular. Another thing that is attractive about Wilson's
is that it is the most "non-intrusive" or mapper I've see so far - no "PersistentObject" base classes. In fact the business objects do not need to have any reference the the mapper itself, which is how it should be. (Yes you need to use the ObjectHolder for
lazy loading of to-one relations, but that's a questionable need in many cases.)
Here are some CodeSmith templates. These may not qualify as O/R Mappers, but they are very helpful, and FREE :)
Data Layer This little friend is very similar to a business object model defined in a Wrox's book, but with many nice enchancements. This script will generate standard CRUD Stored
Procedures, plus several kind of lookup stored procedures based on defined foreign keys (Customer_GetByCompanyID, Customer_GetByTaxID, Cusotmer_Find, ect ect). It will also create C# Table Objects, Row Objects and Collection objects to hold everything. The
objects will even have sub-collections. Example: Company collection can have a Employees collection in it, although you have to manually load. It comes with a simple transaction manager, and all your DB activity can be wrapped in a transaction. All your Table
objects have neat methods like .Insert, .Update, .GetByXXX, .Find, and so one... Its really pretty good, but you kind of have to build your own Business Layer around the generated code if you really want to take the bull by the horns. The script has a few
small bugs (I fixed them on the version I downloaded), and you may have to tweak some of the generated code a bit.
Stored Proc Wraper with MSDAAB support This guy creates all your CRUD stored procs, plus a few simple FK lookup stored procs (not as many as the one above..bu it is still very nice.
It then has a second script you run that creats C# wrapper code for the stored procs. It will actually create C# wrapper code for any stored proc you tell it to, not just the ons it generated. Its really pretty good. What it produces is good enough for most
small applications, and if need to take things a step further you can handcode a small business object layer to sit on top of it.
::Here are some CodeSmith templates. These may not qualify as O/R Mappers, but they are ::very helpful, and FREE :) You fail also to mention that they are useless. They basically are not O/R mappers. It is not that they do not qualiy as O/R mappers. THey are
- sorry - stupid inflexible DAL's. Missing are, among tons of other things: * Inheritance (i.e. the ability to work with OBJECTS, not structs). * Query subsystem. Sorry, "GetByCompanyId" is about as idiotic as it can get. How about "get me all customers having
open invoices" They are a nice step forward, but anyone putting something like this into the foundation of his architecture should seriosuly get a beginner book into architecture of persistence layers - and read the first chapters on what a persistence layer
should provide ans why.
Contrary to Thona Theory (you know the one where Thona is right and nobody else knows what the hell they are doing), I believe these templates are a decent starting point. You see the great thing about
CodeSmith, and unlike most O/R mappers, is that YOU, the developer, have control over the output of your templates and hence control over your own architecture. While I do believe that EntityBroker is a good
product, I hate the thought of being locked into any particular architecture, any particular way of doing things, and I really hate the thought of being dependant on someone else to make a change to their product to better suit my needs.
CodeSmith focuses on enabling as many code generation scenerios as possible and not on trying to dictate any particular architecture.
Eric J. Smith
Chief Software Architect
CodeSmith Tools, LLC
http://www.codesmithtools.com
sjmueller
Member
359 Points
73 Posts
Your favorite O/R Mapper?
Jul 30, 2004 08:05 PM|LINK
thona
Member
20 Points
2923 Posts
Re: Your favorite O/R Mapper?
Aug 02, 2004 07:18 AM|LINK
Bluemagics
Participant
1955 Points
391 Posts
Re: Your favorite O/R Mapper?
Aug 02, 2004 01:59 PM|LINK
boyd5
Participant
1033 Points
226 Posts
Re: Your favorite O/R Mapper?
Aug 02, 2004 10:59 PM|LINK
Systems Architect
JOAC
Participant
1880 Points
376 Posts
Re: Your favorite O/R Mapper?
Aug 05, 2004 04:58 PM|LINK
ALFKI
Member
448 Points
98 Posts
Re: Your favorite O/R Mapper?
Aug 05, 2004 09:24 PM|LINK
BrandonC
Participant
1290 Points
258 Posts
Re: Your favorite O/R Mapper?
Aug 07, 2004 03:05 PM|LINK
thona
Member
20 Points
2923 Posts
Re: Your favorite O/R Mapper?
Aug 07, 2004 04:11 PM|LINK
BrandonC
Participant
1290 Points
258 Posts
Re: Your favorite O/R Mapper?
Aug 07, 2004 04:38 PM|LINK
ejsmith
Member
79 Points
17 Posts
ASPInsiders
Re: Your favorite O/R Mapper?
Aug 09, 2004 06:48 PM|LINK
Chief Software Architect
CodeSmith Tools, LLC
http://www.codesmithtools.com