If we don't have any default, does that mean that we don't have any proxy gens in the release package?
If configuration is as simple as setting a configuration string (like dialect) that doesn’t sound so bad. However I think it’s important that you don’t have to download a separate package for you proxyGen of choice, some reasonable set of default choices should be included in the distribution so that NHibernate works ‘out of the box’
JP
Since there is a lot of discussion going on today about different proxy generator/ factory implementations I would like to mention a bug that I found when dynamic proxy dependency was removed from NHibernate. I added the bug to Jira but it has not been looked at yet. I wanted to mention it today so that new implementations do not get built with the same bug that does not pass the test which I added to Jira.
http://jira.nhibernate.org/browse/NH-1549
Thanks,
Jesse
From: nhibernate-...@googlegroups.com [mailto:nhibernate-...@googlegroups.com] On Behalf Of Fabio Maulo
Sent: Friday, November 07, 2008
10:26 AM
To: nhibernate-...@googlegroups.com
Subject: [nhibernate-development]
Re: ProxyGenerator: No Default
well.... we can make the "thing" more easy...
How does using Spring or Ninject affect your choice of proxy
generator? You're mixing apples and oranges.
--
Cheers,
hammett
http://hammett.castleproject.org/
> In various projects I'm using Castle but I know that there are a lot ofHow does using Spring or Ninject affect your choice of proxy
> people using Spring with NH others that prefer Ninject and so on.
generator? You're mixing apples and oranges.
Not sure I follow. I might be using Spring or Windsor, they wont
interfere on how NH handles proxies. AOP will be limited to my
services, not domain classes.
The choice of what I'd like NH to use to create proxies (be it DP,
PostSharp or whatever) is orthogonal to my choice of framework stack.
Anyway, I was just curious on the rationale - which seems broken. No
strong opinions.
But as an user, I don't see any advantage in the proxygenerator
becomes an _obrigatory_ config key. I've been using DynProxy for
years, and I'm happy with it, and I'm don't want to change. I think
that should be an default, and if someone want to change, fine, let
him specify the new generator.
My point is: less than 1% percent of the NHibernate user base will
change it. There is no publics and trustable's benchmarks (remember,
I'm talking about ProxyGenerators, not IoC containers). And worst, the
great part of the user base, probably (I said probably), even doesn't
know the implications of change the ProxyGenerator or the diff between
PostSharp and DynamicProxy2.
Btw, I think ByteCode generator isn't a good name or namespace pick.
ByteCode is Java specific term, imho. IL Generator sounds more
natural, for more.
Just my two cents.
Cheers,
Henry Conceição
I think that is the point that Hammet's was trying to explain. Your
IoC framework has nothing related with the NHibernate's proxy
generator. So if the rationale for the change it this, it's wrong or
misleaded. An acceptable rationale is that the users should have the
ability to choose/change a ProxyGenerator of NHibernate, base on him
preferences and needs.
But as an user, I don't see any advantage in the proxygenerator
becomes an _obrigatory_ config key. I've been using DynProxy for
years, and I'm happy with it, and I'm don't want to change. I think
that should be an default, and if someone want to change, fine, let
him specify the new generator.
I wouldn't go with Post Sharp because, afaik, It requires a compile
time tweaks, build hooks. And I don't like this kind approach, but can
recognize that someday, in some situation It might by useful, so an
extension point is nice.
About the dialect: This is a good question. Why not to put it as
default? In the last three years, I delivered only two projects that
weren't backended by mssql.
And btw, be ready to answer the same questions, over a million of
times, no matter how well documented it will be:
"HEELPP!!!!!! PROXY GENERATOR FACTORY NOT FOUND!!!!!" or "URGENT!!!!!
DEADLINE TOMORROW!!!! MY PROXIES AREN'T BEHAVING AS EXPECTED!!!!"
Cheers,
Henry Conceição
My choice? Castle's DynamicProxy2? Why? It's stable for a long time,
had a lot of work spent in optimizations. It's second generation
framework and it's seems to be the industry standard (for dynamic
proxy generation).
And btw, be ready to answer the same questions, over a million of
times, no matter how well documented it will be:
"HEELPP!!!!!! PROXY GENERATOR FACTORY NOT FOUND!!!!!" or "URGENT!!!!!
DEADLINE TOMORROW!!!! MY PROXIES AREN'T BEHAVING AS EXPECTED!!!!"