CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jeremy D. Miller -- The Shade Tree Developer

Under the hood and working with .Net, TDD, Software Design, and Agile Stuff

Say Hello to Fluent NHibernate

I'll let James Gregory do the introduction for Fluent NHibernate here.  I think this project has a lot of potential to dramatically reduce the difficulties teams face when working with NHibernate.  The initial focus is on a fluent interface mechanism for NHibernate configuration, but I'm hopeful that it grows into the easiest way to use NHibernate

In a nutshell, what if...

  • You could configure NHibernate with Intellisense and zero, I said zero, Xml?
  • You had some easy tooling for testing out NHibernate mappings?
  • You could make significant shortcuts in your persistence mapping by setting sensible project conventions once and only once?
  • You could start with a reference architecture for a Repository?
  • You had sample "recipes" for bootstrapping NHibernate with the common IoC tools?

 

The guys doing Fluent NHibernate are going gangbusters getting this thing ready to go.  Nice job guys.

 



Comments

Colin Jack said:

Good stuff, I'm also very interested in your object-object mapping testing capabilities.

I've thought about doing it myself but couldn't work out how to do it for more complex cases, so definitely interested to see what you guys have produced.

# August 8, 2008 4:50 PM

Brian Johnston said:

As I told James...finally and NHibernate I can get on board with.  For years I've been screaming that XML configuration file != better application - for our team, on the application that we inherited, it result in more production runtime bugs then any other application I had ever worked on (until we got rid of 80% of configuration files and 100% of all the extra interfaces that were created solely for the 'abstraction' of the configuration files).

Anyway, I think this is a great evolutionary step for NHibernate and I'm really looking forward to see this project completed.  My experiences with NHibernate thus far have been nothing but frustration after frustration.

# August 8, 2008 7:17 PM

Ray Vega said:

That is definitely a nice and better way to configure NHibernate instead of the xml files.

On a previous project using NHibernate the xml mapping files were also troublesome, problematic, and even confusing to a lot of the developers on the team. Since we also did not have automated tests on them we usually did not know about any issues with the files until we ran the application.

"XML Hell" is one of the main reasons why I no longer use NAnt for my build files and instead use an actual dynamic scripting language (Python) to handle those tasks.

# August 10, 2008 12:54 AM

Fluent NHibernate « Hendry Luk — Sheep in Fence said:

Pingback from  Fluent NHibernate « Hendry Luk — Sheep in Fence

# August 10, 2008 6:41 AM

Dew Drop - August 10, 2008 | Alvin Ashcraft's Morning Dew said:

Pingback from  Dew Drop - August 10, 2008 | Alvin Ashcraft's Morning Dew

# August 10, 2008 11:32 AM

Brian Johnston said:

'XML Hell'   I love that!   Managers will get that too since they're all too familiar with being burnt by DLL hell a decade ago.   I'm using it!

# August 10, 2008 7:15 PM

Jeremy D. Miller said:

@Brian,

Yeah, but be one of the cool kids and say "XmHell"

# August 10, 2008 7:57 PM

Colin Jack said:

@Ray

Just to say if the project you describe is still around then you can easily verify many aspects of the mapping using this approach:

codebetter.com/.../test-your-nhibernate-mappings.aspx

Ayende has blogged about this sort of thing too.888

# August 11, 2008 4:13 AM

Ross Neilson said:

I concur with all of the benefits outlined above.

However a plus point for the XML config was that, should your column names change, you could update the mappings and everything would keep working, without the need for a recompile. Assuming you were loading the mappings at runtime rather than compiling them into the assembly of course.

Developers using the fluent interface are closing off this flexibility.

# August 12, 2008 3:56 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Jeremy D. Miller

Jeremy began his IT career writing "Shadow IT" applications to automate his engineering documentation, then wandered into software development because it looked like more fun. Jeremy previously worked as a systems architect building mission critical supply chain software for a Fortune 100 company and learned agile development practices as a .Net consultant at ThoughtWorks, one of the pioneers of agile development. Jeremy is the author of the open source StructureMap (http://structuremap.sourceforge.net) tool for Dependency Injection with .Net and the forthcoming StoryTeller (http://storyteller.tigris.org) tool for supercharged FIT testing in .Net. Jeremy's thoughts on just about everything software related can be found on his weblog "The Shade Tree Developer" at http://codebetter.com/blogs/jeremy.miller, part of the popular CodeBetter site. Jeremy is a Microsoft MVP for C#. Check out Devlicio.us!

Our Sponsors

Free Tech Publications

This Blog

Syndication

News

All opinions expressed here constitute my (Jeremy D. Miller's) personal opinion, and do not necessarily represent the opinion of any other organization or person, including (but not limited to) my fellow employees, my employer, its clients or their agents.

About Me

"Best Of" Compendium

StructureMap (Dependency Injection for .Net)

StoryTeller (Supercharged Fit)

Build your own Cab

TestDriven

MVP