W2000 MEETS J2ME FOR THE FAST PROTOTYPING OF MOBILE WEB APPLICATIONS Luciano Baresi Dipartimento di Elettronica e Informazione Politecnico di Milano piazza L. da Vinci, 32 20133 Milano, Italy email: baresi@elet.polimi.it Luca Mainetti Dipartimento di Ingegneria dell’Innovazione Universit` a degli Studi di Lecce via per Monteroni 73100 Lecce, Italy email: luca.mainetti@unile.it ABSTRACT Mobile devices are motivating a new family of Web appli- cations. Limited sources, like displays, mice, keyboards, and memory, heavily impact the client-side capabilities of the application. This is why mobile Web applications must be re-modeled to take into account the peculiarities of the new devices. This paper does not propose yet another “general pur- pose” modeling framework and does not even discuss the problems with modeling multi-device applications. It as- sumes that mobile Web applications will not mainly be used for browsing data, but navigation will be the means to access services. Given this hypothesis, the paper proposes μW2000 as light-weight version of W2000 for this class of applications and a rule-based approach for fast prototyping the client side of these applications through self-contained J2ME (Java 2 Micro Edition) applications. The approach is exemplified through the Smart Ticket application by Sun. KEY WORDS Web applications, W2000, J2ME, Modeling 1 Introduction Hand-held devices, like cellular phones and PDAs, are mo- tivating a new family of Web applications. Nowadays, only a limited number of people uses their mobile phones to make reservations or buy goods through the Web, but in the (near) future these services will become much more com- mon. If we leave apart sociology, problems come from both the communication infrastructure and availability of appli- cations. Protocols, like GPRS and UMTS, are paving the ground to interesting solutions, but if we move to appli- cations, it is not only a matter of using the right language to render a set of Web pages on a new device. The appli- cation must become a mobile Web application: It must be re-modeled to take into account the peculiarities of the new devices. Small displays usually preclude the capability of visu- alizing composed and over-detailed pages. Mice and key- boards are minimal and do not support complex navigations and the insertion of long text strings. Also storage capabil- ities are limited: Programs must be optimized and down- loaded data (e.g., pages) cannot be huge and contain fancy elements. Bandwidth should not be the problem if we con- sider speed. The new standards, like GPRS and UMTS, are fast enough, but users are charged per Kbytes and not per minutes anymore. The challenge now is not to increase the speed, but to minimize the amount of data exchanged. These constraints lead us to imagine that mobile de- vices will mainly be used to access service-based applica- tions, where the amount of information transmitted over the network is limited and the data that have to be visualized on the screen can suitably feet the small displays. This sce- nario assumes that the communication protocols are mainly GPRS and UMTS and that there is a “real” data exchange between the device and a server (or a set of servers). Other scenarios, like the use of mobile devices in local-area net- works or to support hypertextual guides for museums or similar places, would impose different choices. In the for- mer case, charging is not a problem, while in the latter casa data are usually already on board and there is no real in- formation exchange between the device (the client) and a server. This paper does aim at being general, but limits its scope to the first scenario and does not even discuss the problems that arise when conceiving multi-device Web ap- plications. It proposes a simple rule-based approach for fast prototyping the client side (oftentimes referred to as presentation tier [4]) of these applications. We do not sup- ply a set of special-purpose pages that implies the adop- tion of a particular browser, but we release self-contained J2ME (Java 2 Micro Edition) applications. Almost all last- generation mobile devices are J2ME-enabled, thus the pro- posal is to implement the presentation tier as self-contained J2ME programs that run on the device and interact with the server only when needed. In this way, we have much more control on what is loaded on the device (not a set of pages, but an executable) and on server interactions. While designing/implementing the application we can clearly de- cide what should be client-side and what should relay on a server. The paper starts with W2000 [3] as modeling means and presents μW2000 as a lighter notation for explicitly specifying applications for handheld devices. Designed models can then be used as input to a code generator that