jQuery Mobile Sample: Executive Dashboard

In this tutorial you will build a jQuery Mobile app based on an Executive Dashboard prototype that I put together some time ago while working on my  jQuery Mobile book. The app consists of a screen that renders charts and a summary table, all displaying important performance indicators for a hypothetical business. You will find it useful as a starting point for a dashboard-type application using jQuery Mobile.

executive-dashboard-1

[Read more...]

New Book – How to Build a jQuery Mobile Application

I just published How to Build a jQuery Mobile Application, a book that will teach you the essential skills you need to succeed developing apps with jQuery.

As I do in the tutorials on this blog, the book follows a hands-on approach, walking you through the process of building a jQuery Mobile application. Here are some of the subjects you will learn:

  • jQuery Mobile pages, dialogs, and navigation
  • List view and master-detail user interfaces
  • Capturing user input with form elements
  • Saving application data on the device
  • Synchronizing application data with a server

If you like to learn by doing, this is a book for you.

Check It Out

You can preview the book here: Learn more about How to Build a jQuery Mobile Application.

You can download the book here: Download How to Build a jQuery Mobile Application.

Thanks to the Reviewers

I would like to thank @BISQLDave, @JTMcGibbon, @jonstieglitz, and @alberto_velaz for their feedback and help creating this book.

What Do You Think?

I would also like to hear what you think about the book and how I can make the next version better. Please leave a comment if you have a few minutes.

Building a jQuery Mobile Application, Part 4

In this fourth part of my series on how to build a jQuery Mobile application, we are going to complete the following tasks:

  • Implement the behavior of the app when a user tries to save an invalid note.
  • Implement the ability to delete notes.
  • Create and apply a custom theme swatch, to change the look of one of the application’s dialogs.

[Read more...]

Sencha Touch or jQuery Mobile? – Read This Before You Make a Decision

If you ever need to choose between jQuery Mobile and Sencha Touch, you need to consider these factors before making your decision:

About jQuery Mobile

  • It’s a UI-only library, which relies on jQuery and jQuery UI for DOM manipulation, Ajax and other utilities
  • To create UI widgets, you generally need to hand-code their html, and the library enhances their look and feel
  • As it works by enhancing the html you create, it allows you to re-use or re-purpose existing html
  • Some simple applications can be created using only html, without having to write JavaScript code
  • It has a relatively small object model, which makes it faster and easier to learn, specially if you are familiar with jQuery
  • It does not impose a coding discipline or structure, which gives you flexibility, but can lead to applications that are difficult to maintain
  • Easier to integrate with other frameworks
  • Targets more devices than Sencha Touch
  • Not tied to a particular vendor

About Sencha Touch

  • It’s a library that tries to do it all: UI widgets, DOM manipulation, Ajax and other utilities
  • Does not depend on other libraries
  • Follows a JavaScript-centric approach, where you are required to write little html
  • Has a large object model, which provides more features out of the box, but takes longer to learn
  • Imposes a coding structure and discipline, which generally results in well-organized code
  • Provides built-in server and local storage abstractions, which make it easier to perform CRUD operations on relational data
  • Has built-in facilities for creating iOS and Android native packages
  • Targets less devices than jQuery Mobile

Want To Learn More?

I have a selection of Sencha Touch and jQuery Mobile tutorials that will help you build great applications. Check them out using these links:

Building a jQuery Mobile Application, Part 3

In this third part of my tutorial on how to create a mobile web app using  jQuery Mobile we are going to focus on the following areas:

  • How to pass information between the Notes List page and the Note Editor page using URLs and query strings
  • How to load a note in the Note Editor page
  • How to save a new or edited note

Let’s begin with a few changes that will make the application easier to maintain and test.
[Read more...]

Building a jQuery Mobile Application, Part 2

This is the second part of my tutorial on how to create a mobile web app using jQuery Mobile. In this tutorial we’re building a mobile web application that offers its users the following features:

  • Ability to create, edit and delete notes.
  • Ability to store notes on the device running the application, across browser sessions.
  • Ability to view the entire collection of notes stored on the device.

In the first chapter of this series we started building the business logic layer of the app. We are using a simple workflow that consists of the following steps:

  • Use the Jasmine framework to define the business logic behavior.
  • Implement the behavior in the application.
  • Confirm that the implemented behavior adheres to its definition.

We’re now going to continue working on the business logic features that will allow us to retrieve the list of notes cached on the device. We’re also going to use the jQuery Mobile framework to present the cached notes to the user.

By the end of this article, we will have completed the first version of the Notes List screen. This screen will render the list of cached notes as depicted below.

[Read more...]

Building a jQuery Mobile Application, Part 1

This is the first part of a series of articles about how to create a mobile app using jQuery Mobile. As in my Sencha Touch tutorials, what we will do in this series is create a mobile web application that allows its users to take notes and save them in the device running the app.

We will engineer our business logic using JavaScript modules and classes, and we will use the jQuery Mobile framework to help us create our presentation layer. We will build the app following a behavior-driven approach with the help of the Jasmine framework. For each use case, we will create a specification using Jasmine, then we will implement the specification in the application.

In this first part of the tutorial, we are going to talk about the overall design of the application, and we will complete the following tasks:

  • Define the features of the application
  • Create low fidelity user interface mock-ups
  • Begin creating Jasmine specifications for the app’s public interface
  • Begin implementing the app’s public interface

Let’s get started.

Application Features

The application has a simple feature set. We want to give our customers the following abilities:

  • Create notes.
  • Edit notes.
  • Delete notes.
  • Store notes on the device that is running the application, across browser sessions.
  • View the entire collection of notes.

The Main Views

The first thing we need in the app is an interface for our users to create and edit notes. We can do this with a form, which we will call Note Editor. The form will look just like this mock-up, which I created using Balsamiq Mockups:

In addition, need a view that renders a list of the existing notes. The Notes List view will be the main view of the application. Our users will first see this view when they launch the app. This is how the Notes List should look:

We will connect the Notes List with the Note Editor in such a way that the Notes List will correctly reflect note additions, edits, and deletions.

OK. We defined the features and look of the app, which brings us right into the realm of specifications and testing.

[Read more...]

Interesting jQuery Mobile Tutorials

Here are some links to interesting jQuery Mobile tutorials for your reading pleasure:

Want To Learn More?

Check out my How to Build a jQuery Mobile Application EBook. It teaches you how jQuery Mobile works by guiding you, step by step, through the process of building an application. It even explains how to keep application data synchronized with a server.

You might also want to check my series on how to build a jQuery Mobile application: