cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: Cocoon 2.2 - Cocoon Forms 1.0 block: Replacing Avalon's ServiceManager interface with Spring 2
Date Sun, 13 Apr 2008 19:10:57 GMT
Vadim Gritsenko pisze:
> On Apr 10, 2008, at 3:58 PM, Magnus Haraldsen Amundsen wrote:
>> I'm looking into the Cocoon Forms 1.0 block (with Cocoon 2.2) and it 
>> seems very nice. But I see that the Java API example at 
>> http://cocoon.apache.org/2.2/blocks/forms/1.0/498_1_1.html use 
>> Avalon's ServiceManager interface. However, at the "New in 2.2" page 
>> it says that "Cocoon 2.2 doesn't use an Avalon-based component manager 
>> any more but uses Spring 2 instead.".
>>
> Cocoon 2.2 internally uses Spring, but it still provides backward 
> compatibility (as far as it's possible) with Cocoon 2.1, so it 
> implements Avalon functionality and provides an implementation of 
> Avalon's ServiceManager. Because of this CForms 1.0 can continue to use 
> ServiceManager.
> 
> I should also mention that there is CForms version 1.1 which does not 
> use ServiceManager anymore and is migrated to Spring.
> 
> Links to CForms 1.0 and 1.1:
> http://svn.apache.org/repos/asf/cocoon/branches/cocoon-forms-1.0.0/
> http://svn.apache.org/repos/asf/cocoon/trunk/blocks/cocoon-forms/

I would add that we have already Spring implementation for Apples, see[1]. This way, Controllers
can 
be just Spring beans so Dependency Injection can be used instead of ServletManager from Avalon.

Magnus, since you said you don't know Spring or Avalon I think you will have hard times using
Java 
code in Cocoon. I would say that you don't need to be a master of Spring to use Cocoon but
some 
basics are highly recommended.

In this particular case I would advise you to take a look at apples block samples[2][3] and
figure 
out how to migrate them to Spring with help of people from this list. This way you would learn

basics and could contribute migrated samples to community so others could benefit.

[1] 
http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-apples/cocoon-apples-impl/src/main/java/org/apache/cocoon/components/flow/apples/SpringApplesProcessor.java?view=markup
[2] http://cocoon.zones.apache.org/demos/trunk/cocoon-apples-sample/
[3] http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-apples/cocoon-apples-sample/

-- 
Grzegorz Kossakowski

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message