events is available in many parts of the
application, giving user the possibility to
highly customize the application basic
functionalities. We call this module Event
Handling Module (EHM)
2. The final user can write his own web
services to be embedded directly into the
application. In this way the application can
be easily extended with the introduction of
new services that can be served to some
external applications supplying some extra
functionality (ex. ERP applications). We
call this module Web Services Extension
Module (WSEM)
3. Allowing a sort of dynamic class-loading
(as in Java Language) we can give to the
user the possibility to plug/unplug parts of
the application modifying the standard
application behaviours simply by changing
in a text file (XML or properties file) a
class-name declaration (the extension
point) with another one. This can be easily
obtained using a Dependency Injection
Framework in Application Design like the
Spring Framework or the Jboss
Microcontainer if the application is written
in the Java language. We call this module
the Application Microcontainer
4. The application can be logically divided
into many services that can be
plugged/unplugged based on business
needs. For example the graphical user
interface (GUI) can be decoupled by the
low level services so that customers can use
only low level services to write their own,
customized, GUI. If the application is
designed as an aggregation of services also
the API framework used for writing the
application can be published to final users
that will use the APIs to interoperate with
the various services. For example a specific
service of the application can act himself
like a provider and can publish a set of
client-API that can be used by the GUI
framework to communicate with this
provider taking the information needed to
render a web page. In this case the entire
Service (like the GUI module) can be
considered an extension point because of
the possibility to plug it with a completely
new module written by the final user that
unplugs the original one shipped with the
application.
For the purpose of simplifying customized code
writing we built a Scripting Engine called SEE
(Scripting Embedded Engine) (Sponziello, 2006). It
is behind the scenes of many modules and gives
users the possibility to write custom code in the easy
way provided by scripting languages instead of
compiled ones (like Java). The primary script
languages used by our framework are basically
Groovy, JRuby and Javascript (see References).
They are directly supported and well integrated by
the Java platform. This script technologies easily
provide a simple way to write custom event
handlers, routines or Web Services without the need
of recompilation and with a more user-friendly
syntax. It is important to mention the MOP (Meta
Object Programming) capabilities of the Groovy and
JRuby languages that helps programmers to easily
write DSL (Domain Specific Languages) or the open
classes and duck typing features of either Groovy,
JRuby and Javascript that enhance flexibility of code
scripts giving some features unavailable to the Java
language that we used to write the application itself
(Freeman, 2006).
2.1 The Event Handling Module
(EHM)
The application we are considering supports a wide
set of events, such as:
Table 1: Main application Events.
Event Group Events
Communication OnNewPosition
CRUD
OnMobileNew,
OnMobileUpdate,
OnMobileDelete
GIS OnMapDraw, OnLayerDraw
GUI
OnLogin, OnPageRenderStart,
OnMenuRender
The application processes the arrival of a new GPS
position from the mobile resource in this way:
- stores the position into the database (latitude,
longitude, speed, direction, altitude, board signals,
sampled weather conditions etc.)
- updates related position information (vehicle
status for example)
- verifies some geofence (TODO: explain
Geofence) feature and eventually notifies that event
occurred with a standard message (sms and/or email)
to a set of user-defined addresses.
ICE-B 2007 - International Conference on e-Business
108