On Mar 16, 2012, at 12:49 AM, David E Jones wrote:
This is an interesting point. I thought about it a lot for Moqui and
ended up doing much more simple XML Actions, though actually enhancing
the entity find operations, and changed them to match the API better
(and handle things like the current find services do so that those
services aren't needed).

The reason for getting rid of lots of stuff but enhancing things like
the entity find operations was because the main value I see for this is
quick/easy embedded data preparation in screens, and in Moqui service
implementations that are inline in the service definition (ie so you
don't need a separate file for the implementation of the service).

In other words, it's nice to have something that is easy to use inside
the many existing XML files, and something like the simple-method fits
the bill well.

What really bothers me with the simple-method stuff in OFBiz whenever I
use it is the inconsistency between the simple-method, screen actions,
form actions, etc, and the inconsistent handling of expressions and such
for field, from-field, value, etc attributes. Having everything use the
same XSD and having everything actually be a groovy expression (since it
is just transformed into a groovy script) made it much easier and less
frustrating to use.


One of the reasons for the overhaul is to fix some of those inconsistencies, and to improve data-type handling.

In my review of the mini-language code, I see two main problems:

1. The original mini-language treated everything as Strings. This causes a multitude of problems because of all the String-to-SomeClass and SomeClass-to-String conversions. The overhaul will fix that. 2. There is no syntax checking. No exceptions are thrown when invalid XML is encountered during parsing, and any invalid syntax encountered during runtime is hidden in verbose log messages. So, there is no way for the developer to know they have done something wrong.

On top of the implementation problems, there are documentation problems. The schemas are incorrect, and information on mini-language behavior is scattered across a number of wiki pages. The overhaul will fix that by creating an authoritative mini-language reference page, update the code to follow that reference, and then update the schemas to match the code and reference.

https://cwiki.apache.org/confluence/display/OFBADMIN/Mini-language+Reference

-Adrian

Reply via email to