Professional Documents
Culture Documents
Mobile App
Development
07/17/2012
NTT DATA Corporation
Cacheability
This principle is based on the premise that the clients can cache resources.
Mobile platforms do not conform to HTTP 1.1 caching semantics
Layered Systems
This principle hides the intermediary servers such as transcoding proxies and
security gateways from the mobile application.
Source : WikiPedia
Copyright 2012 NTT DATA, Inc. 4
Current State
Web App
Web Services
Policy Manager
Service Bus/TIBCO
Copyright 2012 NTT DATA, Inc. 5
Future State Supporting Apps
Mobile
App
Web Services
Policy Manager
Mobile
App
Policy Manager
Service Bus/TIBCO
Copyright 2012 NTT DATA, Inc. 7
Web Services Security
The cache is referenced from the HTML HEAD tag. Mobile browser requests the
cache manifest every time the user loads the page. Any changes made to the
manifest file will cause the browser to update the application
cache.
HTML5 solutions rely on third party frameworks to offer rich and compelling mobile
experiences.
JQuery Mobile Dual License - 1. Support for tablets, smart phones, e- 1. Community Support
MIT/GPL readers, older browsers and features 2. Fast maturing but not
phones bullet proof yet.
2. Declarative model with standards 3. Evolving tooling
compliant HTML5 support
3. Built on solid JQuery framework
4. Light weight
5. Modular architecture
Sencha Touch Commercial 1. Paid Support and training 1. Steep learning curve -
Software License 2. Optimized for iOS, Android and BB App is written entirely in
(Free) 3. Rich widget set with very good JavaScript.
performance 2. Larger footprint
4. Excellent charting library 3. Vendor lock-in
4. Weak tooling
Its good practice to redirect users who arrive at the desktop site to a
dedicated mobile site. There are two approaches to redirection
Detecting the device and mobile browser requires parsing the header
string provided by the browser
Format of the User-Agent strings are not standardized!
Android recommends searching for Mobile string in user agent
header
Apple has standardized on the user-agent string format.
3rd party libraries that reliably sniff user-agent strings are available
Mobile web apps are primarily written in JavaScript. So, its essential
to optimize JavaScript. Understand closures and problems with
circular references and memory leaks.
<!DOCTYPE html>
<html>
<head>
<title>Hello World</title>
</head>
<body> Hello World! </body>
</html>
Client does not want to use any services to get data, so data should
be bundled within the application and reside locally on device.
Biggest challenge was how to pre populate the data to the SQLite
database.
Application gets data from tables using SQL queries and uses it
on different screens.
Mechanism to send multiple HTTP requests over a single TCP connection. This is
widely implemented in all HTTP 1.1 compliant mobile browsers and web servers.
This dramatically increases throughput especially in high latency cellular networks.
Copyright: WikiPedia
Copyright 2012 NTT DATA, Inc. 26
Media Playback with HTTP Live Streaming
You have two options for streaming audio or video to any Apple
device.
HTTP progressive download
HTTP Live Streaming
iOS 3.0 and above has built in client SW for HTTP Live Streaming.
Cache the data on the mobile device and dont access the network if not required. Cellular
networks are power hungry!
Only open TCP connection if absolutely required. Keeping a connection open requires
sending a periodic heart beat. Heart beat algorithms can be difficult to implement. One minute
heart beat can potentially drain your battery in 4hours.
Always use HTTP 1.1 GET/POST. Let the HTTP stack manage the tcp connection pool.
Use background timers sparingly. Pause the timers if they are not required. Are you painting
to the screen when the app is in the background?
iOS stops the timers when the application moves to the background.
Android does not pause the app or stop the timers
Dont program to the low level sensor APIs. Use the Core Motion or high level sensor
frameworks.
Both Android and iOS have tools for profiling power consumption.