You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Christopher Snow <sn...@coralms.com> on 2007/04/03 10:27:07 UTC

TIP: minilang more understandable after learning java services

 From my experience of learning minilang, I have decided it's much  
easier to understand minilang services after looking at java services.

Maybe it's because using objects from the context are explicit with  
java?

Any comments? ...


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


Re: TIP: minilang more understandable after learning java services

Posted by Jonathon -- Improov <jo...@improov.com>.
Christopher,

No, not after looking at Java services. I think you'll find more common ground between Minilang 
and widgets. Both use context parameters as variables.

Minilang is really just Java, but encapsulated in some XML-based language. Chances are you may 
find some Java services doing similar things as some Minilang services. So perhaps that's why you 
see things click when using that perspective.

For all of Minilang's features and toolsets, there is a Java counterpart. Or rather, you can 
always invoke the same feature using Java (or beanshell).

There is no easy way to learn Minilang, except just try to look through the examples. Actually, 
the online docs for Minilang is pretty good already (unlike the ones for widgets).

One problem. There isn't much in the way of exception handling in Minilang (unlike in 
Java/beanshell). I try to use Minilang wherever possible, though, simply because it's a lot more 
concise than Java/beanshell.

By the way, you can also use purely beanshell to do your services. Beanshell scripts can be 
organized into methods, much like OO programming and encapsulation in Java. What's more, you can 
use beanshell scripts in services as well as in widgets. Maximum code reuse, without touching Java 
(I hate to compile).

There's nothing OO in Minilang, I think.

Jonathon

Christopher Snow wrote:
>  From my experience of learning minilang, I have decided it's much 
> easier to understand minilang services after looking at java services.
> 
> Maybe it's because using objects from the context are explicit with java?
> 
> Any comments? ...
> 
> 
> --This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> --No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.446 / Virus Database: 268.18.25/743 - Release Date: 
> 4/2/2007 4:24 PM
> 
>