Ramblings from the Creator of WilsonDotNet.com
What are your thoughts on Gentle.NET?
Hi Paul, Last time I used an OR mapper for a .NET project was in early 2002 when I ported the IBuySpy Portal to ObjectSpaces using the early beta framework. You should be able to find that still on GotDotNet (under my name David Taylor or DavTaylor). Personally, I am happy to wait for the final release of ObjectSpaces / WinFS. .....you have probably already guessed that I am a very patient man (currently I am assuming a 2007-2008 deliverable).
AJ: Gentle.NET seems good enough, but its too little too late compared with NHibernate. NHibernate, being a port of Java's Hibernate, has more than enough features and documentation, and it also already has a large user base and good stability (maybe great). I probably wouldn't even try to make my own mapper today if I was just starting out, but I started 18 months ago before NHibernate was around. Of course, since mine does exist I am glad -- since I do believe there is a market for simplicity.
David: Not only will you have a long wait, but I think the other mappers on the market have proved that MS OS will never be the best!
Wooh, was he really that upset? I use LLBLGEN, and I have to say I'm definitely a happy customer. It probably took me more than 30 minutes to figure it out initially, though, because I ultimately chose the self-servicing templates with base entities, which isn't the default. As for NHibernate ... I just find it more natural to start with the DB, to go R->O in other words rather than O->R. O->R mappers like nhibernate and wilsonormapper also require you to define your database twice (once in the db and once in the config), thereby breaking the DRY principle. With LLBLGEN's cmdline generator, I might even be able to just vaguely point at the database and say "uh, do that database over there and stick the code here" ... and get a full model with just those two config variables! That, combined with a magic assembly re-compiler, would be even better than Ruby on Rails, whose ActiveRecord is really, really simple, but still requires you to declare the tables and relationships. David: I've only been using .NET for 6 months, and maybe I got spoiled by the scripting world, but I've ended up junking layer after layer of MS-written frameworks. Now asp.net is gone for me, and I reimplemented it in 5 days and 500 LOC without all the negative baggage. Do you really think given their history that objectspaces is going to get even close to the hype?
Steve (and Paul), I was partly being sarcastic with my prior response, I mean....realistically who can now wait until 2007 or 2008 for any project you are planning right now? When I first worked with ObjectSpaces in 2002 (using a beta they released in late 2001) I had assumed it would come with .NET 1.1 in early 2003 (but of course it did not). I think you are being a little hard on Microsoft. I would much rather have nothing now from Microsoft, and use one of the great products available (from Paul, NHibernate, etc) and let Microsoft plan a coherent strategy. The worst case scenario would be for Microsoft to have 2-3 O-R mapping frameworks, and given WinFS is being worked on, it was the right decision to delay ObjectSpaces and try to merge or align the technologies. Can I also give you some advice regarding .NET? This is particularly important if you have come from another background (ie PHP, Java, etc). Programming has been one of the biggest parts of my life since around 1981 and.....over the last 20+ years..... the ASP.NET framework (particularly what is coming with Whidbey) is one of the best frameworks I have ever worked with. Whidbey just fills in lots of areas that were missing from the V1 release. It is just that any framework will seem "wrong" to you if you have never used a framework with similar concepts before.... You need to reset your way of thinking before things start to make sense.
I have to agree with your estimate of the difficulty of figuring out LLBLGen Pro the first time. I've installed the demo twice. Most recently, I generated some code from some simple tables and then used NDoc to create documentation for my code, which I then started reading and trying to figure out how to perform data access. After more than 30 minutes, I still had not had data access. Is this my fault for not looking for examples or LLBLGen documentation? Or should I have been able to figure it out on my own? I don't really think there'e a right answer to these questions. I've written my own data access generation templates with CodeSmith. The entire development team where I work uses my templates because it saves them a ton of time and they are very easy to understand and extend. We aren't elite coders for the most part. Only 20% of us even have CS degrees. But we're good at what we do (making web sites) and these simple templates are good enough most of the time. So I agree with what you said, that sometimes a simple O/R mapper is better than a monstrously complicated one.
Tod: I just started looking at o/r mappers. It sounded cool, but it was/is very new to me. I searched a bit and found Wilson's, LLBLGen Pro and EntityBroker. I installed Wilson's: looked v. simple and reading a bit I found that I was looking for more functionality. Installed LLBLGen and generated some code in like 10 min. I didn't really understand the code just by looking at it so I installed EntityBroker. It installed but didn't work (crashed on db connection - some bug). In addition Thomas acts like he knows everything the rest should live to admire him - not to nice working with people like that on the long run. I droped EntityBroker but I didn't want to give up on o/r mappers yet so I went back to LLBLGen and opened the help - yeh, I know :). After max an hour I understood the generated code and realized that LLBLGen pro is great ...
AJ/PW: Gentle was actually quite useful even before NHibernate matured to a useable state. NHibernate has a nice query facility (an area where Gentle is somewhat lacking), but has improved on many other accounts. I'm probably biased :), but think it's one of the easiest frameworks to understand and get started with. And with the MyGeneration template on top it really takes no time to create a simple but functional DAL - enough for a lot of people.
Just to update the dabases that your Wilson mapper supports.... I use your Wilson OR Mapper with your ado xml provider (ok, slightly modified... and... It's not really a database ;o) Best regards Rasmus Lindgren
Paul,
What is your opinion about EntitySpaces. Is their Dynamic SQL implementation good?
Sorry, but I'm not familiar with an EntitySpaces product. I searched and found what I guess you are referring to, and it appears to be by the same person behind MyGeneration. But I'm not familiar with it, so I can't comment on it.