Is jQuery Mobile Right for You?
Mobile application developers face perhaps even greater challenges due not only to the wide array of mobile browser incompatibilities, but also because the need to produce layouts which thrive within the varied form factors and limited resources inherent to mobile devices. Enter jQuery Mobile, a self-described “touch-optimized web framework for smartphones and tablets” which takes advantage of both jQuery and jQuery UI.
Although still only a beta release (the second beta release was announced on August 3), jQuery Mobile already supports an impressive number of mobile platforms, including Android, BlackBerry, iOS, and Windows Mobile, among others. Equally impressive is the sheer number of supported widgets, which thanks to the emphasis placed on progressive enhancement, developers can use to easily create unified, cross-mobile device interfaces. Be sure to load the demo into a number of different devices, including your desktop browser, to get a feel for how the interface morphs to suit the target device.
DIV which is associated with custom attributes. For instance:
jQuery Mobile’s Key Qualities
Although there are many reasons to use jQuery Mobile, three reasons in particular stand out among the rest:
- jQuery developers will feel right at home with jQuery Mobile due to the shared code base.
- Focus on cross-platform compatibility is ideal if the target user base is not constrained to using a particular device.
- Widespread community and corporate participation has led to jQuery Mobile support within popular development products such as Dreamweaver CS 5.5 and a slew of interesting plugins such as the very slick Photo Swipe.
Is jQTouch Right for You?
Whereas jQuery Mobile strives to provide compatibility across a wide spectrum of mobile devices, the jQTouch project instead focuses the bulk of its effort on devices supporting WebKit-based browsers (Chrome and Safari). Therefore, jQTouch should be used in conjunction with web applications intended to be deployed on the iPhone and Android devices. Supporting slick WebKit-optimized animations, multiple themes which are intended to mesh with the mobile device’s styling,
The easiest way to get acquainted with jQTouch’s capabilities is by way perusing the demo site via your mobile device or a WebKit browser. In particular I suggest viewing the demo source, as you’ll see that like jQuery Mobile, jQTouch “pages” are assembled using a series of
DIV elements and associated attributes, an approach which should put designers right at home.
jQTouch’s Key Qualities
Although there are many reasons to use jQTouch, two reasons in particular stand out among the rest:
- Although jQTouch is also based on jQuery, its focus is primarily on optimized support for WebKit-based browsers. Therefore jQTouch might be preferable if you plan on specifically targeting users tied to an iOS- or Android-based device.
Is Sencha Touch Right for You?
Additionally, Sencha Touch takes a much more holistic approach to the challenges inherent to application development in the sense that it supports building an MVC-driven application right out of the box. To illustrate just how stark the contrast is between building a Sencha Touch application versus a jQuery Mobile / jQTouch application, compare the source code found in the jQuery Mobile / jQTouch demos with the following Sencha Touch code, used to merely create and launch a viewport:
this.viewport = new App.views.Viewport();
Sencha Touch’s Key Qualities
Although there are many reasons to use Sencha Touch, three reasons in particular stand out among the rest:
- The Sencha developers have put considerable effort into publishing a wide variety of tutorials and demo applications on the Sencha website.
On the occasion I pen a summary article such as this, readers inevitably subsequently ask for a definitive conclusion regarding which framework is preferable. The answer is always the same: It depends. Sencha Touch is no doubt the most feature-rich of the three, however it comes with an occasionally dubious learning curve. That said, if your goal is to merely provide a user-friendly mobile interface to an existing application, then jQuery Mobile or jQTouch are likely going to provide the path of least resistance. If you’ve set your mobile ambitions higher, then Sencha Touch is in all likelihood going to be well worth the time investment. Regardless of what solution you wind up choosing, I’d love to hear about your experiences! Please add your comments below, or get in touch via e-mail.
About the Author
Jason Gilmore — Contributing Editor, PHP — is the founder of EasyPHPWebsites.com, and author of the popular book, “Easy PHP Websites with the Zend Framework”. Jason is a cofounder and speaker chair of CodeMash, a nonprofit organization tasked with hosting an annual namesake developer’s conference, and was a member of the 2008 MySQL Conference speaker selection board.