cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Berin Loritsch" <>
Subject Re: Structure -- functions or pages?
Date Mon, 06 Nov 2000 13:50:28 GMT
----- Original Message -----
From: "Emil Assarsson" <>
To: <>
Sent: Sunday, November 05, 2000 5:51 PM
Subject: Structure -- functions or pages?

> Hello!
> If you want to have different structure och the served pages, but the
> same stucture on the functions on your webapplication. Is there any
> possibility to do so?
> To clear the question a bit:
> A HTML page contains a lot more separate functionality than a WML page,
> like a compleet menu and related info. To make it even more complex...
> if you have a multipage list, this list will contain not only a list but
> a list of links to the following pages. Mix this with the style. I would
> like to see the application like a set of functions linked together. The
> functions should work independent. Even if they are presented on muliple
> pages (like a sequense). And a document will still be one document
> instead of multiple pages.

I realize that English is probably your second language, so if I have missed
what you are trying to ask I apologize.  I am assuming that you have some
content that you want rendered as HTML and as WML?  The MVC pattern (Model,
View, Controller) that Cocoon uses is very clean if used properly.  For web
publishers, we kind of renamed it to Logic, Content, Style--nevertheless it
is the same pattern.

> This is the present idé:
> Logic -> Content -> Style
> If you put the Structure anywhere else but in Style you will break the
> design pattern. But this way you will have to make the style "ask" for
> the content (like a new JSP)? Not nice.

The concept is to have your XSP pages generate your business level logic,
Your XML pages have your static content, and your XSL pages to do the overall
presentation.  This works in most cases with basically three files involved.
I think the problem you are having is that you want to take your Content, and
add an overall structure to the page before you decorate it with the graphics
and such.  In that case it is perfectly acceptable to add in one more
abstraction to the pattern:

Logic -> Content -> Structure -> Style

Basically, your business level logic and content remain the same, but you
have two stylesheets.  One stylesheet reformats the Content to be in a
structure or rough layout.  The other stylesheet takes the rough layout and
adds all the extra style that you require.

Cocoon1 and Cocoon2 both have differing methods of working the plumbing.
Cocoon1 requires that you mess with processing instructions, so that at
each level you specify the next stage of processing.  Cocoon2 uses a sitemap
that allows you to simply add multiple levels of transformation.

> I'm quite new at this so I might have missed somthing that is allready
> there. If so -- please point it out ;-)

I've got a handle on the theory and some practical experience doing this.
If I haven't answered your question satisfactorily, hopefully I gave you
some ideas of clarifying the question.

View raw message