Re: Discussion: Service Engine Refactoring

2014-09-01 Thread Adrian Crum
https://issues.apache.org/jira/browse/OFBIZ-5743 Adrian Crum Sandglass Software www.sandglass-software.com On 9/1/2014 7:26 AM, Jacopo Cappellato wrote: I would like to review your work; could you please commit the changes to an experimental branch or at least share a patch in Jira? Thanks,

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Jacopo Cappellato
I would like to review your work; could you please commit the changes to an experimental branch or at least share a patch in Jira? Thanks, Jacopo On Aug 31, 2014, at 8:35 PM, Adrian Crum wrote: > I have this done. The change is quite subtle, and it will pave the way for > removing GenericDe

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Adrian Crum
I have this done. The change is quite subtle, and it will pave the way for removing GenericDelegator references from the service engine. I will wait a few days before committing so others have time to respond. Adrian Crum Sandglass Software www.sandglass-software.com On 8/31/2014 9:50 AM, Adri

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Adrian Crum
Here is some ASCII art that might help: DispatchContext (a container for objects needed by service implementations) | |__ (references) LocalDispatcher (an application-specific service dispatcher) | |__ (delegates to) ServiceDispatcher

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Jacques Le Roux
For now there is only a link to services.html from the tutorial. The best place to add another link seems https://cwiki.apache.org/confluence/display/OFBTECH/Service+Engine+Guide Jacques Le 31/08/2014 12:14, Pierre @GMail a écrit : That is a nice piece of explanation. Should be part of the doc

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Adrian Crum
That's fine. The opportunity will be there if anyone wants to explore it. It is not something I will push for. Adrian Crum Sandglass Software www.sandglass-software.com On 8/31/2014 10:54 AM, Jacopo Cappellato wrote: On Aug 31, 2014, at 10:50 AM, Adrian Crum wrote: However, it will open u

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Pierre @GMail
That is a nice piece of explanation. Should be part of the documentation, if it is not already. Regards, Pierre Sent from my iPhone > On 31 aug. 2014, at 11:56, Jacopo Cappellato > wrote: > > >> On Aug 31, 2014, at 11:36 AM, Jacopo Cappellato >> wrote: >> >> a) what is the original c

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Adrian Crum
Inline... Adrian Crum Sandglass Software www.sandglass-software.com On 8/31/2014 10:36 AM, Jacopo Cappellato wrote: Thank you Adrian, please see inline: On Aug 31, 2014, at 10:50 AM, Adrian Crum wrote: Currently, the service engine classes are a bit muddled. GenericDispatcher (the defaul

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Adrian Crum
That last paragraph describes the cleanup I want to do. If a LocalDispatcher contains things specific to an application, then why are some of those things kept in GenericDispatcher and others are kept in DispatchContext? This is the feature-envy part - they are both trying to be the same thing.

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Jacopo Cappellato
On Aug 31, 2014, at 11:36 AM, Jacopo Cappellato wrote: > a) what is the original concern of DispatchContext and of GenericDispatcher This comes from this old but still interesting document: http://ofbiz.apache.org/docs/services.html *Service Dispatche

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Jacopo Cappellato
On Aug 31, 2014, at 10:50 AM, Adrian Crum wrote: > However, it will open up the possibility to improve the API. For example, > instead of this service implementation: > > public static Map myService(DispatchContext dctx, Map Object> context) { > Locale locale = (Locale) context.get("locale")

Re: Discussion: Service Engine Refactoring

2014-08-31 Thread Jacopo Cappellato
Thank you Adrian, please see inline: On Aug 31, 2014, at 10:50 AM, Adrian Crum wrote: > Currently, the service engine classes are a bit muddled. GenericDispatcher > (the default LocalDispatcher implementation) and DispatchContext have feature > envy. Some functionality in DispatchContext bel

Discussion: Service Engine Refactoring

2014-08-31 Thread Adrian Crum
Currently, the service engine classes are a bit muddled. GenericDispatcher (the default LocalDispatcher implementation) and DispatchContext have feature envy. Some functionality in DispatchContext belongs in ServiceDispatcher. I would like to clean this up a bit and provide better separation o