CUSTOMER AREA
Login: Password:
General Information
Services
Bluelemon Scenarios
Download Lemonade
Lemonade Tutorial
Lemonade Distilled
How to build a service
1. Hello World!
2. moAccount
3. moBank
4. moBank: PIN
5. moBank: Blue SMS
moBank enhanced
LEMONADE DISTILLED
INGREDIENTS

  • Bluelemon, sticks’n’stones
    Solutions created by E-MARSON, described below.
  • Spring
    Popular framework for assembling components via configuration files.
    See Spring Framework home page for more information.
  • 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

  1. A set of instructions written as XML is converted into byte code by Bluelemon Buildtime Environment...
  2. ... and is executed in a Bluelemon Runtime Environment.
  3. 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.

  1. The sole functionality of the MIDlet is processing of Bluelemon byte code.
  2. 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.
  3. 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.

  1. 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.
  2. Nodes placed in the 'permanent' location are stored between midlet runs. Nodes in the 'temporary' location only last until the midlet is closed.
  3. Bluelemon resources can be stored be stored in so called packages in the midlet's memory. Nodes in packages are read-only.
  4. 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

  1. Even though its applicability may be broader, the primary purpose of sticks'n'stones is to assemble and generate fragments of Bluelemon code.
  2. 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>

Copyright 2008 E-MARSON Home   JavaPeople   JP Projects   About E-MARSON    Careers   Contact         Wersja polska