Sg2.0
Bean Properties
Recent
The concept of Bean Properties might be a bit confusing at first sight, but they are great helpers as they facilitate the integration of Java classes in the JavaScript environment a lot and are used everywhere in Scriptographer.

Bean Properties are wrappers for Java getter and setter methods. They hide these methods behind a simple JavaScript property that calls the getter method when the value is retrieved and the setter method when it is set.

So if a Java class has a method called getSomeValue that returns a value and and another called setSomeValue that sets a value, the JavaScript wrapper automatically defines a Bean Property for this prototype called someValue, that wraps these methods. Note the change of case of the first character!

In Scriptographer, all prototypes are in fact Java classes that can be used both in scripts (through the Rhino JavaScript Engine), and also directly from Java. For example the Scriptographer interface itself is written in Java, using the same classes that hide behind the JavaScript prototypes. This automatic wrapping in Bean Properties and List Prototypes allows faster development and only one code base for more than one language (Java and JavaScript, but theoretically also others, like JRuby, Jython, etc).
[Unhandled Macro: this.documentationColumn]
Scripts
21.08.08, 19:19
18.08.08, 20:11
18.08.08, 19:56
23.05.08, 04:41
01.03.08, 14:43
Posts
21.08.08, 19:21
21.08.08, 15:45
20.08.08, 16:38
20.08.08, 15:02
20.08.08, 01:15
Interactive Tools 16.06.06
If you use Scriptographer regularly, please consider making a donation via PayPal: $$$ €€€ £££ CHF