You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Thorsten Scherler <th...@apache.org> on 2011/03/31 11:02:04 UTC

[c3] Image reader, does c3 have one?

Hi all,

I am looking for an
http://cocoon.apache.org/2.1/userdocs/core/image-reader.html in c3, but
have not found anything. Did I not look hard enough, or simply there is
no image reader yet?

If there is no image reader is there a note about best practice to
migrate a 2.1 component to 3.0?

TIA for any information.

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
codeBusters S.L. - web based systems
<consulting, training and solutions>
http://www.codebusters.es/

Re: [c3] Image reader, does c3 have one?

Posted by Peter Hunsberger <pe...@gmail.com>.
On Thu, Mar 31, 2011 at 5:39 AM, Thorsten Scherler <th...@apache.org> wrote:
>
> On Thu, 2011-03-31 at 12:01 +0200, Francesco Chicchiriccò wrote:
> ...
> > >
> >
> > Nice idea: such checklist can start from some concrete examples and grow
> > up to a more general approach in migrating from 2.X to 3. Again: do you
> > have some of such concrete examples? ;-)
>
> Not really yet but I guess I will run into that challenge soonish, if
> somebody can share her experience in that field I would more then
> welcome that.
>

Good to see someone working with C3 and that it is getting some
attention.  I hope to convince some people here that we should look at
it, but that will take a long time.... :-(

In any case, it seems you already have your first concrete (albeit
simple) example.  Just document what was required to move the image
reader over as the first example in the "How to migrate Cocoon 2.2
components to Cocoon 3.0" section of the documentation and web site
(yeah, I know, there needs to be a place to put the examples first,
but that is left as an exercise for the reader)...

Re: [c3] Image reader, does c3 have one?

Posted by Thorsten Scherler <th...@apache.org>.
On Thu, 2011-03-31 at 12:01 +0200, Francesco Chicchiriccò wrote:
...
> >
> > BTW we should add an example to implement the presentation layer stack
> > (css, js, images, ...) to give the people some c&p snippets.
> 
> You are definitely right: in the cocoon-sample module of cocoon3 sources 
> there is already some JS, but the rest is still missing.
> In order to speed up the implementation of your idea, If you already 
> have some snippets or working samples about this, we would be glad to 
> include them in C3 sources.

ATM I am developing a prototype for a customer based on c3 and will come
to the point where I need to develop something in that direction. I will
commit afterwards if nobody beats me to it. ;)

> 
> >>> If there is no image reader is there a note about best practice to
> >>> migrate a 2.1 component to 3.0?
> >> Unfortunately there is no documentation about this, but any comment and
> >> / or request is very welcome from you :-)
> > I guess we should put together a small checklist since people have 2.X
> > components they want to migrate if switching to c3. For 2.2 ones which
> > are based on spring there is not much to change, but old avalon
> > components needs more work.
> 
> Nice idea: such checklist can start from some concrete examples and grow 
> up to a more general approach in migrating from 2.X to 3. Again: do you 
> have some of such concrete examples? ;-)

Not really yet but I guess I will run into that challenge soonish, if
somebody can share her experience in that field I would more then
welcome that. 

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
codeBusters S.L. - web based systems
<consulting, training and solutions>
http://www.codebusters.es/

Re: [c3] Image reader, does c3 have one?

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 31/03/2011 11:47, Thorsten Scherler wrote:
> On Thu, 2011-03-31 at 11:23 +0200, Francesco Chicchiriccò wrote:
>> On 31/03/2011 11:02, Thorsten Scherler wrote:
>>> Hi all,
>>>
>>> I am looking for an
>>> http://cocoon.apache.org/2.1/userdocs/core/image-reader.html in c3, but
>>> have not found anything. Did I not look hard enough, or simply there is
>>> no image reader yet?
>> Hi Thorsten,
>> upon reading your e-mail I've realized that in the cocoon3 samples there
>> was nothing about image reading, while the C3 reader is perfectly
>> capable of handling such requests, so I've just added and committed.
>>
>> Basically, what you need is only changing what used to be (in C2.1)
>>
>> <map:match pattern="images/*.gif">
>> <map:read src="read/{1}.gif" />
>> </map:match>
>>
>> into
>>
>> <map:match pattern="images/{filename}.gif">
>> <map:read src="read/{map:filename}.gif" />
>> </map:match>
> Yeah, sweet that did the trick. :) I ended up to use {map:1} since it
> closer to old school grammar. ;)
>
> BTW we should add an example to implement the presentation layer stack
> (css, js, images, ...) to give the people some c&p snippets.

You are definitely right: in the cocoon-sample module of cocoon3 sources 
there is already some JS, but the rest is still missing.
In order to speed up the implementation of your idea, If you already 
have some snippets or working samples about this, we would be glad to 
include them in C3 sources.

>>> If there is no image reader is there a note about best practice to
>>> migrate a 2.1 component to 3.0?
>> Unfortunately there is no documentation about this, but any comment and
>> / or request is very welcome from you :-)
> I guess we should put together a small checklist since people have 2.X
> components they want to migrate if switching to c3. For 2.2 ones which
> are based on spring there is not much to change, but old avalon
> components needs more work.

Nice idea: such checklist can start from some concrete examples and grow 
up to a more general approach in migrating from 2.X to 3. Again: do you 
have some of such concrete examples? ;-)

> c3 does not support avalon based components any more, right?

Exactly.

> Thank you very much Francesco (especially for your impressive QUICK reply)!

You're welcome :-)

-- 
Apache Cocoon Committer and PMC Member

http://people.apache.org/~ilgrosso/


Re: [c3] Image reader, does c3 have one?

Posted by Thorsten Scherler <th...@apache.org>.
On Thu, 2011-03-31 at 11:23 +0200, Francesco Chicchiriccò wrote:
> On 31/03/2011 11:02, Thorsten Scherler wrote:
> > Hi all,
> >
> > I am looking for an
> > http://cocoon.apache.org/2.1/userdocs/core/image-reader.html in c3, but
> > have not found anything. Did I not look hard enough, or simply there is
> > no image reader yet?
> 
> Hi Thorsten,
> upon reading your e-mail I've realized that in the cocoon3 samples there 
> was nothing about image reading, while the C3 reader is perfectly 
> capable of handling such requests, so I've just added and committed.
> 
> Basically, what you need is only changing what used to be (in C2.1)
> 
> <map:match pattern="images/*.gif">
> <map:read src="read/{1}.gif" />
> </map:match>
> 
> into
> 
> <map:match pattern="images/{filename}.gif">
> <map:read src="read/{map:filename}.gif" />
> </map:match>
> 

Yeah, sweet that did the trick. :) I ended up to use {map:1} since it
closer to old school grammar. ;)

BTW we should add an example to implement the presentation layer stack
(css, js, images, ...) to give the people some c&p snippets. 

> 
> > If there is no image reader is there a note about best practice to
> > migrate a 2.1 component to 3.0?
> Unfortunately there is no documentation about this, but any comment and 
> / or request is very welcome from you :-)

I guess we should put together a small checklist since people have 2.X
components they want to migrate if switching to c3. For 2.2 ones which
are based on spring there is not much to change, but old avalon
components needs more work. c3 does not support avalon based components
any more, right?

Thank you very much Francesco (especially for your impressive QUICK
reply)!

salu2
-- 
Thorsten Scherler <thorsten.at.apache.org>
codeBusters S.L. - web based systems
<consulting, training and solutions>
http://www.codebusters.es/

Re: [c3] Image reader, does c3 have one?

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 31/03/2011 11:02, Thorsten Scherler wrote:
> Hi all,
>
> I am looking for an
> http://cocoon.apache.org/2.1/userdocs/core/image-reader.html in c3, but
> have not found anything. Did I not look hard enough, or simply there is
> no image reader yet?

Hi Thorsten,
upon reading your e-mail I've realized that in the cocoon3 samples there 
was nothing about image reading, while the C3 reader is perfectly 
capable of handling such requests, so I've just added and committed.

Basically, what you need is only changing what used to be (in C2.1)

<map:match pattern="images/*.gif">
<map:read src="read/{1}.gif" />
</map:match>

into

<map:match pattern="images/{filename}.gif">
<map:read src="read/{map:filename}.gif" />
</map:match>


> If there is no image reader is there a note about best practice to
> migrate a 2.1 component to 3.0?
Unfortunately there is no documentation about this, but any comment and 
/ or request is very welcome from you :-)
Cheers.

-- 
Apache Cocoon Committer and PMC Member

http://people.apache.org/~ilgrosso/