[Perth] November Session - All In (is tomorrow night)

2 views
Skip to first unread message

Michael Minutillo

unread,
Nov 10, 2009, 1:43:26 AM11/10/09
to ozalt...@googlegroups.com
Details are here





--
Michael M. Minutillo
Indiscriminate Information Sponge
Blog: http://wolfbyte-net.blogspot.com

Xerxes Battiwalla

unread,
Nov 10, 2009, 2:21:54 AM11/10/09
to ozalt...@googlegroups.com
this looks pretty interesting, guys - is there any chance you'd be broadcasting the event using Kyte (or similar service) for those who dont live on the west-siiieeed?

-xerx

Michael Minutillo

unread,
Nov 10, 2009, 2:25:40 AM11/10/09
to ozalt...@googlegroups.com
We don't have plans to do that as I don't have a laptop let alone a portable internet connection. If someone wants to bring one then I'll leave it up to the individual presenters if they want to be broadcast.

I've always been a little hesitant to record these things as I don't want to influence people into not voicing opinions that they think might come back to haunt them :)

Colin Scott

unread,
Nov 10, 2009, 8:28:41 PM11/10/09
to ozalt...@googlegroups.com

I’ve never known anyone at one of these sessions to say anything controversial. About for instance LINQ-2-SQL. Repeatedly.

Michael Minutillo

unread,
Nov 10, 2009, 8:32:22 PM11/10/09
to ozalt...@googlegroups.com
And we stopped bashing SharePoint at least 2 months ago

Liam McLennan

unread,
Nov 10, 2009, 8:33:30 PM11/10/09
to ozalt...@googlegroups.com
What is the opinion on linq 2 sql?
--
Liam McLennan.

li...@eclipsewebsolutions.com.au
http://www.eclipsewebsolutions.com.au

Michael Minutillo

unread,
Nov 10, 2009, 8:38:55 PM11/10/09
to ozalt...@googlegroups.com
It's not NHibernate ;)

Having said that I personally like Linq2Sql and have a tendency to use it when building little personal use apps. 

Liam McLennan

unread,
Nov 10, 2009, 8:39:55 PM11/10/09
to ozalt...@googlegroups.com
I am yet to meet an ORM that I like. Have you guys tried stored procedures?

Colin Scott

unread,
Nov 10, 2009, 9:09:08 PM11/10/09
to ozalt...@googlegroups.com

Someone’s trying to start an argument... I’m of the view (stolen from someone I forget) that not using an ORM in a business app is stealing from your customer.

 

L2S is fine for small things but has definite scalability and other limitations. NHibernate scales up much better, but isn’t as easy to start with. There’s an inflection point where a project would be better using NHibernate, where exactly this is varies.

Liam McLennan

unread,
Nov 10, 2009, 9:18:25 PM11/10/09
to ozalt...@googlegroups.com
Who me? :)

I agree with your comments, assuming that you are referring to linq-2-sql scaling complexity not load. I was disappointed when L2S got canned - I thought it had potential.

Kim Stevens

unread,
Nov 10, 2009, 9:37:24 PM11/10/09
to ozalt...@googlegroups.com
I would say that the inflection point is as soon as scalability (separation of concerns) becomes a consideration. L2S is highly convenient as long as you can live with the tight coupling that comes with it.

Kim

On Wed, Nov 11, 2009 at 12:09 PM, Colin Scott <c...@iinet.net.au> wrote:

Michael Minutillo

unread,
Nov 10, 2009, 9:44:11 PM11/10/09
to ozalt...@googlegroups.com
I suspect that using Fluent NHibernate and Linq2NHibernate negates some of the advantages of L2S anyway. With those two products you can quickly build an abstraction that operates in a similar way to the L2S DataContext and using T4 to create some simple types from a database schema should be fairly easy. Once you have Fluent NHibernate in place you can always start adjusting Conventions or creating explicit class maps eventually moving to full xml mappings if required. 

Of course, I've never tried this but the theory is sound :)

Liam McLennan

unread,
Nov 10, 2009, 9:50:27 PM11/10/09
to ozalt...@googlegroups.com
I think that Automapping takes NHibernate past L2S in terms of what you get for free.

Colin Scott

unread,
Nov 10, 2009, 9:57:58 PM11/10/09
to ozalt...@googlegroups.com

The initial learning curve for L2S is lower, but you can’t go as far. L2S does do some nifty things. I’ve been impressed with some of the queries it produces which are remarkably efficient. And the ability to switch to LINQ-to-Objects can be useful if you want to load the data into memory and run the queries there without rewriting everything. You do need to watch it closely so it doesn’t revert to that behaviour unintentionally though. It’s a useful tool at the low end. I’ll never use it by choice, but for small things I won’t condemn it.

 

AutoMapper rocks muchly, but I’ve used it on L2S projects so I can’t say it’s a point in favour of NHibernate. Things like a mapping strategy that scales to many objects and per query fetch plans are much better arguments.

Michael Minutillo

unread,
Nov 10, 2009, 9:59:47 PM11/10/09
to ozalt...@googlegroups.com
Actually, has anyone on the list gone through that migration from AutoMapping to Full XML Mapping with NHibernate? Was it a smooth transition? Who's using Fluent NHibernate at the moment?

Liam McLennan

unread,
Nov 10, 2009, 9:59:52 PM11/10/09
to ozalt...@googlegroups.com
Not auto mapper, auto mapping.

Kim Stevens

unread,
Nov 10, 2009, 10:09:15 PM11/10/09
to ozalt...@googlegroups.com
Although, automapper is fantastic if you find yourself needing to put a domain in front of L2S :-)

Kim

Liam McLennan

unread,
Nov 10, 2009, 10:26:40 PM11/10/09
to ozalt...@googlegroups.com
I find that you can't use auto mapping without using some fluent api mapping. I have not gone the next step to xml but the fluent nhibernate mailing list implies that doing so is required for some scenarios. 

Paul Batum

unread,
Nov 11, 2009, 12:28:45 AM11/11/09
to ozalt...@googlegroups.com
Well I'm using it, which is hardly surprising :)

Mike, why on earth would you want to completely migrate from automapping to hbm xml? I can appreciate that we don't have full NHibernate compatibility yet and so you might want to use hbm xml for the more esoteric mappings, but you can mix and match the mappings pretty easy. Why would you want to do a full migration?

Michael Minutillo

unread,
Nov 11, 2009, 12:34:07 AM11/11/09
to ozalt...@googlegroups.com
Sorry, the intent probably wasn't clear. I didn't mean to head for full HBM as a goal in and of itself but I presume there are scenarios where Fluent NHibernate doesn't cover. I wondered not just about the integration between HBM and Fluent (which I assume works fine from what I've seen) but also the smoothness of the transition process.

Jonathan Parker

unread,
Nov 11, 2009, 12:50:37 AM11/11/09
to ozalt...@googlegroups.com
AFAIK you can generate the xml mappings from FNH.

Paul Batum

unread,
Nov 11, 2009, 2:49:23 AM11/11/09
to ozalt...@googlegroups.com
Yes you can export the xml generated by FNH to use as a basis for your HBM mapping when you've hit something that FNH just doesn't support. But these xml mappings are extremely verbose so be wary - verbose HBM can be a real pain to maintain.

Ideally FNH would be smarter about how much it spits out into the XML. Can't see us addressing this any time soon though.

Richard Banks

unread,
Nov 11, 2009, 7:01:39 AM11/11/09
to ozalt...@googlegroups.com

I’ve got a project going at the moment where we are using FNH/L2NH and we have a mix of both automapped classes, some of which have overrides, as well as HBM files (for messy things like ternary associations that FNH doesn’t handle too well).

 

It works great.  Here’s what the code looks like when we kick the session object into existence.

 

var model = AutoMap.AssemblyOf<SomeEntity>()

    .Where(t => t.Namespace == "AAA.Entities" && !typeof(IUseHbmRatherThanAutoMap).IsAssignableFrom(t))

    .UseOverridesFromAssemblyOf<SomeEntity>();

 

var sessionFactory = Fluently.Configure()

    .Database(MsSqlConfiguration.MsSql2005

        .ConnectionString(c => c.FromConnectionStringWithKey("ConnectionString"))

        .Cache(c => c

          .UseQueryCache()

          .ProviderClass<HashtableCacheProvider>())

        .ShowSql())

    .Mappings(m =>

        {

            m.AutoMappings.Add(model);

            m.HbmMappings.AddFromAssemblyOf<SomeEntity>();

        })

    .BuildSessionFactory();

 

Too easy!

 

And before you ask, yes, we could’ve decorated our classes with an attribute rather than use an interface for excluding the HBM’ed entities from automapping.  The advantage to the interface approach is that it’s really easy to find all the classes that have HBM mappings via R# (find interface implementers) plus it makes the code  little cleaner to look at since we don’t have to do any reflection to process attributes.

 

Regards,

Richard Banks
CSM | CSP | http://richardsbraindump.blogspot.com | http://twitter.com/rbanks54

Jarred Sargent

unread,
Nov 11, 2009, 10:25:29 PM11/11/09
to ozalt...@googlegroups.com

Was a really good meeting last night and we covered quite a bit of content in a short (except for Adrian ;-)) space of time.  Really got a lot of value from Rhys' Mass Transit presentation.

 

Thanks to everyone who presented :)

 

Kind Regards,

Jarred Sargent
Readify | Senior Developer

Suite 408 Life.Lab Building | 198 Harbour Esplanade | Docklands | VIC 3008 | Australia

M: +61 414 483 208 | E: jarred....@readify.net | C: jarred....@readify.net | W: www.readify.net

The content of this e-mail, including any attachments is a confidential communication between Readify Pty Ltd and the intended addressee and is for the sole use of that intended addressee. If you are not the intended addressee, any use, interference with, disclosure or copying of this material is unauthorized and prohibited. If you have received this e-mail in error please contact the sender immediately and then delete the message and any attachment(s).


Reply all
Reply to author
Forward
0 new messages