Speed up your coding using quick and easy JavaScript

JavaScript Mobile

I now want to show you some of the JavaScript libraries and frameworks, albeit only a few, that are making their way into the mobile development community. Mobile is kind of like the Wild West revisiting us again; we're heading into unchartered landscapes and JavaScript for mobile web apps shouldn't be treated as like-for-like in the desktop world.

There are any number of considerations to be met: performance of the mobile device, whether you want to replicate the native UI and whether the mobile device even supports the newest JavaScript methods.

XUI

XUI is another project started by Brian LeRoux of Lawnchair. It's a super-tiny, 3k-compressed mobile JavaScript library akin to jQuery and designed for simple DOM manipulation and traversal. It also includes Ajax and Effects via Emile.js.

As per jQuery, it supports the simple xui.fn.myplug plug-in model, so it's completely extendable. The project aims to be compatible with mobile browsers based on WebKit, Mozilla's mobile browser Fennec, Opera, IE and BlackBerry. It's still in-project but is stable. I'd recommend getting the source from GitHub.

jQTouch isn't so much a framework as a jQuery plug-in that provides a native UI feel to iPhone-based web apps. This includes transition effects, a few template styles for all the UI widgets (such as lists, buttons and toolbars), swipe detection so that it interacts like an iPhone app and, finally, the ability to extend the functionality of the plug-in.

A number of jQTouch-based iPhone apps have already been submitted and are available in the iTunes store, compiled via PhoneGap. I even saw live coding demos by Jonathan Stark during the SXSW conference, showing how he was able to get jQTouch up and running in a simple web app in a matter of a mere 10 minutes.

Finally, I feel compelled to include an honorary mention to jQuery in this section. John Resig has been busy testing mobile devices to understand what they're capable of and, most recently, he's said that jQuery will support a matrix of mobile browsers, akin to the Yahoo graded support matrix. He's also said that unmodified jQuery will support mobile browsers from B-grade and upwards. It's definitely one to watch.

Find what suits you

Selecting and using a JavaScript library, framework, micro-library or even plug-in can be a tricky job. I've shown you some of the projects out in the wild already, and there'll be a fair few more by the time you've read this.

As Ajaxian says: "A new Ajax framework is born every three minutes", and with all that choice, there's bound to be one out there that's perfect for you. So go find it!

Latest in Tech
The best tech of MWC 2025 examples, including the Nothing Phone 3a Pro, the Nubia Flip 2, and the Lenovo Solar PC
Best of MWC 2025: the 10 top tech launches we tried on the show floor
Toy Fair 2025 Primal Hatch
The 7 best toys we saw at Toy Fair 2025, from a Lego boat to a hatching, robotic dinosaur
ICYMI
ICYMI: the 7 biggest tech stories of the week, from a next-gen Alexa to the new iPhone 16e
A triptych image featuring the Beats Powerbeats Pro 2, iPhone 16e and Amazon Echo Show 21.
5 hottest tech reviews of the week: the gorgeous, affordable iPhone 16e and Amazon's epic 21-inch Echo Show
Apple Airtag four pack on orange background with lowest price sign
The Apple AirTags are now even cheaper than Black Friday thanks to a surprise price cut at Amazon
Acer Predator Helios Neo 14 on purple background with big savings text overlay
Portable and powerful, the Acer Predator Helios Neo 14 gaming laptop with an RTX 4070 is $600 off right now
Latest in News
Stock photographs of people smiling and looking at laptops in a small business environment.
This web hosting platform elevates your online presence
The Samsung Galaxy S25 Edge on display at Galaxy Unpacked
Exclusive: the Samsung Galaxy S25 Edge will have durability to match its ‘sexy’ form
Metaphor: ReFantazio
Sega was Metacritic's highest-rated publisher of 2024 thanks to the critically acclaimed Metaphor: ReFantazio and Like a Dragon: Infinite Wealth
AirPods Pro Review
Apple has quietly updated its guidance on how to clean your AirPods, and suggests you buy a kit… from Belkin
China
Chinese hackers who targeted key US infrastructure charged by Justice Department
A screen shot of Lady Gaga in her interview with Zane Lowe for Apple Music
Lady Gaga’s Spotify press conference is being live streamed today – here’s where you can watch Spotify’s big step forward in fan inclusion