190 likes | 207 Views
PDA Programming Using J2ME. Presenter :涂俊凱 Date : 2003/4/8. Out line. Introduction J2ME CLDC/MIDP API Preparation of programming Examples HTTP Connection, RMS DB, SOAP, XML Instruction of application development Step by step. Java platform for small devices
E N D
PDA Programming Using J2ME Presenter:涂俊凱 Date:2003/4/8
Out line • Introduction J2ME • CLDC/MIDP API • Preparation of programming • Examples • HTTP Connection, RMS DB, SOAP, XML • Instruction of application development • Step by step
Java platform for small devices A subset of Java 2 Standard Edition For programming the Plam For programming the mobile device (e.g mobile phones or WinCE…) What is J2ME CDC (Connected Device Configuration) CLDC (Connected Limited Device Configuration)
MIDP Profile 应用 OEM 应用 MID Profile OEM APIs CLDC (KVM) 操作系统 What is J2ME (cont’) Profiles Layer Configuration Layer
Configurations Layer • A configuration defines the minimum set of libraries and VM capabilities • Devices have similar processing and power and memory constraints • EX: CDC (Connected Device Configuration) CLDC (Connected Limited Device Configuration)
Profiles Layer • A profiles layer is a set of Java Based API that extend the J2ME definition • UI and presentation capabilities are generally defined at this layer • EX: CLDC => MIDP (Mobile Information Device Profile) CDC => Personal Profile CDC => Foundation Profile
CLDC (Connected Limited Device Configuration) • Addresses • Java language and virtual machine features • Core Java Libraries • Input/Output • Networking • Security • Not Addresses (but in MIDP) • User Interface functionality • Event handling • High-Level application model • Application life-cycle management …
CLDC API • io • InputStream, OutputStream, Reader, Writer • lang - No floating point support • util • Calendar, Date, Hashtable, Random, Stack, TimeZone, Vector, Enumeration • javax.microedition.io • Connection, Datagram, InputConnection, OutputConnection, Connector
javax.microedition.midlet (application management) javax.microedition.lcdui High-level development Form, TextBox, List, Alert Low-level development Canvas: Game applications will likely make heavy use of the javax.microedition.rms RecordStore A record store consists of a collection of records which will remain persistent across multiple invocations of the MIDlet MIDP API
MIDP API Tree View Displayable Alert Text Box List Form Canvas String Item Date Field Text Field Command Image Ticker Choice Group
Third-party API • XML Parser: KXML1.2, KXML2.0, Xparse-J 1.1 ... • Web Services: KSOAP 1.2 • Floating support: MathFP 2.06 … API must based on CLDC/CDC or MIDP
Programming the Palm – Part 1 ChoiceDevelopment Environment • J2ME CLDC API • Contains a subset of the standard J2SE classes • J2ME KJAVA API(J2ME1.0.3) • GUI components • Access the Palm database (PDB) • Access to IR port • Kawt API(J2ME1.0.3) • Rich GUI components • J2ME MIDP API • Works on the top of CLDC • Some GUI components
Programming the Palm – Part 2 ChoiceKVM or Java Virtual Machine • Different KVM has different support • KVM (Support J2ME) • IBM J9 (Support J2ME and specific device’s API support) …
Programming the Palm – Part 3 ChoiceDevelopment Toolkit • J2ME Wireless Toolkit • Support Palm… • IBM WebSphere (Device Developer) • Support Palm, WinCE and other devices • JBuilder 7,8 + MobileSet • Based on J2ME Wireless Toolkit …
Links • http://cs.mis.nsysu.edu.tw/J2ME/ • http://www.javaworld.com/channel_content/jw-j2me-index.shtml