Mobile Web Development - Mehta Nirav - E-Book

Mobile Web Development E-Book

Nirav Mehta

0,0
23,27 €

-100%
Sammeln Sie Punkte in unserem Gutscheinprogramm und kaufen Sie E-Books und Hörbücher mit bis zu 100% Rabatt.

Mehr erfahren.
Beschreibung

In Detail

As more users access the Web from their phones and other handhelds, web developers need to learn techniques for targeting these new devices. Sites such as Twitter, Facebook, and Google target mobiles with their services and products. Companies use mobile services to provide staff access to their applications while away from a computer.

This book is a complete, practical guide to writing mobile websites and applications. You will learn how to create mobile-friendly websites, adapt your content to the capabilities of different devices, save bandwidth with compression, and create server-side logic that integrates with a mobile front end. You will also see other methods for integrating your web application with mobile technology: sending and receiving MMS and SMS messages, accepting mobile payments, and working with voice calls to provide spoken interaction.

The book illustrates every technique with practical examples, showing how to use these development methods in the real world. Along the way we show how an example pizza delivery business can use these methods to open up to the mobile web.
Whether you want to provide customers and users of your public website with new ways to access your services, or build applications so that staff can stay up to date while on the road, this book will show you all you need to build a powerful mobile presence.

Technologies and tools covered in the book

PHP, JavaScript, AJAX, XHTML Mobile Profile (XHTML MP), Wireless CSS, WAP 2.0, Tera WURFL, MyMobileWeb, Mobile Web Toolkit, Image Server, GAIA Image Transcoder, HAWHAW , ready.mobi, Nokia's Mobile Internet Toolkit , SMIL, Voxeo's Prophecy server, VoiceXML (VXML), grXML, Frost library,  WALL, WURFL, SMS, MMS, mobile payment gateways, mobile widgets, Mobile AJAX, Android, Google Gears, and Dojo Offline.

Mobile Web Development shows you how to build a mobile presence for your web applications and sites. It covers targeting different mobile web browsers, sending and receiving SMS and MMS messages, accepting mobile payments, and developing voice- and touchtone-response systems.

Approach

The author adopts a fast-paced, practical approach to developing for the mobile web. The book focuses on solutions, pragmatic tips, and fast results rather than theory.

Each chapter focuses on an aspect of taking a pizza delivery company onto the mobile web. This ensures that the chapters remain practical and realistic, focusing on getting things done. The book also provides discussion and reference material to help you apply the techniques to your own projects.

Who this book is for

This book is for web developers who want to provide mobile support for their applications.

The book assumes some knowledge of HTML, CSS, and JavaScript. The reader should also know a server-side language. The examples in the book use PHP, but can be adapted easily to other languages. The book does not use J2ME, focusing instead on using the phone's web browser and other standard features.

Sie lesen das E-Book in den Legimi-Apps auf:

Android
iOS
von Legimi
zertifizierten E-Readern

Seitenzahl: 281

Veröffentlichungsjahr: 2008

Bewertungen
0,0
0
0
0
0
0
Mehr Informationen
Mehr Informationen
Legimi prüft nicht, ob Rezensionen von Nutzern stammen, die den betreffenden Titel tatsächlich gekauft oder gelesen/gehört haben. Wir entfernen aber gefälschte Rezensionen.



Table of Contents

Mobile Web Development
Credits
About the Author
About the Reviewer
Preface
What This Book Covers
What You Need for This Book
Conventions
Reader Feedback
Customer Support
Downloading the Example Code for the Book
Errata
Questions
1. Getting Mobile
What is Mobile Web?
Mobile Web Integration is Connecting the Two!
The First Step—Understanding Mobile Devices
Mobile Phones
PDAs
Other Devices
Mobile Data Usage is Exploding
Mobile Usage Around the World is Not the Same
Mobiles and Desktops
People Use Their Mobiles Differently Than Their Desktops
How Would You Do This Using Your Mobile?
It's Not All Rosy—Mobile Devices have Limitations
Advantages of Mobile Web
But There are Many Ways to Do Mobile Web Development!
What About WAP?
Bringing Order with Standards and Guidelines
Adaptation is Better, but LCD is Easier
Summary
2. Starting Your Mobile Site
Pizza On The Run and the Mobile Web
Different Options for Going Mobile
Do Nothing
When to Use This Approach
When to Avoid This Approach
Remove Formatting
When to Use This Approach
When to Avoid This Approach
CSS-Based Design
Wireless CSS
When to Use This Approach
When to Avoid This Approach
Mobile Site
When to Use This Approach
When to Avoid This Approach
Mobile Navigation and Information Architecture
Step-By-Step: Planning the Structure of Your Mobile Site
Handy Tips in Structuring Your Mobile Site
Setting Up the Development Environment
Hosting Your Mobile Site is Trivial
POTR Mobile Homepage
Making a Call is as Simple as Email
Understanding the Homepage
Document Structure
Fundamentals of XHTML MP
Before Writing Further Code, Let's Learn Some Grammar
XHTML Documents Must be Well Formed
Tags Must be Closed!
Elements Must be Properly Nested
Elements and Attributes Must be in Lowercase
Attribute Values Must be Enclosed within Quotes
Attributes Cannot be Minimized
XHTML Entities Must be Handled Properly
Most Common HTML Elements are Supported
XHTML MP Does Not Support Many WML Features
Summary
3. Building Pizza On The Run
Luigi's Pizza On The Run
Designing Layouts for the Mobile Web
Mobile Screen Sizes
Colors, Images, Page Sizes, and More
To Mobile or Not to Mobile?
Web Layouts Don't Work on Mobile Devices
Using Wireless CSS as the Silver Bullet, Almost!
Creating the Database and Code Architecture for POTR
Classes for POTR
Database Schema
Coding Framework
Redoing the POTR Homepage
Form Elements Don't Look the Same Across Browsers
Form Processing Does not Change!
Handling Sessions and User Login
Taking Orders
Constraining User Input with WCSS
Single-Step Registration and Order Placement on POTR
Special Effects with CSS
Luigi's Pizza On The Run is Live!
Summary
4. Adapting to User Devices
What is Adaptation?
Do I Need Adaptation?
Can't I just Use Common Capabilities and Ignore the Rest?
How to Determine the LCD?
OK, So How do I Adapt?
Fancy Pizza Selection
What are Those <wall:*> Tags?
Let's Make Sense of This Code!
Can I Use All XHTML Tags?
Will This Work Well for WML?
Device Detection and Capabilities
XML Processing can Bog Down My Server, is There Something Easier?
What About W3C's DIAL?
Other Useful Tools for Adaptation
Dynamically Resizing Images
Quick and Easy Way to Make Your Blog Mobile
MyMobileWeb: Going the Semantic Way
HAWHAW: As Simple as a Laugh?
Summary
5. Developing Standards- Compliant Sites
Running the ready.mobi Test
Time for Action: Test Your Site's Mobile Readiness with the ready.mobi Test
So What is Happening?
Creating the Structure, Design, Markup, and Navigation for Best User Experience
Mobile Web Development Checklists
Strategy
Testing Setup
Structure and Page Information
Design and CSS
Images
Navigation and Links
Content
Markup
User Input
Objects, Security, Caching, Etc.
Best Practices should be Upgraded!
Most Good Styles of Design and Software will Work on the Mobile Web Too
Collecting User Behavior Data
Time for Action: Implementing User Tracking
How is All the Data Tracked?
Covering Problem Areas
Tapping into the Device Data
Making it Easier to Ask for Help
Summary
6. Sending Text Messages
Updating Order Status
Time for Action: Updating Order Status
Sending SMS Notifications
Getting Started with a Gateway
Time for Action: Registering on Clickatell
Connection Types
Integrating with Clickatell
To Authenticate and Get a Session:
To Send an SMS after Authenticating:
Time for Action: Integrating with Clickatell to Send SMS Notifications
What Just Happened?
So What Happens at the Gateway?
Finding Message Delivery Status
Time for Action: Tracking Queued Messages
Querying for Message Status
Lessen the Load with Status Update Callbacks
Before You Decide on a Gateway
Sending SMS from Your Own Computer
Sending Bulk Messages
Summary
7. Adding Spice to Messages: MMS
Creating a "Special Offers" MMS message
Time for Action: Compose an MMS message using Nokia Tools
What Just Happened: Understanding MMS Structure
Want to Know More about MMS?
Controlling Message Presentation
Understanding SMIL Elements
Modules and Elements of SMIL 2.1 Mobile Profile
More SMIL: Applying Transitions
Sending Multimedia Messages through Our Gateway
Time for Action: Sending MMS Messages via Clickatell
How is an MMS Message Sent?
MMS Gateways do Good Work
Receiving Photos from Customers via MMS
Time for Action: Decoding an MMS Message
What Just Happened: Decoding the MMS Message
MMS's Potential is Yet to Be Exploited!
Summary
8. Making Money via Mobile Devices
Getting Money through PayPal
Time for Action: Setting Up the PayPal Account for Mobile Payments
Why This Configuration?
Mobile Checkout is a Three-Step Flow
Time for Action: Integrating PayPal Mobile Checkout with POTR
How Does This Work?
Evaluating Mobile Payment Methods
Premium SMS
Pros and Cons
WAP-Based Credit Card Payment
Pros and Cons
Direct Billing
Pros and Cons
Proximity Payment
Pros and Cons
Security Concerns in Mobile Payments
Using SMS in Mobile Payment
Receiving Text Messages
Getting a Short Code
Receiving Messages via Clickatell
Sending Messages That Can Be Replied To
Making it Easier—Payment Gateways Help get More Money!
Summary
9. Interactive Voice
First, Some Basics
Busting Some Jargon
IVR Infrastructure: Hosted or Owned?
Time for Action: Setting Up an Interactive Voice Response Platform
Getting Curious?
Designing the Call Flow of Our Application
Creating an Application to Play Audio
Time for Action: Creating an Application and Welcoming Callers
How Did This Work?
Making Choices by Key Presses
Time for Action: Prompting the User for Next Action
How Does All This Fit Together?
Transferring Calls in Voice XML
Handling Errors
Adding Global Navigation with the <link> Tag
Recognizing Voice
Storing Variables at the Application Level
Detecting the Caller's Phone Number
Time for Action: Let's Put It All Together
What's Cooking There?
Writing Complex Grammar Rules
Time for Action: Writing Complex Grammars
What Just Happened? How Did it Work?
Selecting the Topping and Quantity
Confirming and Submitting an Order
Time for Action: Confirming and Submitting an Order
How Did It Turn It All Around?
Summary
10. Mobile AJAX
Getting Pizza Recipes via AJAX
Devising our AJAX Strategy
Time for Action: Showing Recipes
What's Going on in the Background?
What if Your Device Does Not Support AJAX?
Adding Navigation
Time for Action: Adding Navigation for Recipes
Adding Comments
Time for Action: Submitting Comments
What's the Deal with All that Form Code?
I Want More AJAX on My Mobile!
Understanding iPhone Application Development
More Ways to Build Rich Mobile Apps
Summary
11. Mobile Web 3.0?
Mobile Web Applications are Growing Faster than Humans
Mobile Widgets and Mobile Browsers
The Advantages of Mobile Widgets
Mobile Browsers Get Better
Do We Need Server-Side Adaptation?
Connectivity—Mobile Networks and Occasionally Connected Devices
Occasionally Connected Computing
Androids will Invade Your Mobile Space Soon!
Getting Inside the Android
Other Players
Is the Mobile the Next Computer?
How will People Use Their Mobile Computer?
Mobile is Not Limited to Phones
Some More Analysis!
Location-Based Services will Mushroom
SMS Messaging will Continue Its Hold
Mobile Payments will Happen, Albeit Slowly
You will Build Some Kickass Mobile Web Applications
Resources for Mobile Web Integration
Summary
Index

Mobile Web Development

Nirav Mehta

Mobile Web Development

Copyright © 2008 Packt Publishing

All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.

Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, Packt Publishing, nor its dealers or distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.

Packt Publishing has endeavored to provide trademark information about all the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.

First published: February 2008

Production Reference: 1300108

Published by Packt Publishing Ltd.

32 Lincoln Road

Olton

Birmingham, B27 6PA, UK.

ISBN 978-1-847193-43-8

www.packtpub.com

Cover Image by Bharath Kumar (<[email protected]>)

Credits

Author

Nirav Mehta

Reviewer

Michael Peacock

Senior Acquisition Editor

David Barnes

Development Editor

Nikhil Bangera

Technical Editor

Ajay Shanker

Editorial Manager

Mithil Kulkarni

Project Manager

Abhijeet Deobhakta

Project Coordinators

Snehal Raut

Zenab Kapasi

Indexer

Hemangini Bari

Proofreader

Chris Smith

Production Coordinators

Aparna Bhagat

Shantanu Zagade

Cover Work

Aparna Bhagat

About the Author

Nirav Mehta is renowned for his entrepreneurial ventures, his breakthrough ideas, and his contribution to open source. Nirav leads a software development company—Magnet Technologies—from India that specializes in Rich Internet Applications, Web, and Mobile. Nirav believes in simplifying the most complicated ideas and presenting them in lucid language.

Over the last ten years, Nirav has written and spoken on a variety of topics. He has also been instrumental in localization efforts in India and training programmers to be effective developers. He blogs at www.mehtanirav.com.

My love and thanks to my parents. It's your support and freedom that lets me do all things I love! Thank you!

I would like to thank Mayank Sharma, for his recommendations. Without you, the book wouldn't be possible.

Thanks to David Barnes, Packt's Acquisition Editor. Your comments, guidance, and blog have inspired me a lot.

I would like to thank Micheal Peacock and the team at Packt—Nikhil Bangera, Patricia Weir, Snehal Raut, Ajay Shanker, Sagara Naik, and everyone else. You guys are amazing! I will always remember how hard you worked to get the book out near my wedding, and the superb suggestions throughout.

Of course, the team at Magnet! Ashok, Vishal, and Harshad—you have been with me in all the ups and downs, I cherish your partnership. All Magneteers, thank you for being a great team!

I also appreciate the readers of this book! I believe you are up to something big, and hope my work helps you achieve it.

And finally, my wonderful wife, Nikita. I stole time from you for the book. Thanks for your constant love, encouragement, and reminders!

About the Reviewer

Michael Peacock is a web developer and senior partner of Peacock, Carter & Associates (http://www.peacockcarter.co.uk) a web design and development business. Michael loves building websites and web applications, and when he isn't, likes to read, watch films, and occasionally take part in amateur dramatics.

Preface

As more users access the Web from their phones and other handhelds, web developers need to learn techniques for targeting these new devices. Sites such as Twitter, Facebook, and Google target mobiles with their services and products. Companies use mobile services to provide staff access to their applications while away from a computer.

This book is a complete, practical guide to writing mobile websites and applications. You will learn how to create mobile-friendly websites, adapt your content to the capabilities of different devices, save bandwidth with compression, and create server-side logic that integrates with a mobile front end. You will also see other methods for integrating your web application with mobile technology: sending and receiving MMS and SMS messages, accepting mobile payments, and working with voice calls to provide spoken interaction.

The book illustrates every technique with practical examples, showing how to use these development methods in the real world. Along the way we show how an example pizza delivery business can use these methods to open up to the mobile web.

Whether you want to provide customers and users of your public website with new ways to access your services, or build applications so that staff can stay up to date while on the road, this book will show you all you need to build a powerful mobile presence.

What This Book Covers

Chapter 1 introduces the Mobile Web and we'll see why mobile web is the next big thing.

Chapter 2 is our first look at the example site we'll be building in the book: "Pizza on the Run" (POTR). Specifically, we look at: picking the best method to deliver your site to mobile browsers, designing navigation and information architecture, setting up a development environment, learning XHTML Mobile Profile—the presentation language for mobile applications, and developing Pizza On The Run's mobile site homepage.

Chapter 3 looks at: designing layouts for the mobile web, using Wireless CSS in design, being aware of differences in mobile browsers, creating the database and code architecture for our example site (POTR), using forms on the mobile web, handling user authentication, testing our work in simulators, constraining user input with Wireless CSS, and applying special effects using Wireless CSS.

Chapter 4 covers: understanding the Lowest Common Denominator method, finding and comparing features of different mobile devices, deciding to adapt or not, adapting and progressively enhancing the POTR application using Wireless Abstraction Library, detecting device capabilities, evaluating tools that can aid in adaptation, and moving your blog to mobile.

Chapter 5 specifically looks at: running a ready.mobi test on your site, creating the structure, design, markup, and navigation for best user experience, and collecting user behavior data to keep enhancing the site.

Chapter 6 looks at sending text messages, and in the process covers the fundamentals of using third-party services for messaging. We specifically take a look at: updating order status for POTR, selecting an SMS gateway provider and setting up an account, sending text messages using the gateway's API, understanding how an SMS message is delivered, getting delivery status updates, setting up our own SMS gateway, and sending bulk messages.

Chapter 7 covers: creating Multimedia Messages for special offers at POTR, controlling message presentation, sending Multimedia Messages through our gateway, and receiving photos from customers via MMS.

Chapter 8 explores and set up a mobile payment system for POTR. Specifically, we look at: getting money through PayPal, evaluating mobile payment methods—their pros and cons, security concerns in mobile payments, using SMS in mobile payment, Premium SMS and Short Codes, and receiving Text Messages via a short code.

Chapter 9 looks at: setting up an interactive voice response platform, playing pre-recorded audio and text to speech, accepting keypad inputs, accepting voice input and doing speech recognition, performing dynamic calculations on input, and integrating with server-side scripting.

Chapter 10 covers how to use AJAX on mobile platforms. We specifically look at: getting pizza recipes via AJAX, enabling AJAX in forms, understanding iPhone application development, and more about building rich mobile apps.

Chapter 11 looks at: trends in mobile web applications, mobile widgets and developments of the browser, connectivity—mobile networks, occasionally connected devices, open Handset Alliance and Google's Android system, and resources to keep abreast of the mobile scene.

What You Need for This Book

You do not need any specific software/hardware to benefit from the book. But:

To run the examples, you will need a PHP/MySQL setup.You will need a Windows system to install mobile emulators and IVR software.

Reader Feedback

Feedback from our readers is always welcome. Let us know what you think about this book, what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to <[email protected]>, making sure to mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email <[email protected]>.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer Support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the Example Code for the Book

Visit http://www.packtpub.com/support, and select this book from the list of titles to download any example code or extra resources for this book. The files available for download will then be displayed.

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing this you can save other readers from frustration, and help to improve subsequent versions of this book. If you find any errata, report them by visiting http://www.packtpub.com/support, selecting your book, clicking on the Submit Errata link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to the list of existing errata. The existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Questions

You can contact us at <[email protected]> if you are having a problem with some aspect of the book, and we will do our best to address it.

This book is dedicated to my parents—Vinod & Nayna and my wife—Nikita; for their love and support

Chapter 1. Getting Mobile

When Evan Williams, founder of Blogger and Odeo, had to pick up what he would do next to revolutionize the Web, he decided to go mobile. Evan returned the VC money to focus on Twitter—a service that allows keeping in touch with friends via alerts to and from your mobile phone (and instant messenger and web)! After six months of launch, Twitter had reached 50,000 active users. The number doubled to 100,000 in just one month after Twitter won the Best Blog award at South By South West conference.

Evan mentioned "Best Blog" was a weird category for Twitter, as Twitter is not a blog. But Twitter's growth has been phenomenal. As Ewan Spence of The Podcast Network puts it, "Twitter has got Americans texting!" And that included a US Presidential candidate!

The way it works is very simple. Whenever you want to update your friends about what you are doing, just pick up your phone, type an SMS, and send it to a special shortcode number. Twitter broadcasts it to all your friends and posts it on your Twitter page. Your friends will know what you are up to, whether they are online or on the move.

If you have a lot of friends, you may love getting text messages about what they are eating and what their cat is doing. Or you may hate the SMS beeps at all odd hours. But it is a fact that Twitter is a big-time success. And it shows where things are moving.

Things are moving mobile!

Broadtexter allows music bands to broadcast messages to their fans via SMS. With a Broadtexter account, the band get a simple widget they can place on their site. Fans register using this widget. When the band are doing a show, they go to Broadtexter, select the area of the show, and send out an SMS broadcast to all those fans with the venue and time of the show. Unlike the conventional thinking that people would not like such updates, the idea has been a hit. Many bands had people coming in and thanking them for the SMS! They weren't doing anything else that evening, and the last minute text message excited them to get to the show. The band not only sold more tickets but also got a new way to keep in touch with fans.

Imagine Twitter or Broadtexter without the mobile connectivity. We will not go to a friend's blog to read short updates on what she or he is doing. We will forget the reminder a band had emailed two days ago about today's event. Twitter and Broadtexter are successful primarily because they allow updates over mobile devices in a quick and convenient manner.

And it is not only text messages. Google has a full blown mobile site. You can access it using a mobile phone or a PDA, and perform a search just like you would do from a desktop. You can navigate the results using the limited keyboard you have on the device and still get the job done.

Web applications are now reaching where their users are. Not just in front of their desktop, but also when they are traveling, or when they are driving looking for a good restaurant in the neighborhood.

Welcome to the world of Mobile Web!

What is Mobile Web?

Simply put, mobile web refers to the Web being accessed from mobile devices like cell phones and PDAs. The reach and capabilities of mobile devices has grown phenomenally over the last three years. Almost all mobile phones now can access the Internet in some or the other way. All PDAs have a tiny web browser built in. People are getting used to accessing information from the Web over their phones. Many use PDAs to check their emails and manage other bits of information. Early adopters of technology have already been blogging from their mobiles and viewing online photos and videos while they are traveling. Mobile web is all of that. Any website accessed from a mobile device is mobile web—whether it's been tailored to work on a mobile or not!

Mobile Web Integration is Connecting the Two!

We use mobile phones mainly to communicate with people—either voice or text. PDAs so far have been used for managing schedules and contacts, apart from some occasional office productivity work and games! The Web on the other hand has evolved greatly over the years. From the early days of simple HTML markup linking a few pages, to the Web 2.0 collaborative ecosystem, things have matured a lot. If you come to think of it, we can't expect a world without the Web or mobile devices today!

You may have done a lot of web programming and might be wondering how you can develop for mobile devices. Or you may want to add mobile features to your existing site. This book will teach you all that. Reading through the book, you can port your website to mobile devices. You can AJAXify your mobile site and integrate SMS or MMS messaging. You will even be able to accept payments via mobile and use intelligent interactive voice-response systems. With this book, you can bring web applications to mobile devices, integrating them with mobile-specific features!

By the way, we are not going to talk about mobile application development. We are not even going to talk about web application development. You don't need any J2ME knowledge or C++. All we assume is that you have a basic knowledge of HTML and some server-side programming technology. We will use PHP for the examples in the book, but you can easily customize them to any other language. We will explain different mobile technologies, so it's alright if you don't know them already!

The First Step—Understanding Mobile Devices

Go to any electronics store, and you will have hundreds of mobile phones to choose from. The shelf life of a mobile phone model is less than 18 months now. People change their phones every two years, and companies push new models every month. Mobile phones are not the only mobile devices! With pocket-sized computing devices—PDAs, micro notebooks, and even handheld notebooks—the options are bewildering. We will include both mobile phones and pocket-sized devices whenever we refer to mobile devices. Let us discuss some specific features and limitations of these mobile devices.

Mobile Phones

Mobile phones are the largest segment of mobile devices. Mobile phones typically come in "candy bar", "sliding box", or "clam shell" form. You surely have seen a variety of them. Mobile phones have a specially designed processor and run some kind of operating system. Symbian and Windows Mobile are widely used operating systems on mobile phones, and many phone manufacturers develop their own systems as well.

The most important use of a mobile phone is to talk. Then, you could use it to take photos, send messages, and play music. In the last three years, mobile phones have seen a number of innovations. All this has resulted in a vast variety of devices in the market—from simple feature phones to smart phones.

Color phones are a norm now, yet there are millions of monochrome devices around. The screen size, resolution, and color density varies greatly. You will see screen sizes from 120x120 to 320x240 and more.

The standard input mechanism for mobile phones is a 12-key pad with additional function keys. Some phones have a joystick that can be used for navigation. Wider-screen models sometimes feature a stylus-based input system or an on-screen keyboard. Phones like the iPhone have touch-sensitive panels, and some have accessories that you can attach to get a full QWERTY keyboard.

Mobile phones come in sizes that fit your pocket—some are incredibly small and some as big as a pencil box. Sleek and slim designs are in vogue—especially because a mobile phone is also a style statement. Having the latest model is a status symbol in many markets!

Referred to as SMS (Short Message Service, Message, or Text depending on the part of the world you are from), these 160 character text messages have revolutionized mobile usage. SMS is now used for all sorts of business and entertainment purposes. MMS (Multimedia Message Service) allows you to send pictures, sounds, and full videos to others just as you send emails.

But if there is one thing that changed mobile phones from communication devices to consumer goods, it is the camera. Starting with VGA quality images (640x480 pixels), today's mobile phones are equipped with five-megapixel cameras, flash, and other tools to add effects to the photographs. Millions have turned into amateur photographers just because of the camera in their phone. The Internet is full of funny and dirty video clips taken from mobile phones.

Not everyone could afford an iPod. So, mobile companies started adding MP3 support to their phones. Use of MP3 ringtones and swapping music files has become a norm. Listening to radio using the phone has shot up too.

And that's not all. As these phones are little computers themselves, you can develop applications that extend their functionality or add new features. Application development over Symbian, J2ME, BREW, or Palm is very popular. Each phone comes with a set of applications and utilities, and there are thousands of developers around the world who develop games and utility applications that run on mobile phones. Google's Android allows you to even replace the built-in applications—giving you full control over your device.

Most of the mobile phones today come with some sort of a web browser. Opera Mini is the most popular browser but there are many more. Different browsers support different features, and break some! Testing across browsers is one of the biggest challenges in mobile web development. The situation is much worse than desktop browsers, and we will see more on this in the coming chapters. The connectivity to the Web depends on the carrier you are on. You may be on GPRS, 3G, Bluetooth, WiFi, or anything in between.

PDAs

Another class of mobile devices is PDAs. Personal Digital Assistants have been around for quite some time and have evolved over this period. They contain many business and productivity applications—email, office productivity, and custom-built software. Typically, they have a QWERTY keyboard—either in the device or onscreen. Phone functionality is an add-on for PDAs, and most consumer PDAs are smart phones now. These handheld devices are merging with phones now, and are very popular with business users.

Other Devices

There are other devices that are used in a mobile fashion. Many embedded devices use mobile technology for communication. Micro notebooks, watches, or cars can be classified here as well. Gaming consoles are also used as web clients these days. We expect many hybrid devices to come up in the next few years leveraging higher computing power and mobile communication technology.

What do people do with all these devices? Understandably, it's much more than voice! Let's see the usage patterns of mobile devices.

Mobile Data Usage is Exploding

Mobiles are used for voice communication generally, but the usage of mobile devices for data communications is growing rapidly. Data usage includes simple things like SMS to mobile web, video and TV on mobile, and other innovations. For mobile companies, this is billions of dollars of additional revenues and for users, these are value-added services. This growth is seen across the globe. Japan, the USA, and China are leading the pack in data usage, but other developed and developing nations are not far behind.

According to a Chetan Sharma's consulting report (http://www.chetansharma.com/MobilePredictions2008.htm), Japan and Korea are the benchmarks in terms of mobile data usage, but the USA will soon be the largest revenue-generating market. Brazil, the Netherlands, and Czech regions are already doing more than 30% of their revenues from mobile data. Though a large part of this money is from SMS, other services are gaining larger shares. The USA has 50-60% data revenues from non-SMS services, while Japan and Korea have a higher 70-75%. This trend suggests there is a huge use already of mobile web applications, and it is going to continue not only in these regions but other parts of the world too.

Another interesting thing is that the western European region reports 100% of the population has mobiles—though part of this is due to double phones with single persons and dual reporting. The USA has more than 75% reach. Mobile subscribers around the world have already reached 3 billion, and China and India together are adding close to 13 million every month.

At the same time, the speed of wireless communications is increasing worldwide. Many countries already have 3G and more are gearing up for it. Some are considering 4G and better technologies for faster wireless access. All in all, it means that we can offer services that require faster net access!

Services that were earlier not possible—like video—have already started appearing and will continue to grow. Subscribers set wallpapers, ring tones, ringback tones, true tones, and download full tracks to listen to on their multimedia phones. Most are willing to pay for games. Many companies experimenting (and some betting on) mobile advertising—though 79% of users felt such ads intrusive!

Mobiles are transforming from communication devices to content devices, and will further transform to transaction devices. The evolution is happening faster than we think.

Mobile Usage Around the World is Not the Same

For every computer in the world, there are three mobile phones. Studies show that by 2010, there will be 4 billion mobile phones on this planet, and if we see the 2007 numbers, we may reach there well before 2010. 4 billion is 60% of the global population! Mobiles have provided an affordable and accessible computing platform. For most users, their mobile phone is their primary connection with high-tech, and more importantly the Web!

At the same time, the maturity of the mobile market differs widely in different regions. Japan and Korea are the most advanced, whereas Brazil, Russia, India, and China are seeing a volume growth. In developed countries, most people have exposure to computers and they adopt mobile web applications faster. In developing countries, communication and entertainment applications are proving more successful. There is a huge potential for low-cost services that can benefit large portions of the population.

When you build your mobile web application, make sure you understand the market well and launch the product accordingly. You may be too early or too late otherwise!

Mobiles and Desktops

When people access the Web from their mobile phones, they are in a different context. They may be traveling, waiting for something else to happen, looking for a nearby restaurant, wanting to take care of some chore or just browsing for fun. Mobiles are hardly used like the typical desktop is. Here is the first lesson to learn in mobile web application development:

People Use Their Mobiles Differently Than Their Desktops