Cst 594 mobile computing
1 / 69

CST 594 Mobile Computing - PowerPoint PPT Presentation

  • Uploaded on

CST 594 Mobile Computing . Kavitha Elamparith Pratibha Channamsetty Eshwari Mente Shruti Shivashankaraiah Pranay Mahendra Adit Shah Naveen Kumar. Integrating mobile apps with ERP data systems 46%.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'CST 594 Mobile Computing' - darena

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Cst 594 mobile computing
CST 594 Mobile Computing





Pranay Mahendra

Adit Shah

Naveen Kumar

Cst 594 mobile computing

Integrating mobile apps with ERP data systems 46%

Developing apps quickly 43.3%

Testing and Quality Assurance 36.8%

Compelling Experiences 34.9%

Supporting multiple platforms from a common codebase 33.3%

Cross platform development 32.8%

Supporting multiple platforms 27.7%

Why titanium
Why Titanium? 46%

Faster Development

Develop native applications 20% faster

than writing in the native language

Code Reuse

Reuse 60%-90% of developed code

when supporting multiple platforms

Reduce Cost

Most apps take at least six months of full-time work

and cost between $20,000 and $150,000 to develop.

Reduce cost of development cross-platform

by using a JavaScript based SDK

History 46%

  • - Appcelerator in Atlanta, Georgia

    - Jeff Haynie (CEO) and Nolan Wright (CTO)

    2008 - New HQ in Mountain View, CA - raised $6.2 M from Storm Ventures and LaryAugustin

    2009 - Titanium launched at the Apples WWDC -1200 developers downloaded Appcelerator in 48 hrs - iPhone- and Android-based mobile applications in June

    2010 - April - BlackBerry, iPad-based tablet apps - raised $9M in Series B form Sierra Ventures and eBay.

History continued
History 46% - (continued)

2011 - Acquired Aptana Inc and Particle Code.

2012 - New Office in Beijing, China

- Europe HQ opens in UK

- Acquired Cocoafish and Nodeable

- Launched Appcelerator Cloud Services (ACS)

- Launched Titanium 3.0

Appcelerator Announces CODESTRONG 2012 Mobile Conference To Be Held in San Francisco

2013 - Opens an office in SFO408,612 registered developers have launched 51,208 apps

Cst 594 mobile computing

Appcelerator titanium
Appcelerator Titanium Active Users

• Open source SDK, Tools (Apache)

• Cross-platform (Win32, OSX, Linux)

• Based on WebKit

• Modular and extensible

• Supports JavaScript, Python, Ruby

Titanium overview
Titanium Overview Active Users

Applications are built entirely inJavaScript

Cross Platform !== “Write Once, Run Everywhere”Cross Platform == “Write Once, Adapt Everywhere”

Best Practices

  • Protect global scope

  • Be modular

  • Keep code DRY – (Don’t Repeat Yourself)

    Similar to rich web based client applications

  • Sophisticated UI controls

  • Client-side Data Models

  • Local Storage and focused remote data access

    Component Oriented, Event Driven

Products Active Users

Appcelerator Network

Cloud services used for testing, packaging, distribution, and analytics.

Titanium Mobile

Develop Native iPhone, Android, and iPad apps with full access to each device’s APIs.

Titanium Desktop

Build Desktop apps that can be deployed with one code base on the PC, Mac, or Linux platforms.

Titanium Alloy

It is an MVC framework used to develop applications

in a structured way

Architecture Active Users

Product architecture
Product Architecture Active Users

Pros and cons
Pros and Cons Active Users

  • Rapid prototyping

  • JavaScript

  • Cross-platform

  • Growing community

Cst 594 mobile computing
Cons Active Users

  • Increasing complexityDevelopment complexities (and costs) rise more than proportionally to application complexity increases

  • No FreemiumStoreKit, a module to enable In-App Purchase to Apple’s App Store, poorly documented and it seems to work only partially. unstable for production use

  • LaggyObviously you can have the most smooth, fast and comfortable user experience possible only with apps developed with a native development environment.

System requirements
System Requirements Active Users


System requirements1
System Requirements Active Users

Operating System:

Downloading installing
Downloading & Installing Active Users

  • Valid Appcelerator Network account.

  • Download the installer from:


Launch the installer
Launch Active Usersthe installer

Things to setup
Things to setup Active Users

Installing native sdks
Installing native Active Userssdks

Installing android sdk
Installing android Active Userssdk

Android sdk manger
Android SDK Manger Active Users

Packages to install
Packages to install Active Users

Useful software
Useful software Active Users

Git (optional, but recommended)

Importing a sample project
Importing a Sample Active UsersProject

Selecting template
Selecting template Active Users

Project file system layout
Project Active UsersFile system Layout

Configuring the tiapp xml file
Configuring the Active Userstiapp xml file

Run the project
Run the project Active Users

Cst 594 mobile computing

How Titanium Works Active Users

Code your pages



(in simulator)



Project in XCode/ObjC

Window structure
Window structure Active Users



Titanium features
Titanium Features Active Users

  • Native UI

    • Real Native tables, tabs, sliders and views

  • Rich Media APIs

    • Local and streaming audio and video, media recording

  • Local and streaming

    • Native Maps, compass and Geo location

  • Open Source and Extensible

    • Extend titanium with custom modules in native code.

Cst 594 mobile computing
Cont.. Active Users

  • Local and Remote Data

    • Local SQL database, Light weight Key/Value store, XHR.

  • Integrated Analytics

    • Baked-in analytics APIs to measure results and behavior.

  • Social APIs

    • Integrated Face book connect and YQL.

  • Development Tools

    • Development and distribute your app for multiple platform from a single tool.

Native ui controls
Native UI controls Active Users

  • Use native UI controls through a JavaScript interface

Ui in native and titanium application
UI in Native and Titanium Application Active Users

  • iOS Phones have one screen resolution.

  • Building Android apps require you to take the various screen sizes and aspect ratio into account.

  • Titanium relies on native controls and UI.

  • We write code in JavaScript , using special API that builds the UI controls.

  • Recent addition of commonJS module made developing apps more fast and modular.

Cst 594 mobile computing
Cont.. Active Users

  • Writing same code for both the UI makes thing difficult to handle.


    1. They have different screen resolution

    2. Different controls

    3. iOS takes 45% of the screen, while android has more dropdowns.

    So In Titanium we create separate UI modules that communicate with same code.

Common apis
Common APIs Active Users

Media Active Users

  • Stream or package audio and video content same for both platforms

Accelerometer Active Users

  • Use advance gesture and track movement to create groundbreaking user interface.

Geo location
Geo location Active Users

  • Use Geo location to leverage your user’s position in the world

Face book connect
Face book connect Active Users

  • Facebook module is available which uses new authentication features on both Android and iOS as well as a new set of methods to retrieve and submit data.

    We can either use

  • Titanium.Facebook.authorize() method

  • FacebookLoginButton (Titanium.Facebook.createLoginButton()) on to your view and, when the user clicks it, we’ll handle calling ’authorize’.

    Set Titanium.Facebook.appid to your Facebook application id before initiating authorization

      For more basic permission set Titanium.Facebook.permissions property to an array of the permissions you need.

Cst 594 mobile computing
Cont.. Active Users

The pizza app

The Pizza App Active Users

Main Javascript files:







Cst 594 mobile computing

1. Display Clock Active Users2. Create view3. Create Scrollable view4. Navigate 5. Animate6. Fire an Event7. Handle an Event

How to ?

Listening to custom events adding the toppings list persisting crust selection

Listening to Custom Active Usersevents

Adding the Toppings List

Persisting Crust Selection

Working with data on titanium

Working With Data on Active UsersTitanium

Titanium Data Options:

Local Data

Remote Data

Working with local data
Working With Local Data Active Users

Titanium Local Storage Options:

  • Application Properties

  • File System

  • Database

    To use a device's local storage, Titanium provides

    * Titanium.App.Properties :ideal for storing application-related settings

    * Titanium.Filesystem :facilitates file and directory manipulation

    * Titanium.Database :gives access to local SQLite databases

    Each of these enable data to persist on a device across application restarts, power cycles, re-installation and even migration to a new device.

What kind of data storage should i use
What kind of data storage should I use? Active Users

Application Properties–

  • data consists of simple key/value pairs

  • data is related to the application rather than the user

  • data does not require other data in order to be meaningful or useful


  • the data is already provided in file format

  • the data is an image file

Cst 594 mobile computing

Database Active Users–

  • There are many similar data items

  • Items of data relate to each other

  • require flexibility over how the data will be presented when you retrieve it

  • the data accumulates over time, such as transaction, logging or archiving data

Application properties
Application Properties Active Users

Reading and Writing Properties - six sets of get/set methods for handling six different data types:

  • getBool() / setBool(): for booleans (true, false)

  • getDouble() / setDouble(): for double-precision floating point numbers

  • getInt() / setInt(): for integers

  • getList() / setList(): for arrays

  • getString() / setString(): for strings

Filesystem storage
Filesystem Active Users Storage


  • Titanium.Filesystemis the top level Filesystem module used for reading and saving files and directories on the device.

  • Titanium.Filesystem.Fileis the file object which supported common filesystem based operations such as create, read, write, delete, etc.

Cst 594 mobile computing

Properties Active Users

  • Data storage locations:

  • applicationDataDirectory: A read-only constant that indicates where your application data directory is located. Place application-specific files in this directory.

  • resourcesDirectory: A read-only constant where your application resources are located

  • tempDirectory: A read-only constant that indicates where your application can place temporary files

Filesystem storage cont
Filesystem Active Users Storage cont...

Filesystems Methods

  • getFile( ): return a file path as a Titanium.Filesystem.Fileobject

  • read(): return the contents of file as blob

  • write(): write the contents to file

  • deleteFile(): delete the file

  • exists(): return true if the file or directory exists on the device

  • move(): move the file to another path

  • rename(): rename the file

  • nativePath(): return the fully resolved native path

Database and file system
Database and file system Active Users

  • Pre requisites: SQLite Database

    Easy ways to create a sqlite database -

    • SQLite Manager (Firefox add on)

    • SQLite database Browser.

  • Place your database file in the resource folder in your titanium project. The database installation will reference that folder to install your database.

Sqlite databases
SQLite Databases Active Users

SQLite3 is the latest version of the mobile SQL-based relational database management system (RDMS), chosen by Apple, Google and RIM to provide local data storage on their mobile devices.


  • Titanium.Databasethe top level Database module. The Database module is used for creating and accessing the in-application Database.

  • Titanium.Database.DB is the Database instance returned by Titanium.Database.open or Titanium.Database.install.

  • Titanium.Database.ResultSet is the ResultSet instance returned by invoking a database SQL execute.

Sqlite databases1
SQLite Databases Active Users

Database Methods

  • open( ): open a database. if it doesn't yet exist, create it.

  • execute( ): execute a SQL statement against the database and returns a ResultSet.

  • close( ): close the database and release resources from memory.

  • install( ) :installs the database on the device/emulator

    ResultSet Methods

  • isValidRow( ): return true if the row is a valid row.

  • fieldByName( ): retrieve a row value by field name.

  • next( ): iterate to the next row in the result set.

Working with remote data
Working With Remote Data Active Users

Remote Data in Titanium

  • Your Titanium application can interact with remote servers over HTTP using the HTTPClient object provided through the Titanium.Network namespace.


  • Titanium.Network.HTTPClientis the HttpClient instance returned from Titanium.Network.createHTTPClient.

    HTTPClient Methods

  • open(): open the request and ready the connection.

  • send(): send the request (Only async is currently supported).

  • SetRequestHeader(): set the request header. Must be called after open but before send.

  • setTimeout(): set the request timeout

Rss reader
RSS Reader Active Users

  • Fetches the latest 10 items off the New York Times RSS feed and displays them in a TableView.

  • Clicking on one of the items will open the link in a web browser.

  • Titanium’s HTTPClient object allows remote requests similar to Ajax/JS in a web browser.

  • An onload() method that handles the response of the request and an open() method in which we specify the type of request (GET/POST/PUT/DELETE) and the URL we are requesting. Finally we initiate the request by calling the send() method.

Rss reader1
RSS Reader Active Users

  • Even though we are coding in Javascript, we are not in a web browser environment, so the usual document and window objects do not exist.

  • This means frameworks which make XML manipulation easy, such as jQuery and Mootools, will not work. However Titanium offers us the DOMDocument object, which acts and has a similar API to the web browser document object.

  • We can get the output of the HTTP request and automatically turn it into a DOMDocument object by accessing it as this.responseXML.documentElement.

Rss reader2
RSS Reader Active Users

  • After the DOMDocument instance is set up, we do a simple XPath query to get the title and iterate over the items to get the data about the individual posts.

  • Next step is to populate the TableView. To do this we create several Titanium.UI.TableViewRow objects and then append them to our TableView.

  • Last step is to add functionality so that when an item in the TableView is clicked, the Android web browser will open to that specific post. Our code needs to listen for a click event on a TableViewRow and then launch a Titanium.Android.Intent.

Rss reader3
RSS Reader Active Users


Competitors Active Users

Purpose to enable cross-platform mobile application development

Phonegap vs titanium

PhoneGap Active Usersvs Titanium

PhoneGap-HTML based solution.

Titanium-Pure javaScript API.

PhoneGapruns in a native web browser view.

Appceleratorcompiles to Native Code.

PhoneGappromotes code re-use and easiest transition from desktop to mobile.

Appcelerator higher level API for native mobile development.

Differences Active Users

How to choose

How to Choose??? Active Users

Options seem endless.

Native app?

Cross-platform solution?

HTML5? Or A mix?

Where should a developer to start?

What should a growing business invest in?

Like most things in life, it depends.