You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Gnatz, Michael" <Mi...@Pentasys.de> on 2006/06/22 10:11:42 UTC

Is using Cocoon a good idea?

As a newbie to cocoon I'm trying to see the advantages of this framework at the moment...
 
We have a project based on cocoon here running for a few years now. As things normally are, developers did not have much time and many features to implement and so things are not as nice as one would like them to be...
 
Basically the pipline is quite easy. We are generating an intermediate language, which serves as an abstraction of html. This is done by xsp's, the layouting is done with xsl's as a second step. The idea is nice: We are doing something like "seperation of concerns".
 
Problem is the following now: We have many many many xsl-templates, which are not used. Secondly, we are generating tags with our xsp's, which are not further processed but just omitted. Both things are overhead, when doing a repaint of all pages, as we are trying to do now. Main problem is, that the application is rather big.
 
When I just delete a template it might be in use anywhere in those 500 pagees and I might not recognize...
 
When using Java I like eclipse showing me code which is not used anywhere. When using this xslt thing I dont have anything like that?
 
1) What would be a development process avoiding the problem mentioned? Does a dtd/schema for the intermediate language help? Should I document all dependencies between xsp's and xsl-templates?
 
2) Is it best to throw everything away now and start from scratch? Maybe better without cocoon?
 
Best regards,
 Michael Gnatz



Re: Is using Cocoon a good idea?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On 6/22/06, Yves Vindevogel <yv...@implements.be> wrote:
> I think the tool will be "rename directory"...

I thought Michael was talking about unused <xsl:template>, not unused
XSL transform files.

If it's the latter, you're of course right!

-Bertrand

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


Re: Is using Cocoon a good idea?

Posted by Yves Vindevogel <yv...@implements.be>.
I think the tool will be "rename directory"

Rename your directory with XSL files, then run the pages and see what is 
missing.
It'll take you an hour or so to copy each xsl file back when you see you 
need it.
Once you ran through the whole site, all that's left in the renamed 
directory is unuseful.


Bertrand Delacretaz wrote:
> On 6/22/06, Gnatz, Michael <Mi...@pentasys.de> wrote:
>
>> ...When I just delete a template it might be in use anywhere in those 
>> 500 pagees and I might not recognize...
>
> I don't know of a tool that would help find out which XSLT templates
> are not used (which does not mean that such a tool does not exist).
>
> Given that XSLTs can process any well-formed input, such a tool would
> have to be dynamic, static analysis won't do unless coupled with
> schemas, and in that case the whole thing would get fairly complex.
>
> If you have a way to extensively test your application (and without
> that, refactoring sounds a bit dangerous), you could try adding
> <xsl:message terminate="yes"> statements to templates that you think
> are not used, run the app and see if it breaks.
>
> -Bertrand
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>

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


Re: Is using Cocoon a good idea?

Posted by Bertrand Delacretaz <bd...@apache.org>.
On 6/22/06, Gnatz, Michael <Mi...@pentasys.de> wrote:

> ...When I just delete a template it might be in use anywhere in those 500 pagees and I might not recognize...

I don't know of a tool that would help find out which XSLT templates
are not used (which does not mean that such a tool does not exist).

Given that XSLTs can process any well-formed input, such a tool would
have to be dynamic, static analysis won't do unless coupled with
schemas, and in that case the whole thing would get fairly complex.

If you have a way to extensively test your application (and without
that, refactoring sounds a bit dangerous), you could try adding
<xsl:message terminate="yes"> statements to templates that you think
are not used, run the app and see if it breaks.

-Bertrand

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