I like interface but I'm pragmatic too...Use virtual and be confident about the work of your team (btw check it if you have some terrible young junior).
2009/2/12 Graham Bunce <[email protected]> > > Hi, > > Just trying to get some general feedback. When implementing NHibernate > aware classes is the general advice to use Interfaces or Virtual? > > From other posts, I know Fabio likes Interfaces ;-) but to code EVERY > class with an interface seems a bit like "architecture gone mad", > especially if that class is never used outside its layer. I could use > virtual, but there are potential problems with that as well when > inheritance is used (base constructors calling other methods etc.). > > I've done both in my trials and I seem to have to make more design > compromises with virtual (I can't seem to have private empty > constructors, they have to be protected). > > I'm using 2.0.1GA for a project due in March (so I can't go with > 2.1.0) but, as I'll upgrade as soon as 2.1.0 goes to GA, which way > seems to be the preferred method and will be better supported in > future... interfaces? > > > -- Fabio Maulo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nhusers?hl=en -~----------~----~----~----~------~----~------~--~---
