Chapter 8 Conclusion and Future Work
8.2 未來發展
8.2.2 開創未來
本論文所提出的XML-based Mobile Application Development Kit 完全改正過 去相關研究文獻的缺點以及不足,並完全針對行動應用程式提出新的思考方 向。但畢竟是新的思維,整體架構雖然已經完備,但仍可以朝以下目標加以 改進,讓XML-based Mobile Application Development Kit 更加完整。
z 使用 IDE 介面的開發工具來撰寫 PUML / PGML,避免去直接撰寫 XML 文件。
z 根據以後需要,可以新增、刪除 PUML / PGML 中的 elements。
z 利用新增 PGML Standard Library 的方式來提升 PGML 的能力。例如:新 增資料庫相關的 library functions,讓 PGML 可以連結資料庫,對資料庫 做操作。
z 撰寫各種 XSLT style sheet,讓用 PUML / PGML 所撰寫出來的行動應用 程式可以轉換成各種目的端程式碼。例如:XHTML、ASP.NET……等 等。
z 利用 PUML 做前端使用者介面的描述,後端可搭配現存的,能力較強 的邏輯描述語言,例如:Java、C++……等等,不限於使用 PGML。
z 將轉換機制提升到,不只可以轉換成各種適用於小螢幕的行動應用程 式,也可以轉換成各種適用於不同螢幕大小的應用程式。也就是說,將 本篇論文所提出的方法,提升到不僅僅是在於行動應用程式的撰寫與轉 換而已,而能夠滿足所有應用程式的轉換需求,所轉換出來的應用程式 可以跨越任何一種執行平台。
Reference
研究文獻(Research Theses and Reports)
[1] Nikola MitroviĆ and Eduardo Mena, "Adaptive User Interface for Mobile Devices", IIS Department, University of Zaragoza, Maria de Luna 3, 50018 Zaragoza, Spain [2] Johan Plomp, Robbie Schaefer, and Wolfgang Mueller, "Comparing Transcoding
Tools for Use with a Generic User Interface Format", Extreme Markup Languages 2002 Conference
[3] John Grundy and John Hosking, "Developing Adaptable User Interfaces for Component-based Systems", User Interface Conference 2000, AUIC 2000 (IEEE conference)
[4] Allan Meng Krebs, Ivan Marsic and Bogdan Dorohonceanu, "Mobile Adaptive Application for Ubiquitous Collaboration in Heterogeneous Environments", Proceedings of the 22nd ICDCSW'02
[5] Roland A. Merrick, "Device Independent User Interfaces in XML", IBM Corporation [6] Richard Berry, Scott Isensee, John Mullaly, and Dave Roberts, "OVID: an overview",
© 1997-1998, IBM Corporation
[7] Pedro Azevedo, Roland Merrick, and Dave Roberts, "OVID to AUIML – User-Oriented Interface Modeling", IBM UK Ltd
[8] Didier Courtaud, "Basis of UIML", UIML Europe 2001 conference, 8 March 2001 [9] Greg J. Badros, "JavaML: A Markup Language for Java Source Code", Dept. of
Computer Science and Engineering, University of Washington
[10] Angel Puerta and Jacob Eisenstein, "XIML: A Common Representation for Interaction Data", RedWhale Software
[11] Neil Deakin, "XUL Tutorial"
[12] 3GLAB TRIGENIX, "a Universal Graphical User Interface Engine for Mobile Devices"
[13] 3GLAB TRIGENIX, "The Total Handset User Experience, A Technical White Paper", September 2002
[14] Guido Menkhaus and Wolfgang Pree, "A Hybrid Approach to Adaptive User Interface Generation", Software Research Lab, Constance University
[15] Adnana Al-bar, "A Survey to Adaptive Application in Mobile Computing", SoftSys talk COGS, April 4th 2001
[16] Jacob Eisenstein, Jean Vanderdonckt, and Angel Puerta, "Adapting to Mobile Contexts with User-Interface Modeling", RedWhale Software Corporation
[17] Jacob Eisenstein, Jean Vanderdonckt, and Angel Puerta, "Applying Model-Based Techniques to the Development of UIs for Mobile Computers", RedWhale Software Corporation
[18] JEAN VANDERDONCKT, MURIELLE FLORINS, and FRÉDÉRIC OGER,
"Model-Based Design of Mobile User Interfaces", Université catholique de Louvain [19] Mark Tierney, "Adaptive Information Filtering for Mobile Users", Human Computer
Interaction and Language Engineering Laboratory, Swedish Institute of Computer Science
[20] Angel R. Puerta, Eric Cheng, Tunhow Ou, and Justin Min, "MOBILE: User-Centered Interface Building", Stanford University
[21] Andreas Müller, Peter Forbrig, and Clemens Cap, "Model-Based User Interface Design Using Markup Concepts", Department of Computer Science, University of Rostock
[22] Robbie Schaefer and Wolfgang Mueller, "Multimodal Interactive User Interfaces for Mobile Multi-Device Environments", Paderborn University/C-LAB, Fuerstenallee 11 Paderborn, Germany
[23] Mir Farooq Ali, Marc Abrams, and Manuel A. Pérez-Quiñones, "Multi-Platform User Interface Construction with Transformations using UIML"
[24] Kris Luyten and Karin Coninx, "An XML-based runtime user interface description language for mobile computing devices", 2001 Springer-Verlag
[25] Morris Sloman, "Will Pervasive Computing be Manageable?", OPENVIEW 2001:
OPENVIEW USER'S CONFERENCE
[26] Tangis Corporation, "Context Aware Computing", A Tangis white paper on the future of mobile/wireless computing
[27] Anna Maria Jankowska, and Andrzej Dabkowski, "Content Adaptation Tag Library – An Approach for User Interface Adaptation for Different Devices", European University Viadrina, Chair of Business Informatics
[28] Wataru Okada, Fumihiro Kato, Kazuhiro Kitagawa, and Tatsuya Hagino, "Applying CC/PP to User’s Environmental Information for Web Service Customization"
[29] 姚立三, "An Adaptive Mobile Application Development Framework", 國立交通大 學,碩士, 民國 92 年 6 月
參考網站(Reference Web Sites)
[30] IBM OVID, http://www-3.ibm.com/ibm/easy/eou_ext.nsf/Publish/104
[31] UIML 2.0a spec,
http://www.uiml.org/specs/docs/uiml20-17Jan00.pdf, published on
January 17 , 2000[32] UIML.org, http://www.uiml.org/index.php
[33] XForms 1.0 spec,
http://www.w3.org/TR/2002/CR-xforms-20021112/, W3C
candidate recommendation, 11/12/2002[34] eXtensible User Interface Language (XUL), http://www.xulplanet.com/tutorials/xultu/
[35] eXtensible interface Markup Language (XIML), http://www.ximl.org
[36] WAP Forum, OMA, Open Mobile Alliance, http://www.wapforum.org/index.htm [37] JavaML, http://www.cs.washington.edu/homes/gjb/JavaML/
[38] Extreme Markup Languages Conference, http://www.extrememarkup.com/extreme/
[39] W3C, http://www.w3.org/
[40] XSL Transformations (XSLT) Version 1.0,
http://www.w3.org/TR/xslt, W3C
Recommendation 16 November 1999[41] XML Path Language (XPath) Version 1.0,
http://www.w3.org/TR/xpath, W3C
Recommendation 16 November 1999[42] Java Technology at Sun, http://java.sun.com/
[43] Forum Nokia, http://www.forum.nokia.com/main.html [44] 3GLAB TRIGENIX, http://www.trigenix.com/
[45] MexE forum, http://www.MExEforum.org [46] 3GPP, http://www.3gpp.org
[47] ECMA and ISO/IEC C# and Common Language Infrastructure Standards,
http://msdn.microsoft.com/net/ecma/
參考書籍(Reference Books)
[48] Hiroshi Maruyama etc., "XML and Java: Developing Web Applications, Second Edition"
[49] Martin Frost, "Learning WML & WMLScript "
[50] Chris Von See and Nitin Keskar, "XSLT Developer's Guide"
Appendix Transformation Pattern Summary
[WAP Transformation Pattern]
1. 變數的命名法則
在轉換到 WML/WMLScript 時,要注意的是在 WAP 中,所有的變數均放置在 WMLBrowser context 中。而在 PUML/PGML 中可以宣告及使用變數,所以在轉換 之後,必須確保 WMLBrowser context 中的所有變數名稱是獨一無二的,以免造成 轉換後的 WAP 行動應用程式在執行時發生錯誤。
有兩種類型的變數,需要使用轉換後的變數命名法則:(1)PUML 中代表 UI 元件 的變數 (2)PGML 中所使用的全域變數。第一種類型使用法則一,第二種類型使 用法則二。
[法則一]
所在的 UI 容器(board 名稱)__UI 元件名稱(變數名稱)__UI 元件屬性[選擇性的]
[法則二]
所在的邏輯物件名稱__全域變數名稱
2. PUML 轉換到 WML
以下列出重要的轉換規則。z 不會有<template>、<prev/>
z 產生五種類型的 card (1) index card [必須]
(2) preSetting card [必須]
(3) inner card (4) temp card (5) general card z index card
- WAP 行動應用程式第一張要執行的 card。
- 做 card 的導向。導到 inner card 串鍊,或是 preSetting card。
z preSetting card
- 觸發 onenterforward event Æ 設定 UI 元件相關變數。
- 觸發 ontimer event Æ 執行 WAP 行動應用程式真正的第一個 UI。
z inner card
- PUML 中的每個邏輯物件皆對應一張 inner card。
- 觸發 onenterforward event Æ 設定邏輯物件的全域變數(呼叫相對應 的 globalVarDeclaration())。
- 觸發 ontimer event Æ 執行下一張 inner card(形成 inner card 串鍊),或 執行 preSetting card。
z temp card
- PUML 中,<action>的每一個 child element (<use-object>、<change>、
<nextboard>)皆會對應到一張 temp card。
- 觸發 onenterforward event Æ 執行相對應的邏輯運算。
- 觸發 ontimer event Æ 執行下一張 temp card(形成 temp card 串鍊)。
z general card
- PUML 中的每個<board>皆對應到一張一般 WML 中常見的 card。
- PUML 中描述的 UI 元件轉換到 WML 中相對應的 UI 元件。
- PUML 中的<action>轉換成 WML 中的<do>。
3. PGML 轉換到 WMLScript
以下列出重要的轉換規則。z 利用 WMLBrowser.setVar()和 WMLBrowser.getVar(),模擬 PGML 中所指 定的全域變數的存取。
z 產生兩個 interface (即每個產生的 WMLScript 檔都有以下兩個 function) (1) globalVarDeclaration( ) Æ 設定該邏輯物件的全域變數。
(2) change( ) Æ 更改 UI 元件的狀態值。
z 額外產生 PGMLChange.wmls。
z 每個 WMLScript function 對應到一個 PGML 的<method>。PGML 所描述 的邏輯運算,皆對應到適當的 WMLScript 的邏輯運算。
[J2ME Transformation Pattern]
1. PUML 轉換到 J2ME MIDP
以下列出重要的轉換規則。z 會產生一個 interface,兩種 class。
- BMngr_Interface interface
- BMngr class (extends MIDlet, implemnts BMngr_Interface) - UI class (extends Form, implements CommandListener) z BMngr class
- 轉換過程中產生的 class。extends MIDlet,implements BMngr_Interface - 控 制 UI 的 瀏 覽 順 序 ( 透 過 實 作 BMngr_Interface interface 中 的
changeBoard( ) method)。
- 取得某 UI 元件,進行 UI 元件狀態值的修改(透過實作BMngr_Interface interface 中的getBoard( ) method)。
- new出 PUML 文件中所指定的全域邏輯物件(global logic object)。
- new出 PUML 文件中,<board>所對應的 UI class 的 instance。
z UI class
- PUML 文件中的每個<board>都會對應到一個 UI class。extends Forms, implements CommandListener。
- new出<board>中的區域邏輯物件(local logic object)。
- 代表 UI 元件的變數必須是 public。
- PUML 中的<action>轉換成 command 物件。
- 在 constructor 中要做的事有:對所有的 UI 元件做初始化的動作、設 定 Command Listener,以及把 UI 元件和 command 加到 UI 呈現上。
- event-driven 的邏輯運算,透過實作 CommandListener interface 中的 commandAction( ) method 來完成。
2. PGML 轉換到 J2ME MIDP
這部份的轉換規則較簡單。 每份 PGML 文件皆轉換到一個 public class,且 constructor 不需參數。
PGML 所描述的邏輯運算,轉換到適當的 J2ME MIDP 的邏輯運算。
Appendix Example 1 – Simple Demo
[ Source PUML Code – DemoUI.puml]
<?xml version="1.0"?>
<user-interface name="DemoUI" version="1.2" xmlns="http://dcsw3.cis.nctu.edu.tw/Project/Pervasive/PUML/">
<logic-objects>
<object name="userInfo" source="UserInfo.pgml"/>
</logic-objects>
<board name="welcomeBoard" title="Simple Demo">
<picture name="demo" source="demo.jpg" altText="Demo Image" align="center"/>
<label name="hintMsg" showText="input bellow informaions: "/>
<textnote name="userName" type="text" title="name: "/>
<textnote name="userPassword" type="password" title="password: "/>
<action name="enter" showText="Confirm">
<use-object name="userInfo" method="setUserName">
<param select="userName"/>
</use-object>
<use-object name="userInfo" method="setUserPassword">
<param select="userPassword"/>
</use-object>
<change container="infoBoard" component="showName" update="showText">
<use-object name="userInfo" method="getUserName"/>
</change>
<change container="infoBoard" component="showPasswd" update="showText">
<use-object name="userInfo" method="getUserPassword"/>
</change>
<nextboard goto="infoBoard"/>
</action>
</board>
<board name="infoBoard" title="User Information">
<label name="helloMsg" showText="Hello, "/>
<label name="showName" showText=""/>
<label name="passwdMsg" showText="your password is: "/>
<label name="showPasswd" showText=""/>
<label name="infoMsg" showText="navigating following pages to choose your favorite fruit or colors..."/>
<action name="singleFruit" showText="Choose a Fruit">
<change container="fruitBoard" component="showName" update="showText">
<use-object name="userInfo" method="getUserName"/>
</change>
<nextboard goto="fruitBoard"/>
</action>
<action name="multiColors" showText="Choose Colors">
<change container="colorsBoard" component="showName" update="showText">
<use-object name="userInfo" method="getUserName"/>
</change>
<nextboard goto="colorsBoard"/>
</action>
<action name="backWelcome" showText="Go to Start">
<nextboard goto="welcomeBoard"/>
</action>
</board>
<board name="fruitBoard" title="Choosing A Fruit">
<logic-objects>
<object name="fruitInfo" source="FruitInfo.pgml"/>
</logic-objects>
<label name="showName" showText=""/>
<label name="msg1" showText="likes"/>
<label name="fruitMsg" showText=""/>
<listpaper title="select one fruit:" iname="iFruit" mode="single">
<item showText="apple"/>
<item showText="banana"/>
<item showText="watermelon"/>
<item showText="lemon"/>
<item showText="strawberry"/>
<item showText="mango"/>
</listpaper>
<action name="fruitOK" showText="Select OK">
<use-object name="fruitInfo" method="setChoosing">
<param select="iFruit"/>
</use-object>
<change container="fruitBoard" component="fruitMsg" update="showText">
<use-object name="fruitInfo" method="getChoosingInfo"/>
</change>
<nextboard goto="fruitBoard"/>
</action>
<action name="backInfo" showText="Go to Back">
<nextboard goto="infoBoard"/>
</action>
</board>
<board name="colorsBoard" title="Choosing Colors">
<logic-objects>
<object name="colorsInfo" source="ColorsInfo.pgml"/>
</logic-objects>
<label name="showName" showText=""/>
<label name="msg1" showText="likes"/>
<label name="colorsMsg" showText=""/>
<listpaper title="select colors:" iname="iColors" mode="multi" default="1;2">
<item showText="Red"/>
<item showText="Blue"/>
<item showText="Green"/>
<item showText="Yellow"/>
<item showText="White"/>
<item showText="Black"/>
</listpaper>
<action name="colorsOK" showText="Select OK">
<use-object name="colorsInfo" method="setChoosing">
<param select="iColors"/>
</use-object>
<change container="colorsBoard" component="colorsMsg" update="showText">
<use-object name="colorsInfo" method="getChoosingInfo"/>
</change>
<nextboard goto="colorsBoard"/>
</action>
<action name="backInfo" showText="Go to Back">
<nextboard goto="infoBoard"/>
</action>
</board>
</user-interface>
[Source PGML Code – UserInfo.pgml ]
<?xml version="1.0"?>
<object name="UserInfo" version="1.0" xmlns="http://dcsw3.cis.nctu.edu.tw/Project/Pervasive/PGML/">
<declaration>
<variable type="String" name="userName" value=""/>
<variable type="String" name="userPassword" value=""/>
</declaration>
<method name="setUserName" visibility="public" return-type="void">
<in>
<variable type="String" name="user_name"/>
</in>
<action>
<assign arg1="userName" arg2="user_name"/>
</action>
</method>
<method name="setUserPassword" visibility="public" return-type="void">
<in>
<variable type="String" name="passwd"/>
</in>
<action>
<assign arg1="userPassword" arg2="passwd"/>
</action>
</method>
<method name="getUserName" visibility="public" return-type="String">
<action>
<return select="userName"/>
</action>
</method>
<method name="getUserPassword" visibility="public" return-type="String">
<action>
<return select="userPassword"/>
</action>
</method>
</object>
[Source PGML Code – FruitInfo.pgml]
<?xml version="1.0"?>
<object name="FruitInfo" version="1.0" xmlns="http://dcsw3.cis.nctu.edu.tw/Project/Pervasive/PGML/">
<declaration>
<variable type="int" name="choosed" value="-1"/>
</declaration>
<method name="setChoosing" visibility="public" return-type="void">
<in>
<variable type="int" name="index"/>
</in>
<action>
<assign arg1="choosed" arg2="index"/>
</action>
</method>
<method name="getChoosingInfo" visibility="public" return-type="String">
<action>
<if>
<test>
<equal-to>
<operand select="choosed"/>
<operand type="int" value="1"/>
</equal-to>
<action>
<return type="String" value="apple"/>
</action>
<else>
<if>
<test>
<equal-to>
<operand select="choosed"/>
<operand type="int" value="2"/>
</equal-to>
</test>
<action>
<return type="String" value="banana"/>
</action>
<return type="String" value="watermelon"/>
</action>
<return type="String" value="strawberry"/>
</action>
</if>
</method>
</object>
[Source PGML Code – ColorsInfo.pgml ]
<?xml version="1.0"?>
<object name="ColorsInfo" version="1.0" xmlns="http://dcsw3.cis.nctu.edu.tw/Project/Pervasive/PGML/">
<declaration>
<variable type="String" name="choosed" value=""/>
</declaration>
<method name="setChoosing" visibility="public" return-type="void">
<in>
<variable type="String" name="selectionList"/>
</in>
<action>
<assign arg1="choosed">
<operand type="String" value=""/>
</assign>
<for>
<init>
<variable type="int" name="index" value="0"/>
</init>
<test>
<lesser-or-equal>
<operand select="index"/>
<operand select="index"/>