Documente Academic
Documente Profesional
Documente Cultură
• Decide if you will build a rich client, a thin Web client, or rich Internet application (RIA). If
your application requires local processing and must work in an occasionally connected
scenario, consider designing a rich client. A rich client application will be more complex to
install and maintain. If your application can depend on server processing and will always be
fully connected, consider designing a thin client. If your application requires a rich user
interface (UI), only limited access to local resources, and must be portable to other
Platforms, design an RIA client.
• Determine the device types you will support. When choosing which device types to
support, consider screen size, resolution (DPI), CPU performance characteristics, memory
and storage space, and development tool environment availability. In addition, factor in user
requirements and organizational constraints. You may require specific hardware such as
GPS or a camera and this may impact not only your application type, but also your device
choice.
• Design a UI appropriate for mobile devices, taking into account platform constraints.
Mobile devices require a simpler architecture, simpler UI, and other specific design decisions
in order to work within the constraints imposed by the device hardware. Keep these
constraints in mind and design specifically for the device instead of trying to reuse the
architecture or UI from a desktop or Web application. The main constraints are memory,
battery life, ability to adapt to difference screen sizes and orientations, security, and network
bandwidth.
• Design a layered architecture appropriate for mobile devices that improves reuse
andmaintainability. Depending on the application type, multiple layers may be located on the
device itself. Use the concept of layers to maximize separation of concerns, and to improve
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
reuse and maintainability for your mobile application. However, aim to achieve the smallest
footprint on the device by simplifying your design compared to a desktop or Web application.
• Design considering device resource constraints such as battery life, memory size,
andprocessor speed. Every design decision should take into account the limited CPU,
memory, storage capacity, and battery life of mobile devices. Battery life is usually the most
limiting factor in mobile devices.
Mobile Client Frame
There are several common issues that you must consider as your develop your design.
These issues can be categorized into specific areas of the design. The following table lists
the common issues for each category where mistakes are most often made.
Data Layer Components
• Data access logic components. Data access components abstract the logic necessary
toaccess your underlying data stores. Doing so centralizes the data access functionality,
whichmakes the application easier to configure and maintain.
• Data helpers / utilities. Helper functions and utilities assist in data manipulation, data
Transformation and data access within the layer. They consist of specialized libraries
and/orcustom routines especially designed to maximize data access performance and
reduce thedevelopment requirements of the logic components and the service agent parts of
thelayer.
Business Layer
Business Components
The following list explains the roles and responsibilities of the main components within
thebusiness layer:
• Application façade (optional). An application façade combines multiple business
operationsinto a single message-based operation. You might access the application façade
from thepresentation layer by using different communication technologies.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
• Business components. Within the business layer there are different components that
Provide business services, such as processing business rules and interacting with data
accesscomponents. For example, you might have a business component that implements
thetransaction script pattern, which allows you to execute multiple operations within a
singlecomponent used to manage the transaction.
• Business entities. Business components used to pass data between other components
areconsidered business entities. The data can represent real-world business entities, such
asproducts and orders, or database entities, such as tables and views. Consider using
scalarvalues as business entities.
• Business workflows. Many business processes involve multiple steps that must be
Performed in the correct order and orchestrated. Business workflows define and
coordinatelong-running, multi-step business processes, and can be implemented using
businessprocess management tools.
Presentation layer
The following steps describe the process you should adopt when designing the presentation
Layer for your application. This approach will ensure that you consider all of the relevant
factorsas you develop your architecture:
1. Identify your client type. Choose a client type that satisfies your requirements and
adheresto the infrastructure and deployment constraints of your organization. If your
mobiledevices users will be intermittently connected to the network, a mobile rich client
isprobably your best choice.
2. Determine how you will present data. Choose the data format for your presentation
layerand decide how you will present the data in your UI.
3. Determine your data-validation strategy. Use data-validation techniques to protect
yoursystem from untrusted input.
4. Determine your business logic strategy. Factor out your business logic to decouple it
fromyour presentation layer code.
5. Determine your strategy for communication with other layers. If your application
hasmultiple layers, such as a data access layer and a business layer, determine a strategy
forcommunication between your presentation layer and other layers.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
A PDA is a small handheld device that provides digital organization functions. PDAs
were originally designed to replace paper for organizing calendar and contact
functions. As such, early devices contained address books, calendars and notepads.
Today, PDAs supplement this functionality with wireless connectivity and e-mail. A
typical PDA consists of a small liquid crystal display, an operating system, a processor
and memory.
Most standard PDAs include a variety of application software, such as games, music
players, and spreadsheet and word processing products. The devices can not only
synchronize with desktop PCs, but can also connect directly with server applications to
access Web content and Web applications.
PDAs, which are data-centric devices, are available in two form factors: tablet and
clamshell. There is another category of mobile devices: smart phones. These are
actually cellular phones with some PDA functionality.
Tablet PDAs
Tablet PDAs are palm-sized devices with a stylus and a touch screen. They typically
have a display between 50 mm and 100 mm (2 inches to 4 inches) diagonally and
weigh between 100 grams and 220 grams (3.5 to 8 ounces). They feature either a
QWERTY keyboard or stylus-operated software keyboard for data input.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
Examples of tablet PDAs include Palm Zire and Tungsten models, Sony Clié and
Microsoft Pocket PC-based devices. Also included in the Tablet PDA category are
some industrial handhelds, such as the Intermec 700 Series, Symbol PPT 8800 and
Panasonic Toughbook CF-P1.
Clamshell PDAs
Clamshell PDAs usually include a small keyboard, a stylus and a touch screen. Form
factor and display size vary substantially. Data input is not significantly easier than with
tablet PDAs, as the small keyboard requires nimble fingers.
Examples of clamshell PDAs include the Sony Clié PEG NX80 and Sony Clié UX50,
Sharp Zaurus C-760 and T-Mobile Sidekick. Clamshell PDAs have a closed face.
A sub classification includes tablet and clamshell PDAs that are natively wireless-
enabled. Wireless PDAs offer integrated wireless LAN or WAN communication
capabilities, but Bluetooth alone does not satisfy our definition. Examples of wireless-
enabled tablet PDAs include the Research in Motion (RIM) Blackberry 7200 Series,
Toshiba Pocket PC e800, Hewlett-Packard (HP) iPAQ h5550 and 02 Xda.
Wireless PDAs are distinguished from smart phones by their form factor and primary
purpose. Wireless PDAs are mainly data-centric, while smart phones are voice-centric
devices. PDAs that use add-on modules to achieve wireless capabilities are still
classified as they were at the time they left the factory, so a stand-alone PDA that has
been enhanced with a wireless General Packet Radio Services (GPRS) module is still
considered a stand-alone PDA.
Smartphone’s
Both PDAs and smart phones rely on full-featured operating systems with ample third-
party software support. Smartphone’s have rich telephony features with some data
capabilities.
The most common applications included in a Smartphone are calendar, address book,
text messaging, wireless Internet connectivity, PC synchronization and "to-do" list. It is
often possible to expand storage through cards, such as Secure Digital or others.
Features, such as integrated digital cameras, multimedia messaging and Motion
Picture Experts Group (MPEG) Audio Layer 3 (MP3) players, are also increasingly
common.
Examples of smart phones on the market today include the Orange SPV E200
(manufactured by HTC), the Nokia 3660, the Sony Ericsson P900, the palmOne Treo
600 and the Motorola MPx200.
Operating systems for highly portable computing devices should have the following
characteristics:
Palm OS
Palm Source, the software spin-off from Palm, released Palm OS 5 in 2002
with a significant shift in its architecture. Previous versions of Palm OS ran on
Motorola DragonBall 68000 processors. The operating system itself was
created around the multithreaded AMX real-time operating system from
Canadian Kadak. However, the license with Kadak limited the company's ability
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
Symbian
Windows Mobile 2003 software for Pocket PCs, supporting stand-alone and
wireless LAN integrated PDAs. The Pocket PC software includes a one-
quarter Video Graphics Array (QVGA) screen resolution (240 × 320 pixels)
with 65,000 colors. It offers multiple options for text input, including
handwriting software that Microsoft has licensed from Vadim (Calligrapher).
ActiveSync 3.7 provides synchronizing with the desktop for Pocket PC
devices. It provides two levels of security that allow users to set a simple four-
digit personal identification number (PIN) or a full Windows 2000-level strong
alphanumeric password. Pocket PC is based on a real-time preemptive
multitasking embedded operating system.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
Windows Mobile software for Pocket PC Phone Edition, which supports PDAs
with integrated telephony features. It offers such telephony applications as
caller ID, conference calling, speed dial and SMS and is based on the same
kernel and specifications as Windows Mobile 2003 software for Pocket PCs.
Windows Mobile software for Smartphone’s, for use with mobile phones
combining wireless voice and data communications. Microsoft Smartphone is
targeted for use with mobile phones designed for one-handed navigation and
a smaller display. Microsoft makes Smartphone software available for both
GSM/GPRS and CDMA/single carrier radio transmission technology (1xRTT)
networks.
There are many adaptations of Linux for embedded devices. Such diversity, however,
could be the main obstacle to the success of Linux in the commercial mobile device
market. No Linux PDA or Smartphone vendor sets standards on key elements, such
as user interface, PIM, power management and synchronization. The result is limited
compatibility among different products. Sharp is the dominant vendor of Linux-based
PDAs.
Metroworks Embedix
Embedix, initially offered by Lineo, was one of the first embedded Linux operating
systems. It is specifically designed to handle the unique speed, memory and storage
requirements of embedded devices. It runs on such devices as PDAs, smart handheld
devices, residential gateways and digital TVs.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
Midori Linux
It also supplements the Linux kernel with such embedded-oriented features as both
Flash ROM- and RAM-based file systems and boot/runtime that can run from Flash
ROM. It offers power management features that are optimized for Transmeta's Crusoe
processor line.
MontaVista Linux
MontaVista Software offers several editions of its embedded Linux operating system
for a range of applications. The MontaVista Linux Consumer Electronics Edition 3.0 is
geared for consumer devices. In March 2003, MontaVista Linux was selected as the
operating system for Motorola's upcoming A760 smartphone. Motorola's device
integrates digital camera, Internet, messaging, multimedia, and PDA and telephony
capabilities. It is currently available in China. The operating system is designed for use
with IBM PowerPC 405LP Arctic II/III and Texas Instruments Open Multimedia
Applications Platform (OMAP) digital processor chips.
Smart Cards
Smart Card is a plastic card with an embedded microprocessor and a memory large enough
to store programs made by the card-issuing company. The exact structure of a smart card is
specified by internationalstandards: the plastic card must have dimensions of 85.60mm x
53.98mm x 0.80mm and must be able to bend a specified amount without damage for
instance.
A printed circuit and an integrated circuit chip (microcontroller) are embedded on the card.
As silicon cannot handle bending very well, the chip must be very small. The printed circuit is
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
a thin gold plate that provides electrical contacts to the outside world and also protects the
chip from mechanical stress and electrical static.
In 1975, the first card in the credit-card format with the chip and its contacts on one side was
made by the French company CII-Honeywell-Bull. Its first customer orders were shipped two
years later.
All Smart Cards have memory and a processor, but some are almost exclusively the former.
These 'memory cards' are not the subject of this site as they aren't very 'smart'.
Smart Cards do not have an internal power source but need power to operate. Therefore
they only operate when in the presence of a Card Accepting Device (CAD) which supplies
their power requirements. Most Smart Cards come into physical contact with CADs while
others do not. However, they have practically the same architecture and will not be
distinguished in this site.
A fundamental change in Smart Cards is in the language they are programmed. In a manner
analogous to the development of computer systems, there has been a move from assembly
language to higher level languages, especially Java.
Smart Cards are thin cards with an embedded chip, and this automatically poses its own
unique challenges of architectural design. However, it turns out that the solutions tend to be
a scaling down of conventional chips rather than inventing an all-new chip.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
Memory System
There are three main types of memory on cards:
RAM. 1K. this is needed for fast computation and response. Only a tiny amount is
available.
EEPROM (Electrically Erasable PROM). Between 1 to 24K. Unlike RAM, its contents
are not lost when power is. Applications can run off and write to it, but it is very slow
and one can only read/write to it so many (100 000) times.
ROM. Between 8 to 24K. The Operating System and other basic software like
encryption algorithms are stored here.
Input/output
This is via a single I/O port that is controlled by the processor to ensure that communications
are standardized, in the form of APDUs (A Protocol Data Unit).
Here is a selection of parameters from some of the smart cards on the market today. They
are neither the biggest nor the fastest; that is reserved for Java cards. The reason for this is
price --- smart cards like these are programmed in assembly language and do not need
much in the way of resources. To keep down costs, they don't get resources.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
4.7 -
Orga ICC4 8-bit 6K 3K 128b 10 000
5.3V
4.5 - 13.6
GemCombi 8-bit 5K 100 000 106 kbaud
5.5V MHz
3.5
DNP Risona 8-bit 1K 5V 9600 baud
MHz
Smart cards are defined according to 1). How the card data is read and written 2). The type
of chip implanted within the card and its capabilities. There is a wide range of options to
choose from when designing your system.
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
Android
Hello Android
Created by default
iPhone
• Needs Intel Mac, OS X 10.5.4+
• Download SDK and register (free) developer.apple.com/iphone
• $99 to deploy to iPhone or iPod
• Uses Objective-C
• Launch XCode
• Examples from iPhone SDK Development
Hello iPhone
• File, New Project in XCode
• Choose View-based Application
• HelloViewController class and HelloViewController.xib (nib), freeze-dried GUI
• HelloAppDelegate manages application
• Use Interface Builder to add Label and configure color and size in Attributes
inspector
Hello User
• Allow user to enter a name
• IBOutlet – reference from code to nib object, e.g. label, text field
• IBAction – method nib’s objects can call, e.g. button press handler
• In Interface Builder, connect outlets to code, connect action Touch Up Inside event to
handler method, sayHello
• Implement the sayHello handler method
Movie – MVC
• Create Movie class (the model)
• Labels with movie info, Edit button
• MovieEditorViewController for edit view with Done button to return to main screen
• Send message in Edit button to start movie controller
• Send message in Done button to return to MovieViewController
SCS5619-MOBILE AND PERVASIVE COMPUITNG-UNIT-V
Mobile Application Development
References
1. Uwe Hansmaan et al, ―Principles of Mobile Computing‖, Springer, 2003.
2. Hello Android, Third Edition, Ed Burnette, Pragmatic Programmers, 2010.
3. Introduction to Android development Using Eclipse and Android widgets
4. ibm.com/developer Works
5. IPhone SDK Development, Bill Dudney and Chris Adamson, Pragmatic
Programmers, 2009.
6. Beginning iPhone Games Development, PJ Cabrera, et al, Apress, 2010.
7. Developing Apps for iOS (video and pdf) from Stanford University