Discussion: Move Scripting Code To A Script Component

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

Discussion: Move Scripting Code To A Script Component

Adrian Crum-3
The code for scripting support is scattered across several different
components. I would like to move all scripting-related code to a
separate component called "script" or "scripting". I believe this will
help make things more modular and independent.

What do you think?

-Adrian

Reply | Threaded
Open this post in threaded view
|

Re: Discussion: Move Scripting Code To A Script Component

BJ Freeman
are you thinking of just mini, or js, grouvy or what ever?

Adrian Crum sent the following on 7/11/2012 7:16 AM:

> The code for scripting support is scattered across several different
> components. I would like to move all scripting-related code to a
> separate component called "script" or "scripting". I believe this will
> help make things more modular and independent.
>
> What do you think?
>
> -Adrian
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Discussion: Move Scripting Code To A Script Component

Jacques Le Roux
Administrator
In reply to this post by Adrian Crum-3
It's not quite clear to me

Jacques

From: "Adrian Crum" <[hidden email]>
> The code for scripting support is scattered across several different
> components. I would like to move all scripting-related code to a
> separate component called "script" or "scripting". I believe this will
> help make things more modular and independent.
>
> What do you think?
>
> -Adrian
>
Reply | Threaded
Open this post in threaded view
|

Re: Discussion: Move Scripting Code To A Script Component

Adrian Crum-3
In reply to this post by BJ Freeman
Mini-language could be moved to the script component or it could remain
its own component.

Some of the things that would be moved are:

ScriptHelper.java, Scriptlet.java, ScriptUtil.java, GroovyUtil.java,
BshUtil.java, javax.script.ScriptEngineFactory, ContextHelper.java,
ScriptHelperFactoryImpl.java, ScriptHelperImpl.java,
BeanShellEngine.java, GroovyBaseScript.groovy, GroovyEngine.java,
ScriptEngine.java, GroovyService.java, GroovyShellService.java,
GroovyShellThread.java, GroovyShellContainer.java, and
GroovyEventHandler.java.

Those files are scattered across 4 components.

Some of the things that could be removed are:

org.ofbiz.base.util.ScriptHelperFactory

-Adrian

On 7/11/2012 8:09 PM, BJ Freeman wrote:

> are you thinking of just mini, or js, grouvy or what ever?
>
> Adrian Crum sent the following on 7/11/2012 7:16 AM:
>> The code for scripting support is scattered across several different
>> components. I would like to move all scripting-related code to a
>> separate component called "script" or "scripting". I believe this will
>> help make things more modular and independent.
>>
>> What do you think?
>>
>> -Adrian
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: Discussion: Move Scripting Code To A Script Component

Jacopo Cappellato-4
Adrian,

it is an interesting proposal.
If I well understand your proposal then the new "scripting" component will depend on (mostly) all the 4 components... let me try to explain with an example.

A) in theory with the current setup you could enable the service component and that will give you access to all the scripting engines implemented under it; if not interested in web events you could disable the webapp component (ok, I guess this is not really possible at the moment... but it could be a goal for a future refactoring)
B) after your change you will need the service and scripting component, but the scripting component will depend on webapps etc.. (because in it there are also the implementation of a few scripting events)

So the risk is that the change will not really make the framework more modular.

Jacopo

On Jul 12, 2012, at 11:06 AM, Adrian Crum wrote:

> Mini-language could be moved to the script component or it could remain its own component.
>
> Some of the things that would be moved are:
>
> ScriptHelper.java, Scriptlet.java, ScriptUtil.java, GroovyUtil.java, BshUtil.java, javax.script.ScriptEngineFactory, ContextHelper.java, ScriptHelperFactoryImpl.java, ScriptHelperImpl.java, BeanShellEngine.java, GroovyBaseScript.groovy, GroovyEngine.java, ScriptEngine.java, GroovyService.java, GroovyShellService.java, GroovyShellThread.java, GroovyShellContainer.java, and GroovyEventHandler.java.
>
> Those files are scattered across 4 components.
>
> Some of the things that could be removed are:
>
> org.ofbiz.base.util.ScriptHelperFactory
>
> -Adrian
>
> On 7/11/2012 8:09 PM, BJ Freeman wrote:
>> are you thinking of just mini, or js, grouvy or what ever?
>>
>> Adrian Crum sent the following on 7/11/2012 7:16 AM:
>>> The code for scripting support is scattered across several different
>>> components. I would like to move all scripting-related code to a
>>> separate component called "script" or "scripting". I believe this will
>>> help make things more modular and independent.
>>>
>>> What do you think?
>>>
>>> -Adrian
>>>
>>>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Discussion: Move Scripting Code To A Script Component

Adrian Crum-3
That is true for now, but I was thinking farther down the road. For now
we could just consolidate the code in base, common, and minilang.

-Adrian

On 7/12/2012 10:40 AM, Jacopo Cappellato wrote:

> Adrian,
>
> it is an interesting proposal.
> If I well understand your proposal then the new "scripting" component will depend on (mostly) all the 4 components... let me try to explain with an example.
>
> A) in theory with the current setup you could enable the service component and that will give you access to all the scripting engines implemented under it; if not interested in web events you could disable the webapp component (ok, I guess this is not really possible at the moment... but it could be a goal for a future refactoring)
> B) after your change you will need the service and scripting component, but the scripting component will depend on webapps etc.. (because in it there are also the implementation of a few scripting events)
>
> So the risk is that the change will not really make the framework more modular.
>
> Jacopo
>
> On Jul 12, 2012, at 11:06 AM, Adrian Crum wrote:
>
>> Mini-language could be moved to the script component or it could remain its own component.
>>
>> Some of the things that would be moved are:
>>
>> ScriptHelper.java, Scriptlet.java, ScriptUtil.java, GroovyUtil.java, BshUtil.java, javax.script.ScriptEngineFactory, ContextHelper.java, ScriptHelperFactoryImpl.java, ScriptHelperImpl.java, BeanShellEngine.java, GroovyBaseScript.groovy, GroovyEngine.java, ScriptEngine.java, GroovyService.java, GroovyShellService.java, GroovyShellThread.java, GroovyShellContainer.java, and GroovyEventHandler.java.
>>
>> Those files are scattered across 4 components.
>>
>> Some of the things that could be removed are:
>>
>> org.ofbiz.base.util.ScriptHelperFactory
>>
>> -Adrian
>>
>> On 7/11/2012 8:09 PM, BJ Freeman wrote:
>>> are you thinking of just mini, or js, grouvy or what ever?
>>>
>>> Adrian Crum sent the following on 7/11/2012 7:16 AM:
>>>> The code for scripting support is scattered across several different
>>>> components. I would like to move all scripting-related code to a
>>>> separate component called "script" or "scripting". I believe this will
>>>> help make things more modular and independent.
>>>>
>>>> What do you think?
>>>>
>>>> -Adrian
>>>>
>>>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: Discussion: Move Scripting Code To A Script Component

BJ Freeman
so how would this work with a new scripting , like business basic.

Adrian Crum sent the following on 7/12/2012 2:56 AM:

> That is true for now, but I was thinking farther down the road. For now
> we could just consolidate the code in base, common, and minilang.
>
> -Adrian
>
> On 7/12/2012 10:40 AM, Jacopo Cappellato wrote:
>> Adrian,
>>
>> it is an interesting proposal.
>> If I well understand your proposal then the new "scripting" component
>> will depend on (mostly) all the 4 components... let me try to explain
>> with an example.
>>
>> A) in theory with the current setup you could enable the service
>> component and that will give you access to all the scripting engines
>> implemented under it; if not interested in web events you could
>> disable the webapp component (ok, I guess this is not really possible
>> at the moment... but it could be a goal for a future refactoring)
>> B) after your change you will need the service and scripting
>> component, but the scripting component will depend on webapps etc..
>> (because in it there are also the implementation of a few scripting
>> events)
>>
>> So the risk is that the change will not really make the framework more
>> modular.
>>
>> Jacopo
>>
>> On Jul 12, 2012, at 11:06 AM, Adrian Crum wrote:
>>
>>> Mini-language could be moved to the script component or it could
>>> remain its own component.
>>>
>>> Some of the things that would be moved are:
>>>
>>> ScriptHelper.java, Scriptlet.java, ScriptUtil.java, GroovyUtil.java,
>>> BshUtil.java, javax.script.ScriptEngineFactory, ContextHelper.java,
>>> ScriptHelperFactoryImpl.java, ScriptHelperImpl.java,
>>> BeanShellEngine.java, GroovyBaseScript.groovy, GroovyEngine.java,
>>> ScriptEngine.java, GroovyService.java, GroovyShellService.java,
>>> GroovyShellThread.java, GroovyShellContainer.java, and
>>> GroovyEventHandler.java.
>>>
>>> Those files are scattered across 4 components.
>>>
>>> Some of the things that could be removed are:
>>>
>>> org.ofbiz.base.util.ScriptHelperFactory
>>>
>>> -Adrian
>>>
>>> On 7/11/2012 8:09 PM, BJ Freeman wrote:
>>>> are you thinking of just mini, or js, grouvy or what ever?
>>>>
>>>> Adrian Crum sent the following on 7/11/2012 7:16 AM:
>>>>> The code for scripting support is scattered across several different
>>>>> components. I would like to move all scripting-related code to a
>>>>> separate component called "script" or "scripting". I believe this will
>>>>> help make things more modular and independent.
>>>>>
>>>>> What do you think?
>>>>>
>>>>> -Adrian
>>>>>
>>>>>
>>>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Discussion: Move Scripting Code To A Script Component

Adrian Crum-3
I don't understand the question, sorry.

-Adrian

On 7/12/2012 1:55 PM, BJ Freeman wrote:

> so how would this work with a new scripting , like business basic.
>
> Adrian Crum sent the following on 7/12/2012 2:56 AM:
>> That is true for now, but I was thinking farther down the road. For now
>> we could just consolidate the code in base, common, and minilang.
>>
>> -Adrian
>>
>> On 7/12/2012 10:40 AM, Jacopo Cappellato wrote:
>>> Adrian,
>>>
>>> it is an interesting proposal.
>>> If I well understand your proposal then the new "scripting" component
>>> will depend on (mostly) all the 4 components... let me try to explain
>>> with an example.
>>>
>>> A) in theory with the current setup you could enable the service
>>> component and that will give you access to all the scripting engines
>>> implemented under it; if not interested in web events you could
>>> disable the webapp component (ok, I guess this is not really possible
>>> at the moment... but it could be a goal for a future refactoring)
>>> B) after your change you will need the service and scripting
>>> component, but the scripting component will depend on webapps etc..
>>> (because in it there are also the implementation of a few scripting
>>> events)
>>>
>>> So the risk is that the change will not really make the framework more
>>> modular.
>>>
>>> Jacopo
>>>
>>> On Jul 12, 2012, at 11:06 AM, Adrian Crum wrote:
>>>
>>>> Mini-language could be moved to the script component or it could
>>>> remain its own component.
>>>>
>>>> Some of the things that would be moved are:
>>>>
>>>> ScriptHelper.java, Scriptlet.java, ScriptUtil.java, GroovyUtil.java,
>>>> BshUtil.java, javax.script.ScriptEngineFactory, ContextHelper.java,
>>>> ScriptHelperFactoryImpl.java, ScriptHelperImpl.java,
>>>> BeanShellEngine.java, GroovyBaseScript.groovy, GroovyEngine.java,
>>>> ScriptEngine.java, GroovyService.java, GroovyShellService.java,
>>>> GroovyShellThread.java, GroovyShellContainer.java, and
>>>> GroovyEventHandler.java.
>>>>
>>>> Those files are scattered across 4 components.
>>>>
>>>> Some of the things that could be removed are:
>>>>
>>>> org.ofbiz.base.util.ScriptHelperFactory
>>>>
>>>> -Adrian
>>>>
>>>> On 7/11/2012 8:09 PM, BJ Freeman wrote:
>>>>> are you thinking of just mini, or js, grouvy or what ever?
>>>>>
>>>>> Adrian Crum sent the following on 7/11/2012 7:16 AM:
>>>>>> The code for scripting support is scattered across several different
>>>>>> components. I would like to move all scripting-related code to a
>>>>>> separate component called "script" or "scripting". I believe this
>>>>>> will
>>>>>> help make things more modular and independent.
>>>>>>
>>>>>> What do you think?
>>>>>>
>>>>>> -Adrian
>>>>>>
>>>>>>
>>>>
>>
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: Discussion: Move Scripting Code To A Script Component

BJ Freeman
would a new scripting language be in the same component.

Adrian Crum sent the following on 7/12/2012 5:57 AM:

> I don't understand the question, sorry.
>
> -Adrian
>
> On 7/12/2012 1:55 PM, BJ Freeman wrote:
>> so how would this work with a new scripting , like business basic.
>>
>> Adrian Crum sent the following on 7/12/2012 2:56 AM:
>>> That is true for now, but I was thinking farther down the road. For now
>>> we could just consolidate the code in base, common, and minilang.
>>>
>>> -Adrian
>>>
>>> On 7/12/2012 10:40 AM, Jacopo Cappellato wrote:
>>>> Adrian,
>>>>
>>>> it is an interesting proposal.
>>>> If I well understand your proposal then the new "scripting" component
>>>> will depend on (mostly) all the 4 components... let me try to explain
>>>> with an example.
>>>>
>>>> A) in theory with the current setup you could enable the service
>>>> component and that will give you access to all the scripting engines
>>>> implemented under it; if not interested in web events you could
>>>> disable the webapp component (ok, I guess this is not really possible
>>>> at the moment... but it could be a goal for a future refactoring)
>>>> B) after your change you will need the service and scripting
>>>> component, but the scripting component will depend on webapps etc..
>>>> (because in it there are also the implementation of a few scripting
>>>> events)
>>>>
>>>> So the risk is that the change will not really make the framework more
>>>> modular.
>>>>
>>>> Jacopo
>>>>
>>>> On Jul 12, 2012, at 11:06 AM, Adrian Crum wrote:
>>>>
>>>>> Mini-language could be moved to the script component or it could
>>>>> remain its own component.
>>>>>
>>>>> Some of the things that would be moved are:
>>>>>
>>>>> ScriptHelper.java, Scriptlet.java, ScriptUtil.java, GroovyUtil.java,
>>>>> BshUtil.java, javax.script.ScriptEngineFactory, ContextHelper.java,
>>>>> ScriptHelperFactoryImpl.java, ScriptHelperImpl.java,
>>>>> BeanShellEngine.java, GroovyBaseScript.groovy, GroovyEngine.java,
>>>>> ScriptEngine.java, GroovyService.java, GroovyShellService.java,
>>>>> GroovyShellThread.java, GroovyShellContainer.java, and
>>>>> GroovyEventHandler.java.
>>>>>
>>>>> Those files are scattered across 4 components.
>>>>>
>>>>> Some of the things that could be removed are:
>>>>>
>>>>> org.ofbiz.base.util.ScriptHelperFactory
>>>>>
>>>>> -Adrian
>>>>>
>>>>> On 7/11/2012 8:09 PM, BJ Freeman wrote:
>>>>>> are you thinking of just mini, or js, grouvy or what ever?
>>>>>>
>>>>>> Adrian Crum sent the following on 7/11/2012 7:16 AM:
>>>>>>> The code for scripting support is scattered across several different
>>>>>>> components. I would like to move all scripting-related code to a
>>>>>>> separate component called "script" or "scripting". I believe this
>>>>>>> will
>>>>>>> help make things more modular and independent.
>>>>>>>
>>>>>>> What do you think?
>>>>>>>
>>>>>>> -Adrian
>>>>>>>
>>>>>>>
>>>>>
>>>
>>>
>>>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Discussion: Move Scripting Code To A Script Component

Adrian Crum-3
Yes, anything to do with scripting would go there.

-Adrian

On 7/12/2012 2:01 PM, BJ Freeman wrote:

> would a new scripting language be in the same component.
>
> Adrian Crum sent the following on 7/12/2012 5:57 AM:
>> I don't understand the question, sorry.
>>
>> -Adrian
>>
>> On 7/12/2012 1:55 PM, BJ Freeman wrote:
>>> so how would this work with a new scripting , like business basic.
>>>
>>> Adrian Crum sent the following on 7/12/2012 2:56 AM:
>>>> That is true for now, but I was thinking farther down the road. For
>>>> now
>>>> we could just consolidate the code in base, common, and minilang.
>>>>
>>>> -Adrian
>>>>
>>>> On 7/12/2012 10:40 AM, Jacopo Cappellato wrote:
>>>>> Adrian,
>>>>>
>>>>> it is an interesting proposal.
>>>>> If I well understand your proposal then the new "scripting" component
>>>>> will depend on (mostly) all the 4 components... let me try to explain
>>>>> with an example.
>>>>>
>>>>> A) in theory with the current setup you could enable the service
>>>>> component and that will give you access to all the scripting engines
>>>>> implemented under it; if not interested in web events you could
>>>>> disable the webapp component (ok, I guess this is not really possible
>>>>> at the moment... but it could be a goal for a future refactoring)
>>>>> B) after your change you will need the service and scripting
>>>>> component, but the scripting component will depend on webapps etc..
>>>>> (because in it there are also the implementation of a few scripting
>>>>> events)
>>>>>
>>>>> So the risk is that the change will not really make the framework
>>>>> more
>>>>> modular.
>>>>>
>>>>> Jacopo
>>>>>
>>>>> On Jul 12, 2012, at 11:06 AM, Adrian Crum wrote:
>>>>>
>>>>>> Mini-language could be moved to the script component or it could
>>>>>> remain its own component.
>>>>>>
>>>>>> Some of the things that would be moved are:
>>>>>>
>>>>>> ScriptHelper.java, Scriptlet.java, ScriptUtil.java, GroovyUtil.java,
>>>>>> BshUtil.java, javax.script.ScriptEngineFactory, ContextHelper.java,
>>>>>> ScriptHelperFactoryImpl.java, ScriptHelperImpl.java,
>>>>>> BeanShellEngine.java, GroovyBaseScript.groovy, GroovyEngine.java,
>>>>>> ScriptEngine.java, GroovyService.java, GroovyShellService.java,
>>>>>> GroovyShellThread.java, GroovyShellContainer.java, and
>>>>>> GroovyEventHandler.java.
>>>>>>
>>>>>> Those files are scattered across 4 components.
>>>>>>
>>>>>> Some of the things that could be removed are:
>>>>>>
>>>>>> org.ofbiz.base.util.ScriptHelperFactory
>>>>>>
>>>>>> -Adrian
>>>>>>
>>>>>> On 7/11/2012 8:09 PM, BJ Freeman wrote:
>>>>>>> are you thinking of just mini, or js, grouvy or what ever?
>>>>>>>
>>>>>>> Adrian Crum sent the following on 7/11/2012 7:16 AM:
>>>>>>>> The code for scripting support is scattered across several
>>>>>>>> different
>>>>>>>> components. I would like to move all scripting-related code to a
>>>>>>>> separate component called "script" or "scripting". I believe this
>>>>>>>> will
>>>>>>>> help make things more modular and independent.
>>>>>>>>
>>>>>>>> What do you think?
>>>>>>>>
>>>>>>>> -Adrian
>>>>>>>>
>>>>>>>>
>>>>>>
>>>>
>>>>
>>>>
>>
>>
>>


Reply | Threaded
Open this post in threaded view
|

Re: Discussion: Move Scripting Code To A Script Component

Erwan de FERRIERES-2
Adrian,
this is a nice idea.
so +1

2012/7/12 Adrian Crum <[hidden email]>:

> Yes, anything to do with scripting would go there.
>
> -Adrian
>
>
> On 7/12/2012 2:01 PM, BJ Freeman wrote:
>>
>> would a new scripting language be in the same component.
>>
>> Adrian Crum sent the following on 7/12/2012 5:57 AM:
>>>
>>> I don't understand the question, sorry.
>>>
>>> -Adrian
>>>
>>> On 7/12/2012 1:55 PM, BJ Freeman wrote:
>>>>
>>>> so how would this work with a new scripting , like business basic.
>>>>
>>>> Adrian Crum sent the following on 7/12/2012 2:56 AM:
>>>>>
>>>>> That is true for now, but I was thinking farther down the road. For now
>>>>> we could just consolidate the code in base, common, and minilang.
>>>>>
>>>>> -Adrian
>>>>>
>>>>> On 7/12/2012 10:40 AM, Jacopo Cappellato wrote:
>>>>>>
>>>>>> Adrian,
>>>>>>
>>>>>> it is an interesting proposal.
>>>>>> If I well understand your proposal then the new "scripting" component
>>>>>> will depend on (mostly) all the 4 components... let me try to explain
>>>>>> with an example.
>>>>>>
>>>>>> A) in theory with the current setup you could enable the service
>>>>>> component and that will give you access to all the scripting engines
>>>>>> implemented under it; if not interested in web events you could
>>>>>> disable the webapp component (ok, I guess this is not really possible
>>>>>> at the moment... but it could be a goal for a future refactoring)
>>>>>> B) after your change you will need the service and scripting
>>>>>> component, but the scripting component will depend on webapps etc..
>>>>>> (because in it there are also the implementation of a few scripting
>>>>>> events)
>>>>>>
>>>>>> So the risk is that the change will not really make the framework more
>>>>>> modular.
>>>>>>
>>>>>> Jacopo
>>>>>>
>>>>>> On Jul 12, 2012, at 11:06 AM, Adrian Crum wrote:
>>>>>>
>>>>>>> Mini-language could be moved to the script component or it could
>>>>>>> remain its own component.
>>>>>>>
>>>>>>> Some of the things that would be moved are:
>>>>>>>
>>>>>>> ScriptHelper.java, Scriptlet.java, ScriptUtil.java, GroovyUtil.java,
>>>>>>> BshUtil.java, javax.script.ScriptEngineFactory, ContextHelper.java,
>>>>>>> ScriptHelperFactoryImpl.java, ScriptHelperImpl.java,
>>>>>>> BeanShellEngine.java, GroovyBaseScript.groovy, GroovyEngine.java,
>>>>>>> ScriptEngine.java, GroovyService.java, GroovyShellService.java,
>>>>>>> GroovyShellThread.java, GroovyShellContainer.java, and
>>>>>>> GroovyEventHandler.java.
>>>>>>>
>>>>>>> Those files are scattered across 4 components.
>>>>>>>
>>>>>>> Some of the things that could be removed are:
>>>>>>>
>>>>>>> org.ofbiz.base.util.ScriptHelperFactory
>>>>>>>
>>>>>>> -Adrian
>>>>>>>
>>>>>>> On 7/11/2012 8:09 PM, BJ Freeman wrote:
>>>>>>>>
>>>>>>>> are you thinking of just mini, or js, grouvy or what ever?
>>>>>>>>
>>>>>>>> Adrian Crum sent the following on 7/11/2012 7:16 AM:
>>>>>>>>>
>>>>>>>>> The code for scripting support is scattered across several
>>>>>>>>> different
>>>>>>>>> components. I would like to move all scripting-related code to a
>>>>>>>>> separate component called "script" or "scripting". I believe this
>>>>>>>>> will
>>>>>>>>> help make things more modular and independent.
>>>>>>>>>
>>>>>>>>> What do you think?
>>>>>>>>>
>>>>>>>>> -Adrian
>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>>>
>
>



--
Erwan de FERRIERES