On Mar 15, 2012, at 9:38 AM, Adrian Crum wrote:

> On 3/15/2012 7:57 AM, Jacopo Cappellato wrote:
>> Not only this; well, yes it is simply this at the technical level but it is 
>> much much more in the end result and approach: in fact in my poc I have laid 
>> out some simple but very effective best practices for programming services 
>> and events: the code I added is minimal (a few lines... that after Adrian's 
>> refactoring became 10 times more... but the OFBiz community likes heavy 
>> stuff :-) )
> 
> The refactoring might have added a few lines to the Groovy implementation, 
> but it also eliminates the need for these classes:
> 
> BshUtil.java
> GroovyUtil.java
> BeanShellEngine.java
> BSFEngine.java
> GroovyEngine.java
> BsfEventHandler.java
> GroovyEventHandler.java
> 
> and when mini-language implements JSR-223, these classes will not be needed:
> 
> SimpleEventHandler.java
> SimpleServiceEngine.java
> 
> The refactoring also adds support for many more scripting languages.
> 
> So, I'm having a hard time understanding how the elimination of nine classes 
> (1100 lines of code) while adding support for more scripting languages can be 
> considered "heavy stuff."

Adrian, it was a joke not real criticism on you.
However I was not talking about the JSR-223 work in general but about the 
conversion of the specific DSL language class into the helper/factory pattern; 
that added a lot of code to a poc class that was intended to enhance Groovy for 
OFBiz. But you are right, in *theory* 100 different languages could use the new 
helper classes now and at that point the overhead would make a lot of sense: 
but we will never really know if they will be used out of OFBiz.

Jacopo

> 
> -Adrian
> 

Reply via email to