 |
LEMONADE DISTILLED |
|
 |
INGREDIENTS |
|
-
Bluelemon, sticks’n’stones
Solutions created by E-MARSON, described below.
-
Lemonade
Framework solution delivered by E-MARSON on a BSD license.
This is a web application built on Spring framework, which includes
binary distributions of Bluelemon and sticks'n'stones.
It can be used for (but is not limited to) adding a new view layer
that makes an existing solution accessible from mobile phones.
|
 |
BLUELEMON |
|
- A set of instructions written as XML is converted into byte code
by Bluelemon Buildtime Environment...
- ... and is executed in a Bluelemon Runtime Environment.
- We provide a MIDlet that implements the Bluelemon Runtime Environment (BRE)
for the J2ME platform (Java-capable mobile devices). We have also
ported the BRE to .NET Compact Framework (Windows Mobile smart devices and
desktop computers) and JavaScript/HTML (web browsers), but we focus on th J2ME platform
which remains our primary target.
|
 |
BLUELEMON IN MIDLET |
|
The Lemonade package includes precompiled classes that are assembled on-the-fly
by the sticks'n'stones environment to produce a MIDlet that is downloaded and
installed on the user's mobile phone. This MIDlet consists of the precompiled
Bluelemon Runtime Environment (BRE) and the solution-specific application
logic compiled into Bluelemon byte code and stored in res/s.blue resource
in the MIDlet jar.
-
The sole functionality of the MIDlet is processing of Bluelemon byte code.
-
Bluelemon Runtime Environment exposes two kinds of objects: managers and classes.
Managers are special objects responsible for basic operations such as persistency
or networking.
Classes expose MIDlet/J2ME features such as GUI elements to Bluelemon code.
Developers can create their own classes and add them to precompiled MIDlet.
-
When the MIDlet is first run on the user's device, the res/s.blue
resource file is read and executed. On every next launch of the MIDlet,
the STARTUP_INSTRUCTION node from 'permanent' location is read and executed
(see below).
|
 |
NODES IN MIDLET |
|
Nodes are used for identifying a resource and provide a mean of locating the resource.
The node consists of two elements - name and location. The name should be unique in a given location.
-
The locations 'permanent' and 'temporary' are available while
the application is running.
Nodes stored in those locations are available for both read and
write access.
-
Nodes placed in the 'permanent' location are stored between
midlet runs. Nodes in the 'temporary' location only last until the
midlet is closed.
-
Bluelemon resources can be stored be stored in so called packages
in the midlet's memory. Nodes in packages are read-only.
-
Bluelemon code can refer to the nodes: execute code stored in
the nodes, read and write their content. Examples:
<blue:call node="STARTUP_INSTRUCTION"
location="permanent"/>
<blue:get node="B" location="@package1"
toVariable="image"/>
<blue:set node="F" location="permanent">
<blue:argument type="variable" name="image"/>
</blue:set>
|
 |
STICKS'N'STONES AND SPRING |
|
-
Even though its applicability may be broader, the primary purpose of
sticks'n'stones is to assemble and generate fragments of Bluelemon code.
-
In the Spring MVC model, a sticks'n'stones process is the view layer.
Lemonade delivers two standard implementations of
View:
SNSJarView that generates a Bluelemon MIDlet and SNSProcessView that implements
the 'network' location by exposing sticks'n'stones processes to remote Bluelemon
calls like:
<blue:call node="exampleNode" location="network">
<blue:argument type="variable" name="userName"/>
<blue:argument type="int" value="8500"/>
</blue:set>
|