Igor, sorry to turn this into a Spring Q&A!  I understand if you don't want to discuss Spring on this list but it is hard to get an unbiased opinion on theirs.

I have only briefly looked at Springs IoC and was put off by the amount of configuration XML I would have to write.  I use Picocontainer which is very simple to configure in Java alone because it makes lots of default assumptions about how to build an object without me having to specify.

Do you have any insight about how easily Spring can be configured in comparison to Pico?  I could see that the examples were almost exclusively using setter injection but I much prefer to use constructors.

Does Spring automatically figure out an object's dependancies like Pico does?  Or do you need to specify them e.g. "Call this constructor with these arguments".  I like being able to let the container figure that out for me using a simple default rule - "Always use the largest satisfiable constructor unless I say otherwise".  

Also, how easy is it to set up containers that manage object life-cycle at different scopes?

Thanks,

John.


On 14 Jun 2006, at 18:23, Igor Vaynberg wrote:

not to mention the decorator pattern is used a lot in spring and for that you also need interfaces.

-Igor


On 6/14/06, Igor Vaynberg < [EMAIL PROTECTED]> wrote:
On 6/14/06, Vincent Jenks <[EMAIL PROTECTED]> wrote:
I guess I avoid it because it appears to force you into thinking in an
IoC way and I don't like the idea of configuring my classes w/ XML and
using interfaces for *everything* - sometimes that's just more complex
than the problem at hand.

this is a common misconception, you do not need to use interfaces for everything. spring handles beans not backed by interface via cglib when they need to be proxied for aop/transactions.

a good portion of things you declare in the spring container are the things that are going to vary from deployment to deployment - and for those things you need to have an interface that is backed by multiple implementations, otherwise it wont work. likewise in spring code itself there are multiple implementations for most things - that is why the spring code has a lot of interfaces.

-Igor


_______________________________________________
Wicket-user mailing list

_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to