Me on NHibernate 3.2

tl;dr No hard feelings. Life goes on. FNH is safe.

So, NHibernate 3.2 comes with a Fluent Interface (sorry Fabio, a “loquacious” interface), fluent configuration, and an externally available alternate mapping in the shape of ConfORM. I made some remarks on Twitter earlier today which kicked up a bit of a storm (one I was notably absent from for the most part). I want to take a moment to articulate my thoughts a bit better, and clear up any misunderstandings.

This is not a coup d’état. I have been approached by the NHibernate guys before about collaborating—three years ago—but I declined. The reasons have been lost in time, but I do feel now that was perhaps a missed opportunity. Since that moment, there’s always been the overarching thought that there would eventually be an official NHibernate code-first interface. And here we are.

There, that should get rid of the sympathy vote and the rage faces. I brought it on myself.

Fluent NHibernate is not going anywhere. NHibernate is notorious for having an obtuse and unfriendly API, and nothing has changed in that respect; there’s still a place for Fluent NHibernate.

There was no way Fluent NHibernate would be merged in to NHibernate Core, before anyone asks. Our codebase is not in any shape to be integrated into anything. I definitely would not suggest that is a good solution to the problem; however, I do think they could’ve spent some time to design an interface which isn’t completely unreadable.

Few people recognise that an API—especially a Fluent Interface—is a user interface and should be designed like anything else the user interacts with. And we all know how good developers are at designing interfaces.

My thoughts now lie in whether there’s the need for me to continue devoting my time to a project which has been made somewhat redundant. By devoting, I mean contributing my weekends or evenings and everything in between.

People have approached me and said “but FNH is so much better!”—and yes it is—but it used to be 100% better than vanilla NHibernate, while now it’s only say 25% better. I could justify the time needed to create a framework that would drastically improve peoples development experience, but can I justify the time for one which’ll marginally improve their experience? That’s a harder sell to the fiancée.

Fluent NHibernate is smaller and more flexible than NHibernate, it’s also more opinionated. I can easily keep ahead with innovative ideas and try experimental things out that NHibernate can’t; however, what’s to stop NHibernate 3.3 or 3.4 from implementing those ideas? Nothing, of course, and nor should there be.

The question is, do I want to be playing a game of cat and mouse with the elephant in the room? (woah, mixed metaphors)

No, I really do not. Competition is only fun when there’s something to gain. If this was a business and my livelihood was on the line, then of course I’d compete, but it’s not; instead, it’s my free time, and I gain time by not competing.

This is a burgeoning thought about my life in .Net in general, but is quite apt for Fluent NHibernate too: Do I continue to neglect my family life, my free time, and my other projects to make life easier for users on a platform—NHibernate in this case—which will inevitably reinvent anything (successful) I do?

I haven’t decided.

All that being said, I like Fluent NHibernate and more-so I like it’s users. Fluent NHibernate isn’t going anywhere, and you have my word I’m not going to just turn the lights off and be done with it.

There are two courses of action, and I’m undecided which I’ll be taking yet:

  1. Put Fluent NHibernate into maintenance mode and progressively hand-over responsibility to the community.
  2. Get my head down and knock out 2.0, and show the NHibernate guys how you should design a programmatic UI

I’m leaning towards the latter.

And that’s all I’m saying on the matter. Too frequent have these clogging of the Twitter tubes been.

I leave you with this thought:

Related Articles:

Post Footer automatically generated by Add Post Footer Plugin for wordpress.

This entry was posted in Uncategorized and tagged , . Bookmark the permalink. Follow any comments here with the RSS feed for this post.
  • Perets7

    Oh please do 2.0 ….just looked at taboos post and …shudder…#notevenremotelysexymapping…or in any way usable for that matter…

    Rather do xml vs that…

  • http://twitter.com/xelibrion Dmitry Kryuchkov

    James, you shouldn’t abandon Fluent NHibernate project. By my opinion, NHibernate offers ugly and wrong way for fluent mappings. Fabio shows us how to put all mappings in one place, but it will not work for not TODO domain model because users will be in hell of maintenance of this single piece of crap. Fluent NHibernate is powerful and I really like its conventions and automapping feature.

    • Anonymous

      It’s not going to be abandoned. Worst case scenario is I’ll find someone else to take the reigns. More than likely, things will remain unchanged.

      Glad you like it.

  • http://darrell.mozingo.net Darrell Mozingo

    I’ll just throw out there that my team has been using FNH since the first drop and love it. The conventions and extension points have allowed us to do some amazing things (compared to previous methods). So I’m not sure how often you get this, but thanks for the hard work. I totally understand the dedication it takes to pump something like this out, and it’s completely appreciated – along with all the other devs on the project. Its made our project go a lot smoother.

    I’ll also reiterate what others are saying – ConfOrm looks like lipstick on a pig as far as fluent interfaces go. It may have been cool 5 years ago, but not so much these days. I suppose it’s all open source and up for future revisions though. The draconian stance being taken with it in regards to getting included in the NH trunk is quite off-putting though.

    Anyway, thanks again again for the awesome tooling!

    • Anonymous

      Much appreciated, thanks for the kind words. It’s people like you that are the reason Fluent is still around and relevant.

  • Pingback: The Morning Brew - Chris Alcock » The Morning Brew #834

  • http://twitter.com/mcintyre321 Harry McIntyre

    I still wish that the library for type-safe configuration looked a lot more like the xml mappings, and the fluent/automapping configurations were layered on top of that.

    I gave up on FNH when I kept having to relearn how to do things, or found a blog post with an unusual xml mapping and then had to go search the FNH mailing list to find out how to do it (and often it didn’t exist). I think I will have the same problem with the new official mapping system.

    If you do work on 2.0, I feel the project should be split into 3 parts

    Typed Nh – just used for building mappings (the semantic model, as similar as possible to the xml mapping for grokking purposes)
    Fluent Nh – provide a saucy interface over Typed Nh for productivity
    Auto Nh – provide a set of automapping defaults

    • Anonymous

      If nothing else, these recent events will allow me to focus more on productivity improvements. The configuration API in Fluent will more than likely be ripped out entirely in favour of NHibernate’s, leaving me with just the important stuff to deal with.

      • Bhoomi Kakaiya

        Is FNH with NHibernate  3.2 released?

  • Valeriu Caraulean

    I do like FluentNHibernate’s API over ConfORM/NH 3.2 code mappings.
    But for me it’s one more dependency to maintain.

    NuGet can alleviate that a bit but only if you’ll keep it in sync with NH package.

    • Anonymous

      It is in sync with NHibernate.

  • http://profiles.google.com/fabiomaulo Fabio Maulo

    If your are looking for the API you was asking not only to avoid XML abut even a little bit more controlled you can check NHibernate.Mapping.ByCode.Impl. If you need something more you please ping me (but don’t cry after I give you what you have asked).

  • http://asbjor.nu/ Asbjørn Ulsberg

    I too just want to throw in my huge bag of support for FNH and the work you do, James. It’s so highly appreciated I become nauseous thinking back to the ugly days of HBM XML or attribute decorations all over the place.

    FNH is the perfect balance of “convention over configuration” that has made Rails so popular and is why I think FNH still has a prominent and important place after the release of NHibernate 3.2.

    While the “loquacious” mapping of NHibernate in itself is nice, it doesn’t replace FNH by any means. It’s rather a new layer FNH can build upon to improve error handling (XSD validation errors isn’t very intuitive; I blame NH on this btw) and decrease code size. Convention-based automapping is still the best way to configure an ORM and that’s where I think FNH shines.

    Please don’t be disheartened by the turn of events, instead be inspired that NHibernate acknowledges the incredible work that has been done on FNH; I doubt this new “loquacious” mapping interface would even exist hadn’t it been for FNH opening the door and showing the way. So please continue opening doors and showing the way. Release FNH 2.0 and set the record straight. Again. :-)

  • http://twitter.com/mattflo Matthew Florence

    +1 for FNH 2.0. As someone just dipping my toe into OSS, I find this public self reflection very insightful. Thanks for all the hard work you’ve put in. Also, what do I know? But consider the possibility the FNH’s user base could grow as a result of all this. People who’ve been slogging it out all these years may suddenly be introduced to a better way and find that FNH’s fluent interface is more pleasurable to use than NH’s.

  • http://profiles.google.com/phillip.haydon Phillip Haydon

    Fluent NHibernate is the ONLY reason I picked up NH again. The new mapping in 3.2 looks terrible, in my opinion.

  • http://profiles.google.com/alec.whittington Alec Whittington

    James
    I have used FNH everyday since the initial version. Sure, it was rough when the API changed, but we fixed our mappings and moved on with little fuss. I could not imagine using NH without FNH again. FNH is the main reason new users find it easy to get started with NH when using S#arp Architecture and we have no plans on taking it out in favor of their API.

    My vote would be for 2.0, pull out the pieces that can be leveraged from NH, concentrate on the rest.

    Keep up the great work – it is appreciated by many users.

  • http://twitter.com/GreKai Kaidanov Gregory

    I’m hopping that you won’t stop developing the FNH – it’s a very good tool ! I’m now building already second project using it to connect to Oracle. It’s very important for people to know that you will not bail out – sort of speak – and enter FNH into a maintenance. The planning of the instuments used in a project also takes under advise a stability of the development and supporting team . The community is good , but the Father of the framework is better :)

  • Pascal Vanvlaenderen

    Hey, Thanks for all your work on FluentNHibernate.
    Your work was the key deciding factor on whether or not to use NHibernate in some of my projects.
    For my NHibernate is a no go if I can’t use FluentNHibernate.

    The only problem I’m now facing is NuGet. I really love NuGet to manage my external references.
    And now I need to use Nhibernate 3.2 (cause of some fixed bugs) and FluentNHibernate which references an older version.

    Atm I’m fixed it by using assembly redirections, but I think others would also be very happy if you could just upgrade your package to use NHibernate 3.2 aswell. Then a lot of people can drop some references.

    Thanks a lot already for your past work.

    Kind regards,

    Pascal Van Vlaenderen

  • http://sardless.com row1

    I have just switched from FNH to NH 3.2 “Fluent”. It feels incredibly clunky and complicated when compared to FNH.

  • Paul Speranza

    I finally got around to looking at upgrading from NH 3.1 to NH 3.2 so naturally I looked to see if FNH supported it. After reading these comments I took a look at what is now built into NH 3.2 wondering how bad it could be. Are you kidding me?? What the hell is that? It is enough to scare anyone away from using NH. When I look at FNH, or Entity Framework and then this Conform thing I think if that is “sexy” then I’d rather be celibate.

    Looks like I’ll be waiting patiently for the new FNH to be released before I upgrade.

    • http://jagregory.myopenid.com/ James Gregory

      haha, no worries. There’s a build of FNH with NH3.2 in Github now. I’m working no updating Nuget as we speak.

  • BigFan

     Hey Greg

    When is FNH version 2.0 coming out? 

    bigFan

  • Rafael

    So…. fluent nhibernate is dead?

    • http://jagregory.com James Gregory

      Nope :)

      • Rafael

        Good news… I really love fluent nhibernate, make our job much more easier.

        Waiting for the next release… :)

      • tor

        james, any word when the next fluent nhibernate gets released.

  • Myri

    I finally managed to get something done with nhibernate, and it’s all thanks to you, FNH and all the people in the community using it and helping out when running into issues…
    So for that, I can only thank you! (and hope FNH will be here for the long haul!)

  • Brad Smith

    Ever thought about making FNH licensed?  “Closer to my millions”, eh?  I mean don’t rake us over the coals or anything, but fair compensation for a hard days work is acceptable by all means.

    • http://jagregory.com James Gregory

      I like you.