Developing Google Android Mobile Clients for Web Services: a Case Study - newPresentation modalit 340 ...

Page created by Willie Griffin
 
CONTINUE READING
Developing Google Android Mobile Clients for Web Services: a Case Study - newPresentation modalit 340 ...
Facoltà di Ingegneria
Corso di Studi in Ingegneria Informatica   Developing Google Android Mobile Clients for Web Services: A Case Study

 tesi di laurea
 Developing Google Android Mobile Clients
 for Web Services: a Case Study
 Anno Accademico 2007/2008

  relatore
  Ch.mo prof. Stefano Russo
 correlatore
 Ing. Marcello Cinque
 candidato
 Vito Daniele Cuccaro
 Matr. 885/83
Developing Google Android Mobile Clients for Web Services: a Case Study - newPresentation modalit 340 ...
Facoltà di Ingegneria
  Corso di Studi in Ingegneria Informatica          Developing Google Android Mobile Clients for Web Services: A Case Study

Main issue
Is the new Google Android platform mature for developing
mobile clients for Web Services?

                                             Goal of the Thesis
Evaluating the Android platform through a case study (porting
of a J2ME client for accessing Wireless Sensor Networks).

Contributions
Pros and Cons of Android for WS mobile clients.
Fitting and Testing of the KSOAP solution for WS on Android.
Proposal of a new Android-
                    Android-specific design pattern (AVA) for
translating the popular MVC pattern.
Developing Google Android Mobile Clients for Web Services: a Case Study - newPresentation modalit 340 ...
Facoltà di Ingegneria
  Corso di Studi in Ingegneria Informatica   Developing Google Android Mobile Clients for Web Services: A Case Study

                                                                 Operational Model
Background: Web Services
 The most common
  implementation of SOA

Key benefits:
 Accessible by anyone,
  anywhere and from any device
 B2B and EAI support
 Dynamic location and
  invocation of services                                Core Standards
 Interoperability among                                  XML and ebXML
  heterogeneous applications                              WSDL and UDDI
 Standard protocols and                                  SOAP
                                                           SOAP,, the de facto standard
  data exchange format                                     for invoking Web Services
Developing Google Android Mobile Clients for Web Services: a Case Study - newPresentation modalit 340 ...
Facoltà di Ingegneria
    Corso di Studi in Ingegneria Informatica   Developing Google Android Mobile Clients for Web Services: A Case Study

Background:: The Google Android Mobile Platform
Background
 A software stack for mobile devices including
  OS, middleware and key applications
Key features:                                                      Software Stack
 Developed within OHA
 Open source under
  Apache license
 Laying on a Linux 2.6
  Kernel
 Applications written in
  Java
 Has its own APIs (as well
  as some of Java)
 Uses its own VM (Dalvik)
Facoltà di Ingegneria
      Corso di Studi in Ingegneria Informatica           Developing Google Android Mobile Clients for Web Services: A Case Study

Developing an Android Application
                                                 Application Lifecycle
Main components:                                                                           Toolbox:
   Activity                                                                                Eclipse (or
   Service                                                                                  NetBeans)) plugin
                                                                                             NetBeans
   Broadcast Receiver                                                                      Full
                                                                                             Full--featured SDK
   Content Provider                                                                         with Debug Monitor
                                                                                            Device Emulator
Other key concepts:
                                                                                            Online Doc and
   Intent
                                                                                             Support
   Intent Filter
   Notification
   Manifest
   XML--defined GUI
    XML                                                                                                               R.java
Facoltà di Ingegneria
    Corso di Studi in Ingegneria Informatica   Developing Google Android Mobile Clients for Web Services: A Case Study

Android and Web Services: state of the art
 No native solutions available yet
  (SOAP APIs for WS invocation)
                                                              KSOAP
Main Developers’ proposals                                     A popular open-
                                                                           open-source
 “Homemade” solution:                                          mobile--oriented
                                                                mobile
  HTTP connection +                                             SOAP implementation
  manual XML parsing (SAX)                                     Basically a client library for
                                                                invoking web services
                                                               Tested on Java-
                                                                           Java-based
 kXML
  kXML--RPC (lightweight solution)
                                                                devices
                                                               Now in version 2
 KSOAP
                                                                (1 is deprecated)
Facoltà di Ingegneria
   Corso di Studi in Ingegneria Informatica   Developing Google Android Mobile Clients for Web Services: A Case Study

Case Study: the ICAAS framework for accessing WSN
 Software architecture for accessing Wireless Sensor Networks
  developed at Mobilab within the REMOAM project
  (by CINI and Strago s.r.l.
                      s.r.l.))
                                            The Architecture
 Non standard implementation
  of the OGC Sensor Web
  Enablement specifications

Key features:
 Interoperable & Configurable
 Extensible
 Requests optimization
  (Caching and Filtering)
 ROA and SOA access
Facoltà di Ingegneria
     Corso di Studi in Ingegneria Informatica       Developing Google Android Mobile Clients for Web Services: A Case Study

ICAAS Web Services                              ICAASMobile: a J2ME test client
for SOA access:                                    SOA access to ICAAS through WS
                                                   Real Time monitoring of WSN
   Notification Service
                                                   Session management
   Observation Service
                                                   Tested with a WSN simulator
   Collection Service
   Alert Service
   Planning Service

Technology note:
Apache Axis
(a Java-
   Java-based SOAP
implementation)
used for WS deployment
Facoltà di Ingegneria
   Corso di Studi in Ingegneria Informatica   Developing Google Android Mobile Clients for Web Services: A Case Study

Case Study: Porting ICAASMobile from J2ME to Android
   A typical porting process

 Assessing Migration Feasibility              1.       All functions of the original client are
                                                       achievable on Android (doubts were
                                                       raised about invoking Web Services)

 Understanding Initial Application            2.       Reverse Engineering of ICAASMobile
                                                       to get SRS and software architecture

Deciding Target Development Tools             3.       Eclipse with Android SDK plugin

  Validating Original Design Plan             4.       Decision to keep the same
                                                       architecture and code base

Deciding about Porting Strategies             5.       ++ approach: add one function at a
                                                       time and make it work before going on
Facoltà di Ingegneria
     Corso di Studi in Ingegneria Informatica   Developing Google Android Mobile Clients for Web Services: A Case Study

Invoking Web Services in Android: the KSOAP2 solution
         Advantages:                                             Disadvantages:
        Reliable (tested on other                              Introduces overhead on
         mobile platforms)                                       constrained devices
        Easy to use                                            Some effort is needed to
        Facilitates porting (the                                port a client from KSOAP1
         original application uses                               to KSOAP2
         KSOAP1)

Motivations for the choice:                                      Implementation
 Reusing the original business                                   Stub restructuring needed
  logic as much as possible                                       The thread responsible for
 Relying on a widely tested solution                              WS invocation (through the
                                                                   stub) can be reused
Facoltà di Ingegneria
    Corso di Studi in Ingegneria Informatica    Developing Google Android Mobile Clients for Web Services: A Case Study

Porting the MVC Pattern to Android: the AVA solution
  Model--View-
  Model  View-Controller                                   Adapter--View-
                                                           Adapter  View-Activity
 Separating GUI from Business                              Main issues:
  Logic and Data Access                                      Android Views are not Java-
                                                                                     Java-
                                                              coded but xml-
                                                                         xml-defined
                                                             Who is the Controller?
                                                             Who is the Model?
                                                            Answers
                                                             Activity builds View from xml
                                                             Activity acts as Controller
                                                             Adapter plays Model’s role

                                Contribution: a reusable design pattern for Android
Facoltà di Ingegneria
      Corso di Studi in Ingegneria Informatica                Developing Google Android Mobile Clients for Web Services: A Case Study

 DroidICAASMobile: a Conceptual Model
                                                                                                            KSOAP-based
                                                                                                            KSOAP-
 AVA--based GUI
 AVA                                                     change dataset
                                                                                                            WS invocation
change dataset                                         creates
                         Adapter
                                                                                                       Thread
                                         notifyDataSetChanged

                                                                                                creates                      response
                                                                      creates
                       user inputs
       View                                       Activity                                                Stub
                         update                                                                                              response
                                                                                                uses
                                                      setContentView
                                                                                                               invokes

                           builds                Layout.xml                                                           Web
   user inputs                                   ---------                                KSOAP                     Services
                                                 -------
Facoltà di Ingegneria
   Corso di Studi in Ingegneria Informatica   Developing Google Android Mobile Clients for Web Services: A Case Study

DroidICAASMobile: example of use
Facoltà di Ingegneria
  Corso di Studi in Ingegneria Informatica      Developing Google Android Mobile Clients for Web Services: A Case Study

Critical Considerations about the Android Experience
Average learning curve (probably slightly steeper than J2ME)
Advantages over other mobile platforms: xml-xml-defined GUIs,
open philosophy and full portability (at least in principle)

                                             Conclusions
The KSOAP solution for invoking WS is working on Android
Porting from J2ME is possible reusing most of the code
The AVA pattern is a good option for designing Android GUIs

Future Works
Improvement of the developed client (under both functional
and graphic aspect) and testing on real Android devices
Testing of other solutions for Web Services (e.g. kXML
                                                   kXML--RPC)
You can also read