Book Review: jQuery Mobile First Look

Post to Twitter

Today I’m going to review the first edition (published June 2011) of jQuery Mobile First Look by Giulio Bai. I’ve read the eBook version of this publication.

Chapter 1: What is jQuery Mobile?

This chapter begins with a comparision of the major mobile web frameworks that are currently out there like: jQTouch, Sencha Touch, iUI and iWebKit. The comparison is a fair assessment pointing out the strengths and weaknesses in each.

Unfortunately this book when it was published was right about when beta 1 of jQuery Mobile was released so on page 20 the author is referring to the alpha 2 release which is weird because on page 21 in the jQuery Mobile in action section he is pointing to the alpha 3 release. I downloaded the latest eBook so unfortunately if your looking for the latest beta changes you won’t find them in this current edition of the book. Your best bet of course for the latest changes to JQuery Mobile is at:

Page 22 mentions the infamous “back” button which in the beta releases has been turned off now by default.

Chapter 2: Organizing Content: Pages and Dialogs

The page structure is covered and what are the minimal pieces you need to compose a mobile web page. It looks like the screen shots have been done in the Android emulator which is fine but it would’ve been nice to have also seen screen shots for the iPhone as well so that people new to the framework could see how it renders on each device.

For page 27 keep in mind that data-role=”page” is now optional:

The rest of the basics are covered like linking to external pages, page transitioning with AJAX (Note: There are recent changes here in the newer jQuery Mobile releases), as well as theming using the baked in themes that ship with jQuery Mobile.

Chapter 3: Configuring and Extending jQuery Mobile

Customizing the default settings is the first topic covered and there is some out of date material here so be careful. An example is the ajaxFormsEnabled and ajaxLinksEnabled both of which have been removed in the beta 1 release:

Handling events is the next topic. A nice note is made by the author regarding bind or live for attaching a handler to an event – this sometimes trips up developers new to jQuery so it’s good that it was explained early on.

The touch events are covered such as tap, swipe, etc. as are scrolling and page events. Some discussion on $.mobile as well as the theme framework finishes off the chapter.

Make sure to review the changes, especially the ones under the section Navigation core: Decoupled for extensibility in the beta 1 release notes located here:

Chapter 4: Reading, Writing, Communicating: Content

Here the default HTML styling is explained and demonstrated and then the author moves into using columns and grids. These topics were well explained along with some simple examples that made it even more clear.

The author then moves into explaining and using collapsible blocks – keep in mind that in the beta 2 release they made it so pretty much all the UI widgets in the jQuery Mobile library are completely decoupled so they can simply be deleted if they are not needed for your project. This chapter does a good job at explaining its content and the examples are simple and to the point.

Chapter 5: Navigation Made Easier: Toolbars

This chapter is all about toolbars and does a great job going through the different types along with plenty of screen shots and source code to see exactly what the code renders, etc. A section on positioning follows-up after the talk on NavBars and then the chapter ends with a discussion on how you can theme it all.

Chapter 6: Mobile Clicking: Buttons

Like the previous chapter this one is similar except it’s all about buttons. The many types of buttons are covered as well as utilizing some of the supplied icons from the jQuery Mobile Framework. The chapter ends off with a section on theming the buttons. Fortunately the latest changes to jQuery Mobile haven’t affected toolbars and buttons too much so these chapters don’t really require you having to flip back and forth between the change logs of beta 1 and beta 2 as you should with the earlier chapters in this book in order to make sure your not working with outdated material.

Chapter 7: Transmitting Information: Forms

This chapter follows the pattern of the last two with the exception that it dives into looking at the other UI widgets like the slider, input elements, radio buttons, etc. The chapter like the previous ones ends with a discussion on theming.

Chapter 8: Organizing Information: List Views

List Views are covered in good detail explaining how to use them as well as screen shots on how they are rendered. It’s good information and something every jQuery Mobile developer needs to know as list views are a pretty big deal in the mobile world. The chapter is finished off with implementing a search filter bar.

Conclusion: For the first few chapters you will need to review the changes in the beta 1 and 2 release notes since this book was published prior to those releases. With that in mind, from about chapter four onward its pretty smooth sailing. If you want to get up to speed quickly with jQuery Mobile then this book will work and it will give you the basics you need. Keep in mind though this book is just a general introduction, more advanced topics like passing data to a server via AJAX are only briefly discussed. I think though if your new to the jQuery Mobile Framework this book would be a good fit in your library. You can easily go through it in a weekend and have a decent grip on jQuery Mobile after that. Hopefully this book is updated in the future to reflect the latest changes to jQuery Mobile. Writing a book on jQuery Mobile in a pre-1.0 release is difficult since the framework underwent a lot of changes this summer.

Post to Twitter

This entry was posted in JavaScript, Mobile, Open Source, Reviews. Bookmark the permalink.