jastrachan | 7 Apr 16:49 2004
Picon

Re: Properties

On 7 Apr 2004, at 00:37, Bill Burdick wrote:
> Yo Chris,
>
> I believe what it gets down to is simply this: can you use bean.x to 
> access a Java Bean property or not.  If you can, then I think the 
> rules I've outlined provide a simple set of rules to resolve the 
> lookup.  If you can't use bean.x, then I guess I'm confused about the 
> point of this thread.
>
> The two other Java scripting systems that I've used, JavaScript and 
> OGNL have property rules very similar to the ones that I've 
> summarized.  Specifically, the magic dot.  I don't think people who 
> have used JavaScript to script beans would agree that it takes an 
> expert to figure out how the dot works.  Please note that these 
> systems have been used for YEARS to script Java and I've never seen 
> arguments like this against accessing properties.  In fact, the user 
> community for OGNL has caused it to do even MORE magic stuff (OGNL is 
> basically like GPATH -- kind of a mini Groovy: http://ognl.org/).

Agreed. Add to that list things like Velocity, JSP EL, JSTL, JSF, most 
UI builders, bean property configuration tools (remember beanbox?) and 
those IDE properties views,  XMLEncoder in the JDK and I'm sure much 
more besides.

Getting & setting bean properties is a pretty basic behaviour that 
Java-centric tools have been doing for years and years.

> Actually, the property accessing stuff is one of the deciding factors 
> for me for a Java scripting language.  One of the many uses to which I 
> put these things is putting GPATH-like things into config files and 
> such.  The magic dot can be crucial for this type of application.

Agreed. Its a basic feature which is in every java-scripty-language 
I've ever seen and quite right too. I can't even imagine a sensible 
scripting language not supporting Java Bean properties.

James
-------
http://radio.weblogs.com/0112098/

Gmane