You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Nicola Ken Barozzi <ni...@apache.org> on 2003/03/14 09:44:44 UTC

(In)Dependence on servlet - (Re: [RT] Flow as a block)


Carsten Ziegeler wrote, On 14/03/2003 8.23:
> Upayavira wrote_
> 
>>>Do we have hard dependencies on servlet ? AFAIK we have some for those
>>>components that can't live without it (e.g. JSPGenerator), but are
>>>there others ?
>>
>>Try running the CLI without a reference to servlet-XXX.jar. It 
>>fails whilst loading in 
>>configs. I tried to work out why, but it was beyond my current 
>>expertise (probably 
>>because I don't have Avalon source installed). And the CLI 
>>certainly shouldn't need to 
>>know about servlet stuff.
>>
> 
> Ah, that's bad - it did work without the servlet api some time ago.

Well, the fact is that some parts reference the CocoonServlet, and the 
StreamGenerator is usable only on Servlets! Ok, this has already been 
discussed, so I think we should get to a conclusion here.

Proposal:

1) move all environments in separate ./src/environments dirs, that each 
generate a separate jar, exactly like the blocks are done ATM. In the 
future the blocks will be runtime pluggable, while environments will 
remain as static jars at load time.

2) add a methid to the Environmment to get a Stream from the request and 
make the StreamGenerator use it. It's true that Requests can have 
multiple streams, but I'll leave that case to a future discussion.

These two items will clearly show us the dependencies in our code, and 
eventually lighten the dependency between our Enviroment implementations.

Does this sound reasonable?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


Re: (In)Dependence on servlet - (Re: [RT] Flow as a block)

Posted by Stefano Mazzocchi <st...@apache.org>.
Nicola Ken Barozzi wrote:
> 
> 
> Carsten Ziegeler wrote, On 14/03/2003 8.23:
> 
>> Upayavira wrote_
>>
>>>> Do we have hard dependencies on servlet ? AFAIK we have some for those
>>>> components that can't live without it (e.g. JSPGenerator), but are
>>>> there others ?
>>>
>>>
>>> Try running the CLI without a reference to servlet-XXX.jar. It fails 
>>> whilst loading in configs. I tried to work out why, but it was beyond 
>>> my current expertise (probably because I don't have Avalon source 
>>> installed). And the CLI certainly shouldn't need to know about 
>>> servlet stuff.
>>>
>>
>> Ah, that's bad - it did work without the servlet api some time ago.
> 
> 
> Well, the fact is that some parts reference the CocoonServlet, and the 
> StreamGenerator is usable only on Servlets! Ok, this has already been 
> discussed, so I think we should get to a conclusion here.
> 
> Proposal:
> 
> 1) move all environments in separate ./src/environments dirs, that each 
> generate a separate jar, exactly like the blocks are done ATM. In the 
> future the blocks will be runtime pluggable, while environments will 
> remain as static jars at load time.

True, this is another reason to have modules vs. blocks. Modules won't 
be run-time pluggable.

> 2) add a methid to the Environmment to get a Stream from the request and 
> make the StreamGenerator use it. It's true that Requests can have 
> multiple streams, but I'll leave that case to a future discussion.

Yes, solve the issues when they arise.

> These two items will clearly show us the dependencies in our code, and 
> eventually lighten the dependency between our Enviroment implementations.

True.

> Does this sound reasonable?

Yes, totally.


Re: (In)Dependence on servlet - (Re: [RT] Flow as a block)

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Just a couple of corrections.

Carsten Ziegeler wrote, On 14/03/2003 14.13:
...
> Ok, we should consider adding libs to an environment directory as well,
> so the servlet.jar could become part of the servlet environment.

+1

...
> Shouldn't this be added to the Request? The StreamGenerator does not 
> have access to the Environment obejct.

Sorry, I keep talking about the concept and use the classname.
Yes, it's the Request.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


RE: (In)Dependence on servlet - (Re: [RT] Flow as a block)

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Nicola Ken Barozzi wrote:
> 
> Well, the fact is that some parts reference the CocoonServlet, and the 
> StreamGenerator is usable only on Servlets! Ok, this has already been 
> discussed, so I think we should get to a conclusion here.
> 
> Proposal:
> 
> 1) move all environments in separate ./src/environments dirs, that each 
> generate a separate jar, exactly like the blocks are done ATM. In the 
> future the blocks will be runtime pluggable, while environments will 
> remain as static jars at load time.
> 
Ok, we should consider adding libs to an environment directory as well,
so the servlet.jar could become part of the servlet environment.

> 2) add a methid to the Environmment to get a Stream from the request and 
> make the StreamGenerator use it. It's true that Requests can have 
> multiple streams, but I'll leave that case to a future discussion.
> 
Shouldn't this be added to the Request? The StreamGenerator does not 
have access to the Environment obejct.

> These two items will clearly show us the dependencies in our code, and 
> eventually lighten the dependency between our Enviroment implementations.
> 
> Does this sound reasonable?
> 
Yes!

Carsten