On Mon, 24 Jan 2005 02:27:59 +0100, Claude Brisson <[EMAIL PROTECTED]> wrote:
> On Mon, 2005-01-24 at 02:24 +0900, Shinobu Kawai Yoshida wrote:
> > Hi Claude,
...
> > > And a suggestion on the same subject:
> > >
> > > Maybe we could have the syntax of the scope element be:
> > > application | session | request | <url regexp>
> > > in toolbox.xml to refine scopes at a thiner level than the request
> > > scope.
> >
> > Sorry, but I'm not quite getting it.  How would one use it?  The <url
> > regexp>, I mean.
> 
> This is also meant at providing some optimization. Tools with such a
> scope would be request tools that are instanciated if and only if the
> url of the request matches the regexp provided in the toolbox.xml. It
> seems to me that this approach is far better MVC than the
> $toolLoader.loadTool("thetool") approach.
> 
> For instance, a SearchTool can be put in the context only if the url is
> like /search/*.vm

gotcha.  and yeah, this has potential to be quite cool.  i could see
possible use for perfomance tweaking or for security.
 
> In fact I am more or less ready to code those suggestions, but I wanted
> to somehow discuss the specs here so it get more chances to get commited
> as is.

well, the first question is, "how do we do the pattern/path
matching/restricting efficiently?"  if we use regular expressions, i
wonder if it would become a more expensive operation to do the
matching than to just create the tool.  i'm no expert and have run no
tests, but i have the impression that regular expressions can be heavy
lifting, especially compared to the init cost for a simple tool.

my second question would be, "how/where do you see us specifying these
restrictions in the toolbox definition?"

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

Reply via email to