iphone app -

Post on 10-Apr-2018

219 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • 8/8/2019 iPhone App - clusterinfo.at

    1/23

    Seminar paper

    iPhone App

    clusterinfo.at

    Stefan Almer, Bsc

    stefan.almer@student.tugraz.at

    Graz University of Technology

    Institute for Information Systems and Computer Media

    Adviser: Dipl.-Ing. Dr.techn. Josef Kolbitsch

    Graz, September 2010

  • 8/8/2019 iPhone App - clusterinfo.at

    2/23

    Abstract

    Mobile devices such as Apples iPhone or various Google Android driven devices are

    getting increasingly popular. With such devices and the possibility to access the internet

    wirelessly it is possible to gain information everywhere on earth. For representing infor-

    mation so called Apps (mobile applications) are used. Such applications are fast, easy to

    use and often fit just one special purpose.

    This paper deals with the implementation of the iPhone application clusterinfo.at. This

    app represents the mobile userinterface to the existing web portal. To access the infor-

    mation a REST based webservice API has been developed which provides various services

    like searching. Every request is covered in a result set which only contains metadata about

    the information found. The client needs to post a second request with the result set to getall records.

    Keywords iphone, rest webservice, clusterinfo, human technology styria, xml

    1

  • 8/8/2019 iPhone App - clusterinfo.at

    3/23

    Statutory Declaration

    I declare that I have authored this thesis independently, that I have not used other thanthe declared sources / resources, and that I have explicitly marked all material which has been

    quoted either literally or by content from the used sources.

    Date Signature

    2

  • 8/8/2019 iPhone App - clusterinfo.at

    4/23

    Contents

    Contents

    Contents i

    List of Figures ii

    List of Listings iii

    1 Introduction 1

    2 Implementation 2

    2.1 Server-Side API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2

    2.1.1 Categories for section: /getBrowseCategories . . . . . . . . . . . . . . 3

    2.1.2 Search: /search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

    2.1.3 Result set: /getResultSet . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    2.1.4 User in role: /isUserInRole . . . . . . . . . . . . . . . . . . . . . . . . . 7

    2.1.5 Promoted events: /getPromotedEvents . . . . . . . . . . . . . . . . . . 8

    2.1.6 Detail: /getDetail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    2.1.7 Error handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

    2.2 Client-Side . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

    2.2.1 Newsticker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    3 Functionality of the iPhone application 14

    3.1 Sections/Categories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    3.2 Login - Cluster members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    3.3 Records details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    3.4 Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    3.5 Newsticker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    i

  • 8/8/2019 iPhone App - clusterinfo.at

    5/23

    List of Figures

    List of Figures

    1 iPhone - Server: Request - Response example . . . . . . . . . . . . . . . . . . . 122 Simple class-diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

    3 Section view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    4 Category view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

    5 Section "person" - user not logged in . . . . . . . . . . . . . . . . . . . . . . . . 15

    6 Wrong password or username . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    7 User logged in . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    8 Company . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    9 Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1510 Person . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    11 Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

    12 Search in section . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    13 Search in category . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

    14 Static message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    15 Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    16 Event detail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

    ii

  • 8/8/2019 iPhone App - clusterinfo.at

    6/23

    Listings

    Listings

    1 Example response for all categories in section "event". . . . . . . . . . . . . . . 32 Result-Set for records in category "Kongress". . . . . . . . . . . . . . . . . . . . 5

    3 Result-Set for search in category. . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    4 Result-Set for search in section. . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

    5 Response from isUserInRole, the user has no rights. . . . . . . . . . . . . . . . 7

    6 Promoted events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

    7 Details for "event" with ID 415 . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

    8 No/invalid API key provided . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

    9 Wrong/too few arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1110 Access of secure service in public environment . . . . . . . . . . . . . . . . . . . 11

    iii

  • 8/8/2019 iPhone App - clusterinfo.at

    7/23

    1 Introduction

    1 Introduction

    The clusterinfo.at iPhone application is the mobile access point for the existing clusterinfo.atweb portal and CRM system. For accessing the portal a completely new REST-API has been

    developed which provides direct access to the database.

    Like the web portal, the App allows the user to search the public database.

    Further features:

    Search in section: company, event, person

    Search in category

    Show address in map

    Write in-app email

    Open links in browser

    Call telephone numbers

    The section "person" is only available for cluster members.

    This paper also provides a detailed documentation of the implemented REST webservice

    API, the implementation of the client and an overview of the functionality of the application.

    1

  • 8/8/2019 iPhone App - clusterinfo.at

    8/23

    2 Implementation

    2 Implementation

    The CIS (clusterinformation system) provides a REST webservice to access all information ofthe clustersystem. The webservice provides public and secure (HTTP-Basic-Auth, username/-

    password) access over SSL (secure socket layer). The service responds with an XML document

    encoded in ISO-8859-1 over the following URLs:

    Public: https://www.clusterinfo.at/mobile/services/

    Secure: https://www.clusterinfo.at/mobile/services/secure/

    For several requests (e.g. /search) the webservice only returns a result set. In this case,

    the webservice executes a query and returns an XML response with "metadata" about the

    search like the "set id" generated on the server and the number of records found.

    The set contains all records found (on the server). The results (records) can be requested

    with another service later on - this means that not all records are returned intermediately to the

    client. This mechanism has several advantages: fast and small response, instant information

    about the search, "browsing" through the set or only get a range of records.

    2.1 Server-Side APIThe server-side API provides the following services:

    /getBrowseCategories (see 2.1.1)

    /getResultSet (see 2.1.3)

    /isUserInRole (see 2.1.4)

    /search (see 2.1.2)

    /getPromotedEvents (see 2.1.5)

    /getDetail (see 2.1.6)

    2

  • 8/8/2019 iPhone App