Creating web apps and sites for the Mobile Web has its own sets of challenges and techniques. From UIs optimized for fingers instead of mouse cursors to the bandwidth limitations that most portable personal devices have, developing for mobile devices requires a paradigm shift for those of us who’ve traditionally created products aimed at desktops.
To help you rapidly deploy cross-platform mobile apps and websites, there’s a wide range of JavaScript frameworks you can take advantage of.
Some common characteristics of JavaScript mobile web development frameworks:
In this article, you’ll find my top picks of JavaScript mobile web development frameworks you should consider using to build your next mobile web app or website.
jQuery Mobile, a framework that will help you rapidly and confidently develop mobile app user interfaces across popular mobile device platforms like iOS and Android, is perhaps the most popular project out there.
The framework boasts a lightweight code base (weighing in at 20KB when minified and gzipped) and a huge bevy of standard user interface elements that mobile device users are accustomed to, such as switches and sliders.
See jQuery Mobile in action by going to its demo page (it doubles as the framework’s official documentation).
If jQuery isn’t your thing, check out MooTools Mobile, a MooTools plugin by MooTools core developer Christoph Pojer and Dojo Mobile, which leverages the Dojo API to help developers rapidly build apps for mobile platforms.
jQuery Mobile这个框架能够帮助你快速开发出支持多种移动设备的Mobile应用用户界面。它是当前最流行的移动开发框架。
jQuery Mobile不仅会给主流移动平台带来jQuery核心库,而且会发布一个完整统一的jQuery移动UI框架。虽然jQuery Mobile相对较新,但开发人员可以用jQuery Mobile为许多移动设备(包括智能手机和平板电脑)开发网站应用程序,RSS阅读器等应用。
查看jQuery Mobile实战应用,可以在这里看它的示例。
假如你不熟悉jQuery,可以选择 MooTools Mobile,一个由MooTools核心开发人员Christoph Pojer开发的一个MooTools插件。还有一个是Dojo Mobile,这个利用了Dojo API来帮助开发人员快速构建一个用于移动平台的应用。
This powerful and robust mobile web development framework allows you to use your existing HTML, CSS and JavaScript knowledge to make native-like mobile apps for iOS and Android.
As one of the bigger mobile web development frameworks out there — with over 300 APIs and an active developer community — you know you’ll often find help and support from peer developers.
Titanium Mobile supports native UI elements for iOS and Android like table views, tabs, switches and popovers. It also has features that enable you to interact with the mobile devices’ camera and native file storage system.
这是一个强大的,健壮的移动Web开发框架。能够让使用现有的HTML, CSS和JavaScript知识来为 iOS和Android平台开发原生移动应用。
作为一个越来越大的移动Web框架,它拥有超过300个的APIs和活跃的开发者社区。你从这个社区中得到每一个开发人员的帮助。
Titanium Mobile支持原生的iOS和Android UI元素如Table views, tabs, switches和popovers。它提供能够与移动设备的摄像头和本地文件存储系统相交互的特性。
The-M-Project is another solid JavaScript framework that takes advantage of new HTML5 features for easier and better mobile app development.
The framework follows the popular model-view-controller (MVC) software architecture pattern, which is a huge selling point for many developers.
It has offline support so that your users can continue working without an Internet connection (they can then sync up to the server next time they’re online) and excellent documentation (the project has a Getting Started guide for new users of the project).
To witness The-M-Project in action, check out their showcase, which includes items like the ToDo App and KitchenSink (a showcase of all the UI elements included in the framework).
The-M-Project是另外一个强大的JavaScript框架,它利用HTML5新的特性来更好和更简便地开发移动应用。
这个框架遵循著名的MVC软件架构模式。
它还支持离线,所以你的用户可以在没有连接网络的情况下继续操作(当下次有连线的时候,再将数据同步到服务器中)。提供优秀的文档(这个项目拥有一个引导新用户入门的开发指南).
可以查看The-M-Project提供的示例来对该项目有一个初目的了解。这些示例包括:ToDo App(待办事项目应用) 和 KitchenSink (这个示例包括这个框架提供的所有UI元素)。
Jo is a framework aimed at developers working on HTML5-capable mobile devices such as those the use the iOS, webOS, Android and Chrome OS platforms.
It has standard, native-like UI elements such as the web form widget for your login screens and the popup widget that you can use for providing extra information when a user clicks on an interface element.
See the demo page on their site, which includes a screencast displaying Jo in action on multiple devices and mobile platforms.
Jo这个框架可用于开发那支持HTML5的移动设备,如iOS,webOS, Android和Chrome OS等平台。
它拥有标准,类原生的UI元素比如用于屏幕登录的Web表单控件,还有弹出小部件可用于在用户点击界面时提供一些额外的信息。
可以查看其网站提供的示例页面,它例子展示了在多种移动设备平上的Jo应用情况。
If you need something super lightweight and you only need features for standard client-side development tasks such as DOM manipulation, event-handling, Ajax and a few animation effects, check out xui.js. xui.js packs a punch in such a tiny package (4.2 KB when gzipped).
xui.js provides targeted builds for specific mobile browsers such as WebKit and IE mobile for when you’re developing apps strictly towards a particular mobile device operating system.
有时候你可能需要一个超轻量级的框架,只要拥有用于开发标准客户端所需要的功能如:DOM操作,事件处理,Ajax和一些动画效果。如果是这样的话,这个框架刚好非常适合你。整个框架采用GZIP压缩完之后只有4.2 KB。
EmbedJS is a JavaScript framework for embedded devices (which includes mobile phones, TVs, tablets and so forth).
What’s great about EmbedJS is that it has multiple builds for specific platforms and browsers such as iOS, Firefox, Android, etc., which translates to an optimal user experience and less code to serve to your users. And if you’d like to customize your build, the creators provide you with the EmbedJS Build tool.
EmbedJS is based on Dojo, so if you’re familiar with the Dojo API syntax, you’ll be able to use EmbedJS right away.
EmbedJS是一个用于嵌入式设备的JavaScript框架如:移动电话,TVs、tablets和so forth。
EmbedJS强大之处在于,它拥有专门为特定平台和浏览器如iOS, Firefox, Android等提供相应的开发版本。这样就能够以最少的代码,为用户提供最佳的体验。而且假如你喜欢自己定制,可以利用其提供的EmbedJS Build tool工具实现。
EmbedJS基于Dojo实现,所以你如果熟悉Dojo API语法,那EmbedJS将是你最佳的选择。
zepto.js is a mobile JavaScript framework built specifically for mobile WebKit browsers (e.g. Safari and Chrome). It prides itself in its minimalist development philosophy, which translates to simplicity for helping developers get stuff done quickly. What’s more is that this JS framework is ultra-lightweight at only 5KB.
The zepto.js syntax borrows from, and is compatible with, jQuery — a welcome plus for many developers.
To learn more about this framework, see developer Thomas Fuchs’ presentation of zepto.js.
zepto.js是一个专为mobile WebKit浏览器(如:Safari和Chrome)而开发的一个JavaScript框架。
它标榜自己在其简约的开发理念,能够帮助开发人员简单、快速地完成开发交付任务。更重要的是这个JS框架,是超轻量级的,只有5KB。
zepto.js的语法借鉴并且兼容jQuery。
DHTMLX Touch, a free HTML5/JavaScript framework optimized for touchscreen devices, brings you the ability to craft beautiful mobile web apps quickly.
The DHTMLX Touch UI Designer is a visual editor for building mobile user interfaces, and it’ll help you construct top-notch UIs with minimal coding.
Check out samples of DHTMLX Touch in action, which includes a menu app for the iPad (perfect for restaurants) and Book Shop (a proof-of-concept demo for an e-store offering books).
DHTMLX Touch是一个免费的HTML5/JavaScript框架,专门为触摸屏设备而优化。为您带来快速开发工艺精美的移动Web应用程序的能力。
DHTMLX Touch UI Designer是一个可视化的编辑器用于构建移动用户界面。它能够帮您以最少的编码构建一流的用户界面。
在其主页上提供一些示例可以展示DHTMLX Touch强大的用户界面。包括一个menu app for the iPad (适用于开发餐厅应用)和Book Shop (一个电子书店应用)。
Mobilize.js is a JavaScript framework for porting your existing website to a mobile-friendly version. It’s easy to integrate into your site because it does everything on the client-side, and has facilities for detecting mobile browsers so that you can serve them the mobile version of the site.
WordPress users might want to check out the Mobilize.js WordPress plugin.
Mobilize.js是一个开源的HTML5-JavaScript框架用于从任何现在有标准网站快速,简便地构建移动网站。
这个框架其实就是将需要在移动设备上显示的部分页面以jQuery Mobile的默认主题显示,而不是实现一个全新完整的移动页面。
Mobilize.js 可用于任意网站,但对于基于WordPress和Sphinx的网站不需要使用该框架转换,因为已经有非常多的插件可以使用。
对于WordPress用户可以使用其提供的Mobilize.js WordPress plugin插件。
这个本站之前也有介绍过可以看这里。
ChocolateChip Mobile is a JavaScript framework developed towards future-forward web browsers. It shares syntax similar to jQuery or Prototype.
The resemblance to jQuery doesn’t stop at the syntax — for example, like jQuery, it can handle events through binding and delegation, and has methods such as .css
and .toggleClass
.
You can grab ChocolateChip Mobile’s source code off GitHub.
ChocolateChip Mobile是一个移动Web应用开发JavaScript框架。它的语法类似于jQuery和Prototype。
与jQuery相似并不仅停留在语法上。比如可以像jQuery一样通过绑定和定义事件处理。并拥有像.css和.toggleClass这样的方法。
你可以从source code off GitHub获得ChocolateChip Mobile的源码。