You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jorg Bauer <jo...@rabbit.co.uk> on 2000/06/25 18:49:51 UTC

Cocoon2 and dynamic site maps

I really like the concept of the site map where site managers can
associate
different pipelines to requested URIs. 

Will it be possible to configure the site map in a way that the pipeline
specifications are created dynamically? 

I am thinking of a mechanism which would allow me to use a different 
pipeline with each request of a given URI. The pipe information (or
pipe sections) could be obtained from a java class: 

  <process match="/press/en/*.pdf">
    <dynapipe type="java">
      <parameter name="class" value="uk.co.rabbit.PipeConf"/>
    </dynapipe>
  </process>


or through another HTTP request: 

  <process match="/some/path/">
    <dynapipe type="HTTP">
      <parameter name="URI" value="/pipe/pipe3.pl"/>
    </dynapipe
  </process>


Jorg

Re: Cocoon2 and dynamic site maps

Posted by Stefano Mazzocchi <st...@apache.org>.
Jorg Bauer wrote:
> 
> Thanks for all the feedback on my question. I fully agree with your
> views
> on flexibility vs. software complexity. The fact that I can use a custom
> sitemapper sounds like a good solution to my problem (I'll now have to
> start
> reading the Cocoon2 source).

Oh, don't bother. Most of what we said is not yet written in source
code.
 
> One of the questions you guys had was 'Why do you need dynamic
> sitemaps?'
> 
> I'll try and give a satisfactory answer:
> On the server side I am building a system that stores all its
> information
> in XML. The system receives all data updates as XML and provides all
> information as XML.
> 
> On the client side, users want to see the information in a formatted
> way.
> Cocoon will transform the XML data into the format desired on the client
> side.
> 
> The desired transformations vary substantially and depend on the context
> of
> the request.
> E.g.
> - who is the user
> - what browser / media (HTML, WAP, text) do they use
> - how do they want the information formatted (personal preferences)
> - what restrictions are imposed on them when viewing the data
> - date/time of request (e.g. during work I'm only allowed to see
> business
> news items)
> - physical location
> and many more.
> 
> I guess the point I'm trying to get across is that there are scenarios
> in
> which many different factors determine the final transformation
> sequence.
> To try and capture these setups with a sitemap is difficult.

really? why? Instead of placing your logic into a dynamic sitemap
generator, why can't you place the same logic into a matcher?
 
> Jorg
> 
> PS: What does FS stand for?

Flexibility Syndrome

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Re: Cocoon2 and dynamic site maps

Posted by Niclas Hedhman <ni...@localbar.com>.
Donald Ball wrote:

> > PS: What does FS stand for?
>
> Flexibility Syndrome - stefano thinks that "there's more than one way to
> do it" is often a bad idea. i concur, but not as wholeheartedly as stefano
> does. :)

I do!  And that's why we are all programming Java.

The initial Java slogan, somewhere lost on the way - Less is More!!!

The number of permutated possible problems raises by an exponential factor
for each "way to do it". Especially if the "ways" are overlapping, and
introduces 'intermodulation' from one "way" to another.

In the long run it results in stagnant code, i.e it will become harder and
harder to extend the codebase, without implications in one "way" or the
other. Maintenance head-aches.

Niclas


Re: Cocoon2 and dynamic site maps

Posted by Stefano Mazzocchi <st...@apache.org>.
Donald Ball wrote:

> > PS: What does FS stand for?
> 
> Flexibility Syndrome - stefano thinks that "there's more than one way to
> do it" is often a bad idea. i concur, but not as wholeheartedly as stefano
> does. :)

No, no, no, no, no....

Flexibility Syndrome is when you add another dimension to your solution
space to fit a new problem without trying to rotate your previous
solution space versors to cover the new problem.

This -has- nothing to do with having more than one way (more than one
vector in your solution space) to do something.

I want this to be clear: while FS deals with the multidimensionality of
the solution space, the above deals with the topological metric of the
solution space.

My reasoning on FS is clear: you should not add unnecessary dimensions
to your solution space when you can rotate the solution axis to reach
the problem.

My reasoning on solution metrics is: very few solutions spaces are
conservative (means: no matter what path you take, you spend the same
energy to get there). This _automatically_ means there are only one or
few good paths.

Cocoon tries to fix the axis of the solutions space and create a metric
for you. Egocentric, true. Hard, ideed. But we don't claim to cover
_all_ possible cases, we want optimize our solutions space for most
cases possible but still minimizing multi-dimensionality.

Perl, in a different way, follows the same rules about FS but doesn't
give you a metric: you have to find it yourself.

Problem solving is a walk in the solutions space.

And minimizing walks is an incredibly onerous task.

This is why there are hiking trails.

There is only one difference in my view: many people, when there is no
path between A and B, they just try to walk their way thru the bushes.

I try first to rotate the mountain :)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Re: Cocoon2 and dynamic site maps

Posted by Donald Ball <ba...@webslingerZ.com>.
On Tue, 27 Jun 2000, Jorg Bauer wrote:

> The desired transformations vary substantially and depend on the context
> of 
> the request. 
> E.g. 
> - who is the user
> - what browser / media (HTML, WAP, text) do they use
> - how do they want the information formatted (personal preferences)
> - what restrictions are imposed on them when viewing the data
> - date/time of request (e.g. during work I'm only allowed to see
> business
> news items)
> - physical location 
> and many more. 

Um, we've been spending the past month or two discussing ways to
accomodate choosing different sitemap components based on criteria just
like these. it'd be nice if you could flip through the design document in
the cocoon2 repository and see if it would accomodate your needs without
requiring you to write special code.

> I guess the point I'm trying to get across is that there are scenarios
> in which many different factors determine the final transformation
> sequence.  To try and capture these setups with a sitemap is
> difficult.

but not impossible, one would hope.

> Jorg
> 
> PS: What does FS stand for?

Flexibility Syndrome - stefano thinks that "there's more than one way to
do it" is often a bad idea. i concur, but not as wholeheartedly as stefano
does. :)

- donald


Re: Cocoon2 and dynamic site maps

Posted by Jorg Bauer <jo...@rabbit.co.uk>.
Thanks for all the feedback on my question. I fully agree with your
views
on flexibility vs. software complexity. The fact that I can use a custom 
sitemapper sounds like a good solution to my problem (I'll now have to
start 
reading the Cocoon2 source). 

One of the questions you guys had was 'Why do you need dynamic
sitemaps?'

I'll try and give a satisfactory answer: 
On the server side I am building a system that stores all its
information 
in XML. The system receives all data updates as XML and provides all 
information as XML. 

On the client side, users want to see the information in a formatted
way. 
Cocoon will transform the XML data into the format desired on the client 
side. 

The desired transformations vary substantially and depend on the context
of 
the request. 
E.g. 
- who is the user
- what browser / media (HTML, WAP, text) do they use
- how do they want the information formatted (personal preferences)
- what restrictions are imposed on them when viewing the data
- date/time of request (e.g. during work I'm only allowed to see
business
news items)
- physical location 
and many more. 

I guess the point I'm trying to get across is that there are scenarios
in
which many different factors determine the final transformation
sequence. 
To try and capture these setups with a sitemap is difficult. 

Jorg

PS: What does FS stand for?