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
MOACCOUNT

This example is closer to real life application than the previous one.
It shows how to create a simple service that lets the user perform transfers, track account balance and transfer history.

You can run this example on your mobile phone by visiting the WAP site lemonade.e-marson.com and choosing 'moAccount'.

SCENARIO

The user downloads and runs the application.

Just after the installation the account balance and transaction history are empty.

The user can choose "Transfer" to open a transfer form. The form is validated to make sure that the amount does not exceed 500€.


After a successful transaction, the account balance and history are received from the server and the application's memory is updated. The data remains in the application's permanent memory store, so the user can access it without connecting to the Internet.


FUNCTIONAL DIAGRAM

The primary instruction in the functional diagram is MainScreen. This is the menu that contains three options:

  • Balance
    Displays AccountBalanceScreen - a form that presents the current account balance (as retrieved from the application's permanent memory store).
  • Transfer
    Displays TransferScreen, where the user gets two text input fields for the account balance and target account number. Command "OK" in that form calls Validate and - if the validation was successful - initialises transfer. (Notice that this is not a state diagram: there is no arrow for returning to TransferScreen if the validation fails. The application keeps displaying the form until a Bluelemon instruction replaces it with another screen)
  • History
    Displays a HistoryScreen which contains a list with transfer history. The details for every transfer can be displayed by choosing a list item and pressing "Select" to go to HistoryDetailsScreen.

A network, server-side process responsible for the transfer returns one of the two instructions: TransferFailed or TransferSucceeded.

LOCATION DIAGRAM

As the diagram shows:

  • All instructions that comprise client-side logic are located in the package "com/emarson/lemonade/examples/mobank/moaccount" - either directly or wrapped by other instructions.
  • The transfer process is run on the server side. The standard "lining code" is replaced by DownloadingScreen - a screen that displays a connection progress bar.
  • The instructions store data in three nodes at the location "permanent".

Note: arrows pointing to a labelled ellipse should actually point to the box with that label. We use this notation to avoid long or overlapping arrows.

DEPLOYMENT STRATEGY

Just like in the first example we need one installer which will be wrapped in a MIDlet.

Installer:

URL mapping:

SOURCE CODES

Take a look at all the s'N's processes for this example >>>

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