Search the web
Sign In
New User? Sign Up
altdotnet · Alt Dot.Net Discussions
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
A fluent interface to NHibernate   Message List  
Reply | Forward Message #13294 of 23355 |
A new step-by-step guide on how we can implement the mapping in
NHibernate via a fluent interface (instead of unbeloved XML) is
available at

http://blogs.hibernatingrhinos.com/nhibernate/archive/2008/08/11/a-fluent-interf\
ace-to-nhibernate.aspx


this fluent interface is base on work done by Jeremy Miller and others
and is now available as OSS on Google code

as usual, any comments and suggestions are appreciated




Tue Aug 12, 2008 5:34 am

g.schenker
Offline Offline
Send Email Send Email

Forward
Message #13294 of 23355 |
Expand Messages Author Sort by Date

A new step-by-step guide on how we can implement the mapping in NHibernate via a fluent interface (instead of unbeloved XML) is available at ...
Gabriel Schenker
g.schenker
Offline Send Email
Aug 12, 2008
5:34 am

... It's an interesting approach. But doesn't this mean that you have to recompile for any changes to the mapping file? -- Cory Foy http://www.cornetdesign.com...
Cory Foy
cory_foy
Online Now Send Email
Aug 12, 2008
6:03 am

Indeed ... But you will also have to if you use ActiveRecord, or if your hbm files are compiled as an embedded resource (which they nearly always are) ... The...
Casey Charlton
caseycharlton69
Offline Send Email
Aug 12, 2008
6:16 am

There is nothing to say you couldn't fire up a csharpcodeprovider and compile the code at runtime into an in memory assembly if you wanted to. ... -- It is the...
Greg Young
gumboismadeo...
Offline Send Email
Aug 12, 2008
6:21 am

What bothers me is that this is in exact opposite to the way I want to work in most cases.How do I specify rules for _all_ my entities?...
Ayende Rahien
Ayende@...
Send Email
Aug 12, 2008
6:23 am

Hi I'm intrigued what do you mean by this? ... I've never done this, and wonder when or why you would. Cheers Andy ... -- ================= I-nnovate Software...
Andrew Stewart
andrew.stewart@...
Send Email
Aug 12, 2008
9:14 am

Imagine something like: public class MyMappingGenerator : MappingGenerator { // another approach would be IEnumerable<Assembly> GetEntitiesAssemblies() public...
Ayende Rahien
Ayende@...
Send Email
Aug 12, 2008
1:19 pm

this seems to be a very advanced scenario. In my opinion most of the NHibernate devs will never reach this territory......
Gabriel Schenker
g.schenker
Offline Send Email
Aug 12, 2008
2:37 pm

Once you get this working, it is anything but advance.It is also extremely simple and easy to deal with for the project as a whole....
Ayende Rahien
Ayende@...
Send Email
Aug 12, 2008
2:38 pm

seems to be an interesting topic for a future post on the NHibernate blog......
Gabriel Schenker
g.schenker
Offline Send Email
Aug 12, 2008
2:42 pm

While that may be the case ... In three projects using nhibernate, I have yet to need anything more than the most simple of mappings ... XML was used on two...
Casey Charlton
caseycharlton69
Offline Send Email
Aug 12, 2008
3:45 pm

That really depends on how complex you model is, indeed.For most apps, using AR is a natural choice, because it takes care of a lot of the boring details. ...
Ayende Rahien
Ayende@...
Send Email
Aug 12, 2008
3:53 pm

I agree that the Fluent example given, without using conventions, would be a point of friction for most of my applications. As mentioned earlier though, the...
Robert Ream
knisspea
Offline Send Email
Aug 12, 2008
4:06 pm

... Yes, once you are ready to deploy. But when you are tweaking... But I do like the readability and testability of this. ... Actually, I disagree. I've...
Cory Foy
cory_foy
Online Now Send Email
Aug 12, 2008
6:54 am

So you make modifications without stepping through a build server?...
Simone Busoli
simone.busoli
Offline Send Email
Aug 12, 2008
7:06 am

I'm open minded, but let me check understanding: - This would be aimed at people that do not want to use attributes (presumably because they feel they have not...
Ian Cooper
ian_hammond_...
Offline Send Email
Aug 12, 2008
8:32 am

You've nailed it. On Tue, Aug 12, 2008 at 9:32 AM, Ian Cooper...
James Gregory
hypnodyno
Offline Send Email
Aug 12, 2008
8:35 am

... What interests me most is the conventions you're baking in, that's what (for me) could be the killer advantage over XML. However I haven't seen much...
Colin Jack
colin.jack
Offline Send Email
Aug 12, 2008
9:57 am

We haven't tackled it properly yet, that's probably why you haven't heard much. We're focussing on getting all the main features into the API for our first...
James Gregory
hypnodyno
Offline Send Email
Aug 12, 2008
11:12 am

Indeed ... my choice would be the same as for Windsor ... a) Use the XML configuration ... not compiled so no type safety, very verbose, a lot of flexibility ...
Casey Charlton
caseycharlton69
Offline Send Email
Aug 12, 2008
11:52 am

Hi Simone, Are you suggesting that your coding cycle is Write a test, run the build server to see it fail, make the test pass, run the build server, etc? Cory...
Cory Foy
cory_foy
Online Now Send Email
Aug 12, 2008
11:15 am

Of course not. Tests are run locally before checking the changes in. What I meant is that tuning does not exist, before going in production you must pass...
Simone Busoli
simone.busoli
Offline Send Email
Aug 12, 2008
11:27 am

... Just an extra step. I'm not suggesting that one is better than the other. Just that they serve different needs. If this were a dynamic language instead of...
Cory Foy
cory_foy
Online Now Send Email
Aug 16, 2008
1:39 am

How do you do conventions with XML today? I'm not aware of a way to do this. Maybe AR has this, but then you have to, you know, use AR :). Fluent NHib has...
Chad Myers
chad.myers94
Offline Send Email
Aug 12, 2008
12:53 pm

The primary reasons we did it were: - no persistence-related attributes on our domain - allow strong-typing and R# refactoring support Currently, neither AR,...
Chad Myers
chad.myers94
Offline Send Email
Aug 12, 2008
12:58 pm

Seems like a pretty cool alternative to ActiveRecord. My only comment is that this approach reeks of the "Feature Envy" smell. This is unavoidable with NH,...
Brian Genisio
briangenisio
Offline Send Email
Aug 12, 2008
1:38 pm

You could do that with the convention support in Fluent nhib. It's not baked in yet, but it's not difficult to do. ... From: Ayende Rahien <Ayende@...>...
Chad Myers
chad.myers94
Offline Send Email
Aug 12, 2008
1:43 pm

Can you show me a sample?...
Ayende Rahien
Ayende@...
Send Email
Aug 12, 2008
1:48 pm

Correction: ITypeConvention does not loop through every type, only the types you've told Fluent NHibernate about. It'll then loop through al the properties on...
Chad Myers
chad.myers94
Offline Send Email
Aug 12, 2008
2:07 pm
First  | < Prev  |  Last 
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help