jQuery Mobile vs. jQTouch vs. Sencha Touch, Page 2

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.

Like jQuery Mobile, jQTouch takes an HTML- and CSS-centric approach to page development, using JavaScript to solely focus on incorporating events, animations, and other functionality. This approach is appealing when working with a designer or when the developer isn't particularly proficient with JavaScript and is looking for a way to ease into mobile web development.

Is Sencha Touch Right for You?

In comparison to jQuery Mobile and jQTouch, Sencha Touch comes with a relatively steep learning curve, however with the added complexity comes amazing capability. A dual-licensed (commercial and GPL/FLOSS) product of Sencha, Inc., Sencha Touch employs a radically different approach to its aforementioned siblings in that the layout and interface widgets are built using a slick JavaScript library which also happens to be packed with useful features such as offline support, idiomatic layouts, and easy theming capabilities.

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:

Although this approach is perhaps daunting to relative JavaScript novices, I nonetheless suggest spending some time experimenting with Sencha Touch as the intuitive syntax, well-written documentation, and numerous companion examples will go a long way towards quickly bringing you up to speed.

Sencha Touch's Key Qualities

Although there are many reasons to use Sencha Touch, three reasons in particular stand out among the rest:

The native MVC architecture serves to quell the nerves of framework-oriented developers who fret over how to sanely organize JavaScript code.

The Sencha developers have put considerable effort into publishing a wide variety of tutorials and demo applications on the Sencha website.

The JavaScript-driven approach to widget placement and organization will be familiar to developers hailing from widget toolkit backgrounds (think Swing and GTK+).

Conclusions

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.