Re: Re: Re: [newbie] Spring vs Hivemind

2006-11-22 Thread Sam Gendler

We use Spring 1.2, but long ago wrote our own subclass of
ApplicationContext that will grab context override files from
elsewhere (including the local filesystem rather than the classpath).
It offers pretty much the exact functionality you are looking for.
I'm sure it can be applied to spring 2.0 as well.  It lets us have a
default config defined in the application context which works on
developer machines, and then have overrides that live in app context
files on the local filesystem in production boxes.  Any bean defined
in an override file will automatically replace any bean of the same
name found in the application context that would be loaded without the
override.  You can also provide totally unique beans in an override
context. This allows us to drop a developer build directly on a
production machine and the production overrides will be autodetected
and utilized. It probably isn't quite as flexible as hibernate's
mechanism, but it is flexible enough for our use cases.  I can talk to
the lawyerly folks about whether I can make it public if you'd like.

One cute little thing we do with it is to override the name of the CSS
files that get used.  This allows us to have a look and feel that
makes it abundantly clear you are not in a production environment (the
color scheme is pink and lime-green unless you have a production
override).  I'm sure hivemind would give us a more elegant solution to
the same problem(or at least a built-in solution to it), but then I'd
have to know more about hivemind, something I'm trying to avoid, since
we've already got enough frameworks that I have to be expert in
(tapestry, spring, dojo, hibernate, quartz, j2ee, etc).

Honestly, if you can get away with just using hivemind, then I'd
recommend it, if only becuse it will be one less framework you need to
deal with, which is probably a good thing.  But if you must have some
of Spring's features, then my strategy of minimizing our dependancy on
hivemind has worked out very well for us.

--sam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: [newbie] Spring vs Hivemind

2006-11-22 Thread Daniel Tabuenca

No, I believe this is the main positive hivemind has. It would be nice
if spring had a hivemind-like configuration system. One thing that
I've been trying lately is the spring-annotation project found here:
https://spring-annotation.dev.java.net/ It basically lets you fully
configure your beans using annotations which are then automatically
read by spring. Of course some argue that this goes against the spirit
of dependency injection since you then hard-code your dependencies in
the form of annotations. However, for most people, this is just what
they need. I agree with the  it really should be
the default and would be much nicer if it were in option in the actual
bean definition such as proxy="true" or something like that.



On 11/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

Thanks for the pointer! That's looking quite cool. My only complaint is
that you obviously have to remember to put " " inside
each bean with a non-standard scope. If this was available a year ago,
I'd have considered Spring - though I still like the HiveMind XML
notation better.

Sorry for asking instead of reading the docs: But can Spring 2.0 also
pull together its config from different jars on the classpath like
HiveMind does?
Or do you still need to have a "master application.xml" and and do
manual includes?

> -Original Message-
> From: Daniel Tabuenca [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 22, 2006 10:18 AM
> To: Tapestry users
> Subject: Re: Re: [newbie] Spring vs Hivemind
>
>  Spring 2.0 has singleton/prototype/request/session/global
> session/ and custom scopes. It should be noted that spring's
> prototype scope is different from hivemind in that an object
> is created every time a referencing dependency is set or when
> one requests it directly via a getBean("beanName"). In this
> sense spring acts more like a factory returning configured
> objects unlike hivemind which returns a proxy which creates a
> new object on each method invocation.
>
> Spring also has the concept of target sources which is
> basically equivalent to hivemind pooled service models and
> also allow lets you do hivemind-like prototype proxies.
>
> Here are the references to the docs if anyone is interested:
>
> http://static.springframework.org/spring/docs/2.0.x/reference/
> beans.html#beans-factory-scopes
>
> and
>
> http://static.springframework.org/spring/docs/2.0.x/reference/
> aop-api.html#aop-targetsource
>
>
>
> On 11/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > No, Spring has only prototype and singleton Beans afaik.
> > HiveMind has threaded/pooled service-models which can easily be
> > extended (Honeycomb does this to implement session-per-conversation
> > based on a "stateful" service-model).
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re: [newbie] Spring vs Hivemind

2006-11-22 Thread Marcus.Schulte
Thanks for the pointer! That's looking quite cool. My only complaint is
that you obviously have to remember to put " " inside
each bean with a non-standard scope. If this was available a year ago,
I'd have considered Spring - though I still like the HiveMind XML
notation better.

Sorry for asking instead of reading the docs: But can Spring 2.0 also
pull together its config from different jars on the classpath like
HiveMind does?
Or do you still need to have a "master application.xml" and and do
manual includes?

> -Original Message-
> From: Daniel Tabuenca [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 22, 2006 10:18 AM
> To: Tapestry users
> Subject: Re: Re: [newbie] Spring vs Hivemind
> 
>  Spring 2.0 has singleton/prototype/request/session/global 
> session/ and custom scopes. It should be noted that spring's 
> prototype scope is different from hivemind in that an object 
> is created every time a referencing dependency is set or when 
> one requests it directly via a getBean("beanName"). In this 
> sense spring acts more like a factory returning configured 
> objects unlike hivemind which returns a proxy which creates a 
> new object on each method invocation.
> 
> Spring also has the concept of target sources which is 
> basically equivalent to hivemind pooled service models and 
> also allow lets you do hivemind-like prototype proxies.
> 
> Here are the references to the docs if anyone is interested:
> 
> http://static.springframework.org/spring/docs/2.0.x/reference/
> beans.html#beans-factory-scopes
> 
> and
> 
> http://static.springframework.org/spring/docs/2.0.x/reference/
> aop-api.html#aop-targetsource
> 
> 
> 
> On 11/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > No, Spring has only prototype and singleton Beans afaik.
> > HiveMind has threaded/pooled service-models which can easily be 
> > extended (Honeycomb does this to implement session-per-conversation 
> > based on a "stateful" service-model).
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: [newbie] Spring vs Hivemind

2006-11-22 Thread Daniel Tabuenca

Spring 2.0 has singleton/prototype/request/session/global session/
and custom scopes. It should be noted that spring's prototype scope is
different from hivemind in that an object is created every time a
referencing dependency is set or when one requests it directly via a
getBean("beanName"). In this sense spring acts more like a factory
returning configured objects unlike hivemind which returns a proxy
which creates a new object on each method invocation.

Spring also has the concept of target sources which is basically
equivalent to hivemind pooled service models and also allow lets you
do hivemind-like prototype proxies.

Here are the references to the docs if anyone is interested:

http://static.springframework.org/spring/docs/2.0.x/reference/beans.html#beans-factory-scopes

and

http://static.springframework.org/spring/docs/2.0.x/reference/aop-api.html#aop-targetsource



On 11/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

No, Spring has only prototype and singleton Beans afaik.
HiveMind has threaded/pooled service-models which can easily be
extended (Honeycomb does this to implement session-per-conversation
based on a "stateful" service-model).


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Re: [newbie] Spring vs Hivemind

2006-11-22 Thread Marcus.Schulte
No, Spring has only prototype and singleton Beans afaik.
HiveMind has threaded/pooled service-models which can easily be
extended (Honeycomb does this to implement session-per-conversation
based on a "stateful" service-model). 

> -Original Message-
> From: Daniel Tabuenca [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, November 22, 2006 9:49 AM
> To: Tapestry users
> Subject: Re: Re: [newbie] Spring vs Hivemind
> 
> While we're on the subject, am I correct in my assessment 
> that the only feature that hivemind has that spring does not 
> is the whole configuration point /contribution system? It's 
> been a while since I've really used hivemind so I may be wrong.
> 
> On 11/22/06, Kalle Korhonen <[EMAIL PROTECTED]> wrote:
> > I think Sam put it pretty well. Cyrille, you should also read the 
> > other thread "Tapernate access multiple database" that touches the 
> > Hivemind/Spring subject. I often think the primary use scenarios of 
> > commons-logging and log4j are analogous to Hivemind and 
> Spring. If you 
> > are building a library or framework with third-party 
> extensibility in 
> > mind you want Hivemind (and commons-logging), and if you 
> are building 
> > a stand-alone web/J2EE application Spring (and log4j) provides a 
> > better fit (because you gain less from Hivemind/common-logging 
> > flexibility and because they don't have out-of-the-box 
> support for other frameworks you likely need).
> >
> > Kalle
> >
> > On 11/21/06, Sam Gendler <[EMAIL PROTECTED]> wrote:
> > >
> > > It depends entirely on the context of the app.  Tap has some 
> > > dependancies on hivemind, so you will wind up dealing 
> with hivemind 
> > > and hivemind configs to some extent no matter which 
> solution you use.
> > > However, the spring integration is very easy to use, and it is 
> > > easily possible to keep all of the layers and support 
> classes that 
> > > aren't web/tapestry specific in your spring config and 
> use them from 
> > > within tapestry as easily as you can use objects managed 
> by Hivemind.
> > > Fundamentally, Spring makes working with Hibernate based 
> entities an 
> > > absolute breeze, and that isn't something to be disregarded.  And 
> > > AOP via AspectJ really simplifies some other things, such as 
> > > changelogs and transaction management (spring will happily manage 
> > > all your transactions for you via AOP, if you ask it to).  If you 
> > > will be using hibernate for entity storage and/or want 
> acegi or AOP, 
> > > then the choice is made for you. Use Spring.  If not, hivemind is 
> > > the solution that is native to tapestry, so you might as well use 
> > > that. Another issue to consider is that Spring is probably more 
> > > likely to crop up on other projects you may build in the 
> future, so 
> > > it may be useful to you, personally, to use it.
> > >
> > > --sam
> > >
> > > 
> 
> > > - To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: [newbie] Spring vs Hivemind

2006-11-22 Thread Daniel Tabuenca

While we're on the subject, am I correct in my assessment that the
only feature that hivemind has that spring does not is the whole
configuration point /contribution system? It's been a while since I've
really used hivemind so I may be wrong.

On 11/22/06, Kalle Korhonen <[EMAIL PROTECTED]> wrote:

I think Sam put it pretty well. Cyrille, you should also read the other
thread "Tapernate access multiple database" that touches the Hivemind/Spring
subject. I often think the primary use scenarios of commons-logging and
log4j are analogous to Hivemind and Spring. If you are building a library or
framework with third-party extensibility in mind you want Hivemind (and
commons-logging), and if you are building a stand-alone web/J2EE application
Spring (and log4j) provides a better fit (because you gain less from
Hivemind/common-logging flexibility and because they don't have
out-of-the-box support for other frameworks you likely need).

Kalle

On 11/21/06, Sam Gendler <[EMAIL PROTECTED]> wrote:
>
> It depends entirely on the context of the app.  Tap has some
> dependancies on hivemind, so you will wind up dealing with hivemind
> and hivemind configs to some extent no matter which solution you use.
> However, the spring integration is very easy to use, and it is easily
> possible to keep all of the layers and support classes that aren't
> web/tapestry specific in your spring config and use them from within
> tapestry as easily as you can use objects managed by Hivemind.
> Fundamentally, Spring makes working with Hibernate based entities an
> absolute breeze, and that isn't something to be disregarded.  And AOP
> via AspectJ really simplifies some other things, such as changelogs
> and transaction management (spring will happily manage all your
> transactions for you via AOP, if you ask it to).  If you will be using
> hibernate for entity storage and/or want acegi or AOP, then the choice
> is made for you. Use Spring.  If not, hivemind is the solution that is
> native to tapestry, so you might as well use that. Another issue to
> consider is that Spring is probably more likely to crop up on other
> projects you may build in the future, so it may be useful to you,
> personally, to use it.
>
> --sam
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Re: [newbie] Spring vs Hivemind

2006-11-22 Thread Kalle Korhonen

I think Sam put it pretty well. Cyrille, you should also read the other
thread "Tapernate access multiple database" that touches the Hivemind/Spring
subject. I often think the primary use scenarios of commons-logging and
log4j are analogous to Hivemind and Spring. If you are building a library or
framework with third-party extensibility in mind you want Hivemind (and
commons-logging), and if you are building a stand-alone web/J2EE application
Spring (and log4j) provides a better fit (because you gain less from
Hivemind/common-logging flexibility and because they don't have
out-of-the-box support for other frameworks you likely need).

Kalle

On 11/21/06, Sam Gendler <[EMAIL PROTECTED]> wrote:


It depends entirely on the context of the app.  Tap has some
dependancies on hivemind, so you will wind up dealing with hivemind
and hivemind configs to some extent no matter which solution you use.
However, the spring integration is very easy to use, and it is easily
possible to keep all of the layers and support classes that aren't
web/tapestry specific in your spring config and use them from within
tapestry as easily as you can use objects managed by Hivemind.
Fundamentally, Spring makes working with Hibernate based entities an
absolute breeze, and that isn't something to be disregarded.  And AOP
via AspectJ really simplifies some other things, such as changelogs
and transaction management (spring will happily manage all your
transactions for you via AOP, if you ask it to).  If you will be using
hibernate for entity storage and/or want acegi or AOP, then the choice
is made for you. Use Spring.  If not, hivemind is the solution that is
native to tapestry, so you might as well use that. Another issue to
consider is that Spring is probably more likely to crop up on other
projects you may build in the future, so it may be useful to you,
personally, to use it.

--sam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Re: [newbie] Spring vs Hivemind

2006-11-21 Thread Sam Gendler

It depends entirely on the context of the app.  Tap has some
dependancies on hivemind, so you will wind up dealing with hivemind
and hivemind configs to some extent no matter which solution you use.
However, the spring integration is very easy to use, and it is easily
possible to keep all of the layers and support classes that aren't
web/tapestry specific in your spring config and use them from within
tapestry as easily as you can use objects managed by Hivemind.
Fundamentally, Spring makes working with Hibernate based entities an
absolute breeze, and that isn't something to be disregarded.  And AOP
via AspectJ really simplifies some other things, such as changelogs
and transaction management (spring will happily manage all your
transactions for you via AOP, if you ask it to).  If you will be using
hibernate for entity storage and/or want acegi or AOP, then the choice
is made for you. Use Spring.  If not, hivemind is the solution that is
native to tapestry, so you might as well use that. Another issue to
consider is that Spring is probably more likely to crop up on other
projects you may build in the future, so it may be useful to you,
personally, to use it.

--sam

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]