On 3/15/02 5:59 AM, "Gabriel Sidler" <[EMAIL PROTECTED]> wrote:
> Bill Burton wrote: > > ... > >> Geir wrote: > >>> A great example of application differences are scopes... Darn important >>> (sadly) in the servlet environment, but utterly irrelevant in Ant-driven >>> tasks. > > > Really? Conceptually, aren't there tools that apply to all templates of > a batch (global scope) and potentially others that are specific to a > particular template of a batch (local scope). That's really far-fetched :) Isn't that a misuse of the concept of scope? You are talking more about the notion of a pull model, where the template itself decides on which tool to use and picks it accordingly out of the context. Scopes are more for compartmentalizing within some kind of locality of execution. And the model is different - in DVSL, there is one template, multiple data passes, and the renderings aren't concurrent (although give me time, give me time - the things you think of with a multiprocessor box...) > > An example of a tool with local scope would be one that provides access > to the ant envrionment, like inputfilename, outputfilename, etc. But that's not just an ant concept, btw. That could be any program that uses DVSL... > > Even if you have only one scope in a particular environment, it seems to > me that it is not completely irrelevant to have the concept of scope. > At least you could say something like "all tools have global scope" which > would indicate that a tools is loaded once and used for all templates > being processed, etc. Now that is confusing the partitioning with instance-kind - i.e. New instance vs singleton. To argue from another angle, what do you do when you have a tool that can be shared across all request scopes? How do I indicate that? You could argue it's moot - because you just drop it into the context, but I think this is muddling the ideas. And remember, I hate the scope concept :) I think it should have been hidden from the app programmer / jsp author. > It would be nice if we could establish some common terminology with > regard to context tools across several envrionments (having in the > back of my mind always the idea of setting up a library of context > tools). Yep > >> Despite that, the XML used to declare tools for the DVSL Task could be >> made nearly the same as that for Velocity Context tools. The only >> difference being that there would be no way to specify a scope attribute >> to the DVSL Task. > > > It would be really nice if we could agree on some common format for the > XML used to specify tool! That would be an important step towards fostering > the reuse of tools. > Well, it might be an important step towards fostering the resuse of the same toolbox. I think people reuse the tools already -- Geir Magnusson Jr. [EMAIL PROTECTED] System and Software Consulting POC lives! -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
