cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Reinhard Poetz" <reinh...@apache.org>
Subject RE: dynamic flowscript
Date Wed, 03 Sep 2003 08:01:07 GMT
Hi Michael,

If flowscripts are reloaded depends on two parameters: First on the
configuration of the interpreter if it allows reloads at all and how
often  reloads are checked. And second on the script itself. Currently
we use the (deprecated) getLastModified methods to determin if a script
has changed. This should work well for scripts resolved using the file
protocol but not the cocoon:/ protocolls.

So for now use the file protocol to get your scripts reloaded until we
(I) find some time to change the implementation.

ad your more general question:
We discuessed this and came to the conclusion that we don't want to
forbid dynamically loaded scripts because this opens many interesting
possibilities but we haven't been sure at all if this is "bad magic" or
not. But maybe you come up with some interesting use cases.

And please be aware that dynamically loaded flowscripts have (negative)
impact on the performance. I wouldn't use scripts that change for every
request (script loading and compiling is synchronized!)

I'm preparing a prototype for interecepted flowscripts - maybe this can
serve your needs. If everything works well it should be found at
scratchpad at the beginning of the next week.

Cheers,
Reinhard



> From: mratliff@collegenet.com
> 
> 
> 
> 
> Hi, 
> 
> I'm playing with Woody and Flowscript and want to 
> include some dynamic javascript as Flowscript.  
> The javascript would be generated by < transforming 
> some XML markup into script.  So I tried:
>         cocoon.load("cocoon:/getControllerLogic"); 
> from somewhere in Woody's flowscript. 
> 
> But it seems that Flowscripts are loaded once and only once 
> when the sitemap is loaded.  Is this correct?  Or am I 
> doing something wrong? 
> 
> Or maybe tryin to use dynamic flowscript is just bad magic?  
> I'm playing around with the thought of supporting hundreds 
> or thousands of forms, each with (potentially) their own 
> unique controller logic.... 
> 
> Any thoughts? 
> 
> --Michael


Mime
View raw message