Dojo Mobile takes an important role in Web 2.0 and Mobile Feature Pack to provide a powerful mobile application development environment. It has a lot of lightweight UI widgets, which smooth over browser differences not only for mobile devices such as iPhone, Android and BlackBerry but also for desktop browsers through the compatibility module. The existing widgets in Dojo Mobile 1.6 are already introduced in various ways, for example, in a good developerWorks article "Get started with Dojo Mobile 1.6" referred to in the previous post. In this post, I'd like to further expand on the new widgets that are part the Web 2.0 and Mobile Feature Pack and which will also be part of the Dojo Mobile 1.7 upcoming release.
SwapView (formerly FlippableView)
SwapView widget, formerly FlippableView widget but has been renamed, provides the capability to switch pages by swiping a view left and right.
PageIndicator widget can be used with SwapView widgets to indicate which page you are on now.
You can create, for example, the following sample slideshow application by using SwapView and PageIndicator widgets.
Carousel widget displays images in a carousel style based on SwapView and PageIndicator widgets. It can use Dojo Data API to load image list data. The following sample has two Carousel widgets, and when you select an image in the upper carousel, the lower one loads image list depending on the selection and displays them dynamically through Dojo Data API.
EdgeToEdgeDataList and RoundRectDataList widgets are subclasses of simple EdgeToEdgeList and RoundRectangleList widgets respectively., They have the ability to use Dojo Data API to populate its data. You can easily switch data store and add/remove items as the following sample shows.
Dojo Mobile 1.7 has a lot of HTML form control widgets such as Button, CheckBox, ToggleButton, RationButton, Slider, ComboBox, TextArea and ExpandingTextArea widgets. All widgets support iPhone, Android and BlackBerry theme, and provide helpful functions such as ExpandingTextArea's auto height sizing, TextBox's text length validation, etc.
SpinWheel widget shows spinning wheels for users to select data. For the most popular usage, there are two sub widgets: one is SpinWheelDataPicker widget to show the date picker and the other is SpinWheeTimePicker widget to show the time picker in a spinning wheel style.
You can also customize each wheel in SpinWheel by leveraging SpinWheelSlot widget.
You can show tooltip on any controls with this Tooltip widget. It can display not only simple text but also richer content such as a SpinWheel widget as shown below.
Overlay widget shows/hides a dialog at the bottom of screen with slide-in/out animation. It can contains any controls such as a calendar, SpinWheel widget, etc.
Opener widget shows a dialog in an appropriate way depending on the screen size.
In phone size, it shows a dialog with Overlay widget as shown below.
And in tablet size or desktop screen size, it shows a dialog with Tooltip widget as shown below.
I have just discussed new widgets, but there are a lot of other new features in Web 2.0 and Mobile Feature Pack and Dojo Mobile 1.7 such as new BlackBerry theme, new transition effects (cover, reveal, zoom in/out, swirl, etc), many widget enhancements, and so on. All these new widgets and other new features are available on Web 2.0 and Mobile Feature Pack as well as Dojo Mobile 1.7 which will be released soon, so please give it a try and enjoy it!