> -----Original Message-----
> From: Dion Gillard [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 20, 2004 1:23 PM
> To: Jakarta Commons Users List
> Subject: Re: Jelly script management
> 
> 
> Yep, clear ideas with code and tests have a lot more chance 
> of making 1.0.
> 

Yes, I guess.....
Unfortunately, I have not (yet) deep knowledge of Jelly to contribute a this level
in such a short time frame.

Just to clarify a little more:

interface ScriptManager {

        public Script getScript(String uri);
}

DefaultScriptManager implements ScriptManager {

.... put here all the mechanism to retrieve InputStream of templates and
     XMLParser use.
}

DelegateScriptManager implements ScriptManager {
.... canonical delegate pattern
}

CachingScriptManager extends DelegateScriptManager {

        public Script getScript(String uri) {
// synchronization stuff missing
                Script s = cache.get(uri);
            if (s == null) {
                        s = super.getScript(uri);
                        cache.put(uri, s);
            }
                return s;
      }
}

Tag like import/include should go thru ScriptManager to get referenced Script.
JellyContext should give access to the current ScriptManager.
Maybe a JellyEngine could provide all various manager instances and
JellyContext will have a reference to the JellyEngine instance (no singleton please) 
so that
Tag implementations could reach the manager.

My half-a-cent

Guido.


> Post 1.0 we should look at more wide ranging changes.
> 
> 
> On Mon, 20 Sep 2004 13:05:53 +0200, Paul Libbrecht 
> <[EMAIL PROTECTED]> wrote:
> > In principle this could be interesting... how about being 
> somewhat more
> > precise. Do pay attention that we're heading towards 1.0 so 
> that such
> > changes have little chances to come into the tree soon, at 
> least as I
> > understand.
> > 
> > paul
> > 
> > Le 17 sept. 04, � 10:15, Guido Anzuoni a �crit :
> > 
> > 
> > 
> > > Hello,
> > > first of all I have to say that Jelly is really great !
> > >
> > > I would suggest some refactoring about script management in
> > > JellyContext in order to allow pluggable strategies for, as an
> > > example, caching of compiled scripts and/or caching of templates.
> > > I think that it would be better if context management 
> (i.e. variable
> > > resolution),  script source management (i.e. templates 
> reading) and
> > > script compilation are  clearly separated concepts.
> > >
> > > Guido.
> > 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: 
> [EMAIL PROTECTED]
> > 
> > 
> 
> 
> 
> -- 
> http://www.multitask.com.au/people/dion/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to