You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Dishara Wijewardana <dd...@gmail.com> on 2012/06/05 17:10:18 UTC

Reusing some of classes comes with JSR 223 API

Hi all,
This is to get to know the $subject.

Because I have seen in some JSR 223 vendors, they directly reusing some of
inbuilt classes that comes with this API.
There are, such built in classes like
javax.script.ScriptEngineManager, SimpleBindings and SimpleScriptContext.

But as I feel, if we use SimpleScriptContext, the velocity context behavior
may dismiss from our implementation.
But ScriptEngineManager can be directly use as I feel.

*This is just an initial thought* from me, and how these really would
impact or whether we can reuse those classes/or can't may arise
during the implementation of VelocityScriptEngineManager. I have already
implemented VelocityScriptEngineFactory and will commit that too ASAP.

Will update the dev of this regarding $subject in future.


-- 
Thanks
/Dishara

Re: Reusing some of classes comes with JSR 223 API

Posted by Dishara Wijewardana <dd...@gmail.com>.
On Fri, Jun 8, 2012 at 1:34 PM, Claude Brisson <cl...@renegat.net> wrote:

> I guess those vendors don't already have internal classes for Bindings
> and ScriptContext. So they can use the simple versions provided by the
> JSR. It's a bit different for us, since we already implement related
> concepts, so the adequate approach here is to use some wrapping around
> our already existing classes (around Context for the Bindings, and
> around VelocityInstance for the ScriptContext, if I understand
> correctly).
>
+1

>
> The case of the ScriptEngineManager is totally different. We don't have
> such a thing, and we need it. Plus, it's not an optional piece of the
> JSR classes like the Simple* classes. We have to use it directly, of
> course.
>
> +1

>
>  Claude
>
> On Tue, 5 Jun 2012 20:40:18 +0530
> Dishara Wijewardana <dd...@gmail.com> wrote:
>
> > Hi all,
> > This is to get to know the $subject.
> >
> > Because I have seen in some JSR 223 vendors, they directly reusing
> > some of inbuilt classes that comes with this API.
> > There are, such built in classes like
> > javax.script.ScriptEngineManager, SimpleBindings and
> > SimpleScriptContext.
> >
> > But as I feel, if we use SimpleScriptContext, the velocity context
> > behavior may dismiss from our implementation.
> > But ScriptEngineManager can be directly use as I feel.
> >
> > *This is just an initial thought* from me, and how these really would
> > impact or whether we can reuse those classes/or can't may arise
> > during the implementation of VelocityScriptEngineManager. I have
> > already implemented VelocityScriptEngineFactory and will commit that
> > too ASAP.
> >
> > Will update the dev of this regarding $subject in future.
> >
> >
>
>


-- 
Thanks
/Dishara

Re: Reusing some of classes comes with JSR 223 API

Posted by Claude Brisson <cl...@renegat.net>.
I guess those vendors don't already have internal classes for Bindings
and ScriptContext. So they can use the simple versions provided by the
JSR. It's a bit different for us, since we already implement related
concepts, so the adequate approach here is to use some wrapping around
our already existing classes (around Context for the Bindings, and
around VelocityInstance for the ScriptContext, if I understand
correctly).

The case of the ScriptEngineManager is totally different. We don't have
such a thing, and we need it. Plus, it's not an optional piece of the
JSR classes like the Simple* classes. We have to use it directly, of
course.


  Claude

On Tue, 5 Jun 2012 20:40:18 +0530
Dishara Wijewardana <dd...@gmail.com> wrote:

> Hi all,
> This is to get to know the $subject.
> 
> Because I have seen in some JSR 223 vendors, they directly reusing
> some of inbuilt classes that comes with this API.
> There are, such built in classes like
> javax.script.ScriptEngineManager, SimpleBindings and
> SimpleScriptContext.
> 
> But as I feel, if we use SimpleScriptContext, the velocity context
> behavior may dismiss from our implementation.
> But ScriptEngineManager can be directly use as I feel.
> 
> *This is just an initial thought* from me, and how these really would
> impact or whether we can reuse those classes/or can't may arise
> during the implementation of VelocityScriptEngineManager. I have
> already implemented VelocityScriptEngineFactory and will commit that
> too ASAP.
> 
> Will update the dev of this regarding $subject in future.
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org