When developing applications that support mobile browsing, you need to consider various issues that are different from non-mobile use.
Mobile devices use very different human interfaces than regular computers. Perhaps the most evident feature is that the user can easily change the orientation of the display to switch between portrait and landscape views. This may change not just the dimensions of the display, but also the most useful layout.
There is often no physical but a virtual keyboard. You need to ensure that, when the virtual keyboard pops up, it does not hide the input field to which the user is trying to enter data. This should be handled by the browser, but you should in any case check that it does. This is largely a testing issue.
There is no "right-finger-button" and double-tap is not normally used in mobile user interfaces unlike the double-click with mouse. Instead, a "long tap" usually has the same meaning as the double click. Finger gestures also play a large role, such as using a vertical swipe gesture for scrolling instead of a scroll bar.
TouchKit helps with many of these special requirements for mobile applications.
Mobile Internet connections are often significantly slower than with fixed lines. With a common 384 kbps connection, just loading the Vaadin client-side engine can take several seconds. This can be helped by compiling a widget set that includes only the used components.
Even with mobile broadband, the latency can be significant factor, especially with highly interactive rich applications. The latency is usually almost unnoticeable in fixed lines, typically less than 100 ms, while mobile Edge connections typically have latency around 500 ms, and sometimes much higher during hiccups. You may need to limit the use of the immediate mode, text change events, and polling.
Phones and tablets have many integrated features that are often available in the browser interface as well. Location-awareness is one of the most recent features. And of course, you can also make phone calls.
The mobile browsing field is currently evolving at fast pace and the special conventions that are introduced by leading manufacturers may, in the next few years, stabilize as new web standards. The browser support in TouchKit concentrates on WebKit, which appears to be emerging as the leading mobile browser core. In addition to Apple's products, also the default browser in Android uses WebKit as the layout engine. Yet there are differences, as the Android's JavaScript engine, which is highly relevant for Vaadin, is the Google Chrome's V8 engine.
TouchKit aims to follow the quickly evolving APIs of these major platforms, with the assumption that other browsers will follow their lead in standardization. Other platforms will be supported if they rise in popularity.
Some mobile devices, especially Android devices, have a dedicated back
button, while iOS devices particularly do not. TouchKit does not provide
any particular support for the button, but as it is a regular browser back
button, you can handle it with URI fragments, as described in Section 12.10, “URI Fragment and History Management with UriFragmentUtility
”. For iOS, the browser back button is hidden if
the user adds the application to the home screen, in which case you need
to implement application-specific logic for the back-navigation.