22
IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other Part 2. ISD for systems with non-uniformly structured data Part III: (subset of) Basics of web-based IS (www, web2.0, …) Markup’s, HTML, XML Design tools for Info Sys: UML API’s for mobile apps Security, Cryptography IS product lifecycles Algorithm analysis, P, NP, NPC Info storage (modeling, normalization) Info retrieval (Relational algebra, Calculus, SQL) DB integrated API’s

IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Embed Size (px)

Citation preview

Page 1: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

IELM 511: Information System design

Introduction

Part 1. ISD for well structured data – relational and other DBMS

Part 2. ISD for systems with non-uniformly structured data

Part III: (subset of)

Basics of web-based IS (www, web2.0, …)Markup’s, HTML, XMLDesign tools for Info Sys: UML

API’s for mobile appsSecurity, CryptographyIS product lifecyclesAlgorithm analysis, P, NP, NPC

Info storage (modeling, normalization)Info retrieval (Relational algebra, Calculus, SQL)DB integrated API’s

Page 2: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Agenda

Need and applications of mobile apps

Problems in development of mobile apps

Case study: Google Android

Concluding remarks

Page 3: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Mobile computing: Needs and Applications

Location and guidance systems, e.g. GPS and Map-based services

Logistics services, e.g. FedEx/DHL delivery tracking/receiving systems

Ubiquitous computing, e.g. Internet fridge, Home device controls, Building security systems

Page 4: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Mobile computing: Issues

Hardware:

Lower Bandwidth (wireless bandwidth is lower than wired) Data transfer is slower (e.g. poor performance of iPhone GPS)

Limited battery power Restricted to low power consumption apps

Reliability Wireless service (cells) do not cover all areas, e.g. Mfg Sys Lab !

Human Computer Interface (HCI) For small mobile devices, e.g. phones/PDAs, user-interface is an issue

Software:

Multi-purpose devices Multi-tasking/threading, prioritizing and switching between processes

Page 5: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Common Mobile Phone OS’s

Symbian OS (used by Nokia, Sony-Ericsson, …) - Pre-emptive multi-tasking - Closed source, Uses C++, Supports Java, - App development requires certification

RIM Blackberry (used by Blackberry phones) - Simple GUI, Optimized applications and HCI for email

Windows mobile (used by Samsung, AT&T, LG, Palm Treo) - GUI emulates windows on PC - Software development kit (SDK) is free for students, uses Visual C++, .NET

iPhone OS (used by Apple iPhones) - Based on Apple OS X - GUI: user friendly, touch-screen only (no keypad support)

Google Android (used by Google phone, HTC, …) - Linux-based OS, Open source ! - SDK is free, uses Java

Page 6: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Comparing mobile apps with desktops..

What differentiates mobile apps from desktop apps ?

- Networked applications must deal with cellular communications

- Mobile OS (and apps have very limited resources: Smaller size, Less RAM, Slower low energy CPU, Limited graphics, RAM is smaller, …

- Mobile I/O systems are quite different from desktop ones Touch-screen based, phone-keys based, reduced keyboard-based, …

mobile multimedia formats and file formats are different

Page 7: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Mobile Application Development: Case study - Android

Steps in Android Application development:

Download and install SDK

Develop the application: Eclipse IDE (Java, SQLite, XML)

Test the application: Android emulator

Register with Google (US$ 25)

Upload your application to Google App Store

Page 8: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Android OS Architecture

Phone users

App developers

Programmers

Hardware developers

Page 9: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Structure of an Android Application

MyApp.apkjavacodejavacode

data mp3

Resources: Data, sound files, images

# library calls

aapt

Android apps are stored in ‘packages’

Android OS is multi-processing, multi-threading multiple processes canbe running on the device at the same time.Processes can communicate w/ the OS, and also can communicate w/ each other

Page 10: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Logical structure and life of an Android Application

An Android app is composed of a set of components

- Each component does a well defined activity - Due to multi-tasking, multiple components could be doing something at the same time - An app may use a component from some other app, and/or it may allow other apps to use some of its components

When an app is executed, Android creates a “virtual computer” in whichthe process runs each process is isolated from others.This is implemented via the DalVik Virtual Machine [Java Virtual Machine] security

However, processes can share data with each other via special componentscalled ‘content providers’

Page 11: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Android components: Activities

Activity is a sequence of related actionsEach activity presents a visual interface to the userEach activity is derived from base class ActivityEach activity owns a View which controls a rectangular window;Child views (controlling sub-rectangles) can be derived from parents;Views are used to create images, icons, buttons, etc. Examples:The “Contacts” application may have an activity that displays ascrolling list of all contacts listed by last name.

The “Calculator” app may have an activity that displays a numeric keyboardand buttons for numeric operations, etc. and awaits inputs from the user.

Page 12: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

source: developer.android.com

Android API – activity control loop

Colored ovals: states of the activity

Grey rectangles: callback methods written by developer

Page 13: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Android components: Services

Service is an activity that runs in the background no visual interfaceEach activity is derived from base class Service

Example:A common example of a service is an mp3 player that may run in thebackground as the user may be involved with some activity of anotherapp, e.g. web browser.

Page 14: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

source: developer.android.com

Android API – service control loop

Colored ovals: states of the service

Grey rectangles: callback methods written by developer

NOTE:Typically, a service may be created, say, by an activity;Alternatively, a service may be started and running in someother context, and can announce its interface to other activities –in this case, the activity may just connect itself to the service,in Android, this is called “bind”-ing to the service.

Page 15: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Broadcast receivers are similar to interrupt handlers in normal OSBRs run in the background, listening for interrupts generated by other appsAn application may have one or more BR’s to handle interrupts.

Examples of interrupts:- Incoming phone call- User changed language setting- Battery is low- User has transited from one time zone to different one

Android components: Broadcast receivers

Page 16: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Content providers make some subset of an application’s data availableto other apps when requested

Content providers are the only mechanism for apps to share data.

Android components: Content providers

Page 17: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Process can be multi-threaded Android apps do not have a C-style “main”.

Activities, services, broadcast receivers: activated by messages called intents.Content providers: activated by special objects called ContentResolvers.

Android application process

Depending on the state of the application, and the user’s actions, the appmay start (or terminate) some activity, or service, etc.

Before Android can start an application component, it must know the name, location, and input types of the component The manifest

<?xml version="1.0" encoding="utf-8"?> <manifest package="com.example.android.notepad" …> <application android:icon="@drawable/app_notes" android:label="@string/app_name" > <activity android:name="NotesList" android:label="@string/title_notes_list"> <intent-filter> <action android:name="android.intent.action.MAIN" /> … </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW" /> <action android:name="android.intent.action.EDIT" /> <action android:name="android.intent.action.PICK" /> … </intent-filter> … </activity> </application></manifest>

Notepad app(partial manifest)

Page 18: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Most activities will present a ‘view’ to the user, either to display somegraphics, or to get some user-input.Thus each activity can create (instances) of one or more views. Eachview has some graphical objects that either fill the complete screen,or a part of the screen.

Each object in a view, i.e. the layout, is also described in XML

Views in Android

<?xml version="1.0" encoding="utf-8"?>

<view xmlns:android="http://schemas.android.com/apk/res/android"

class="com.example.android.notepad.NoteEditor$LinedEditText"

android:id="@+id/note"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:background="@android:color/transparent"

android:padding="5dip"

android:scrollbars="vertical"

android:fadingEdge="vertical"

android:gravity="top"

android:textSize="22sp"

android:capitalize="sentences"

/>

Notepad app(layout of Note-Editor)

Page 19: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

The basic steps of developing an android app:

- Develop UML class diagrams, activity diagrams, use-case diagrams …- Identify the activities, services, …- For each activity, decide the GUI and design it, store as resources.- Use the IDE (e.g. Eclipse), and program the Java code for each class- Test & debug the code using the android emulator- Upload the code on the mobile device.

Android app development: summary

Page 20: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Mobile Operating Systems are in some ways similar to desktop OS,but there are several differences in details, and in usage.

Mobile app development process is almost similar to normal app development,but issues such as compiled code size, memory usage and algorithm efficiencyare much more important.

Several modern mobile OS’s are using xml as an integral part the programminglanguage – e.g. Android (manifest, view layout), Palm Pre OS, …

Brief concluding remarks

Page 21: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

References and Further Reading

Next: Project completion, Exam!

Mobile OS wikipedia

Google android developer site

Page 22: IELM 511: Information System design Introduction Part 1. ISD for well structured data – relational and other DBMS Part 2. ISD for systems with non-uniformly

Case study: Hangman-style – ‘Save the bird’ game

We consider a game similar to the popular ‘Hangman’ game, with themain difference being in the graphics (6 wrong guesses shark eats bird)