cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefano Mazzocchi <stef...@apache.org>
Subject Re: Small note on sitemap configuration
Date Fri, 02 Jun 2000 18:43:26 GMT
Ok, look, you won't take me for lack of energy in the sitemap, ok? so
don't even try :)

> >  <process uri="**">
> >   <generator test="lang-browser-file" src="**"/>
> >  </process>
> >
> > is much easier to understand and write :)
> 
> Yeah, but what's going to process the test="lang-browser-file" attribute?

Shit, sorry, that's wrong:

  <process uri="**">
   <generator type="lang-browser-file" src="**"/>
  </process>

you simply reference a generator (a javabytecode class written in
whatever fashion you like). All logic is contained at the programming
language level.

> What name mangling scheme is it going to use to get to the proper file,
> and what if an author wants to use a different scheme? 

Modify the code of the existing component or write your own. Ask
yourself, how often are you changing this? Shouldn't there be _common_
components that do those things?

It would definately help enforcing proper use of URI spaces. (I'm not
big fan of Perl-like reasoning "there are always more ways to do
things")

> What if they also
> want the scheme to depend on the HTTP header for some stupid reason?

Piece of cake for a java component.
 
> > I have two main concerns:
> >
> > 1) once you start this programmatic road, pretty sure people will ask
> > for <for> loops, procedures and all that stuff. I've seen this happening
> > for Ant. I think there is an evident sign already, we _don't_ need such
> > complexity, not even the variables.
> 
> I disagree. There's absolutely no need for looping, subroutines,
> declarative variables, etc. Just the need for conditionals and expression
> evaluation.

That's not my point. I just see the layout of FS emerging thru this.
 
> > 2) this requires you to think! Sure, I can't force you to think, but
> > it's good to try.
> 
> Ha! I am thinking, and I think you're wrong. :)

Prrrr :-P
 
> > Example?
> >
> > Java avoiding multiple inheritance. That's the best ever.
> >
> > Have you ever wanted multiple inheritance? I did. Badly. It forced me to
> > go to my whiteboard and layout my OO strategy. Now I don't anymore
> > because I saw the problem and my design improved.
> 
> That's smokescreen, it isn't exactly relevant to this discussion. Trying
> to sidetrack me, you are... :)

No, dude, I don't need to do tricks to prove my points and I think you
got caught into FS.
 
> > Careful, a sitemap with no variables is, to me, the exact equivalent.
> > You should _not_ place logic into the sitemap... by creating variables
> > and run-time parameters.... it would soon make the sitemap too complex
> > to handle.
> 
> But you _already_ have logic in the sitemap. 

This is unfortunately correct. But the -minimal- logic necessary (but I
admit you've got a big point on this)

> What else is the matcher element but a boolean conditional? 

No, that's not logic. To me logic is

 <process uri="/**">
  <generator ... src="./home/**"/>

where "**" is a variable. This is what I'm seriously concerned about,
also because it's hard to visually program.

> I do _not_ think we need to _create_
> variables in the sitemap, just reference them.

Point well taken.

Question: how do you know what variable you have access to? 

> > On the other hand, I do see the need for such a thing.... it's another
> > of those things I need more feedback to evaluate....
> >
> > The problem is that once we add it and people start using it, we can't
> > remove it later on. So we must decide if this is FS or not _before_
> > placing it in.
> 
> Well, I dunno. Cocoon2's in alpha, so we should still be able to make
> these type experiments without affecting anyone seriously. I see your
> point, though, which is why I find this discussion quite valuable.

Same here.

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



Mime
View raw message