Skip to Content
jQuery Mobile
book

jQuery Mobile

by Jon Reid
June 2011
Intermediate to advanced
128 pages
2h 54m
English
O'Reilly Media, Inc.
Content preview from jQuery Mobile

Chapter 6. jQuery Mobile in Action

Putting this all together, we are ready to build an actual mobile application with jQuery Mobile. Let’s start with a simple mobile Twitter client: jqmTweet. jqmTweet will have the following features:

  • Display the first page of tweets of the desired Twitter user in a list view

  • Tapping on a tweet will display a detail page for that tweet

  • The Twitter user and number of tweets to display needs to be configurable

  • The application must handle errors gracefully

Application Pages

One of the best ways to approach a new jQuery Mobile application is to think of it in terms of individual pages. Because it’s so easy to create individual pages in jQuery Mobile, it often makes sense to build out all of the pages with placeholder text that you can fill in with data later. In addition to getting you up and running quickly, it also provides the potential benefit of creating an interactive prototype that you can use for demonstrations or user testing. Need to get stakeholder buy-in for the new application? Want to do some feature validation with your users? No problem, just mock out your application pages in jQuery Mobile.

For jqmTweet, the application will have a main page (with the list of tweets), a detail page (for displaying the details of an individual tweet), a configuration page (for updating the Twitter user name and number of tweets), and an error page (for error dialogs).

First off, the main page will look as shown in Example 6-1.

Example 6-1. jqmTweet main tweet ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

jQuery Mobile: Up and Running

jQuery Mobile: Up and Running

Maximiliano Firtman
jQuery UI

jQuery UI

Eric Sarrion

Publisher Resources

ISBN: 9781449309626Errata Page