| 180. |
Java Wireless Programming |
|
|
Version 2.1 |
This four-day course introduces experienced Java programmers to the Java Micro Edition, or Java ME, and develops skills in Java programming for wireless devices via the Mobile Information Device Profile, or MIDP. The course begins with a top-down tour of the ME architecture, focusing on wireless programming via the Connected, Limited Device Configuration, or CLDC, and the MIDP. Students learn the simple Core API of the CLDC -- primarily by contrast to the Java Standard Edition Core API - and then move into the individual packages of the MIDP.
We then study MIDP development in detail, working through several chapters on user interfaces and event handling, to local record storage and network connectivity, and on to threads and timers. The course concludes with chapters on advanced topics including memory management, best practices, and "over the air provisioning," which is a standard deployment model for MIDP applications to wireless devices via HTTP, including a security model using digital signatures.
Prerequisites
- This course is intended for experienced Java programmers: Course 103 would be a good starting point for those without significant Java experience.
Learning Objectives
- Understand the Java Micro Edition architecture, and the stacking of virtual machine, configuration, and profile to address different types of micro devices.
- Understand the mission of the Mobile Information Device Profile, and see how programming for mobile devices is fundamentally different from Java SE programming.
- Build a simple, functioning "MIDlet."
- Understand the framework for packaging and deploying MIDlets to devices.
- Build user interfaces for mobile devices, including text presentation, graphics, keypad and pointer event handling, and multi-screen navigation.
- Save and re-load information from one MIDlet run to the next using the MIDP Record Management System.
- Make HTTP network connections from the mobile device.
- Use multiple threads and MIDP timers effectively.
- Manage memory usage conservatively in MIDP applications.
- Deploy completed MIDlet suites to mobile devices over the air.
Timeline: 4 days.
Chapter 1. The Java ME Architecture
- Micro Devices
- The Need for Java ME
- The Java ME Software Stack
- Virtual Machine
- Configuration
- Profile
- Development Process
- The Java Wireless Toolkit
- VM Speed Emulation
Chapter 2. The Connected, Limited Device Configuration
- Classification of CLDC Target Devices
- Limitations of Java Language Support in CLDC
- The java.lang Package
- CLDC Collections API
- The Streams Model
- The Generic Connection Framework
Chapter 3. The Mobile Information Device Profile
- Relationship of MIDP to CLDC
- MIDlets
- MIDlet Lifecycle
- Application Descriptors
- The Java Application Manager
- MIDlet Suites
- Loading Resources
Chapter 4. The High-Level User-Interface API
- Application Descriptors
- The Displayable Hierarchy
- Forms and Items
- Text Fields, Dates, and Times
- Choice Groups
- Alerts
- Tickerts
Chapter 5. The Low-Level User-Interface API
- The Canvas Class
- The Graphics Object
- Drawing Graphics
- Drawing Text
- Controlling Fonts
Chapter 6. Event Handling
- MIDP Event Architecture
- High-Level Event Handling
- Commands
- Item State Changes
- Low-Level Event Handling
- Keypad Input
- Pointer Input
- MVC in MIDP
- Model Events
Chapter 7. The Record Management System
- Persistence on Mobile Devices
- Scope of Record Management
- Opening a Record Store
- Managing Records
- Using Streams for Record I/O
- Persistence Strategies
- Filtering and Sorting Records
Chapter 8. Networking
- The Generic Connection Framework
- MIDP Connection Types
- Creating an HTTP Connection
- Building Query Strings
- Reading HTTP Responses
- Bandwidth Emulation
- The WTK Network Monitor
- Threading
Chapter 9. Threads and Timers
- The Need for Threads
- Thread and Runnable
- Synchronization Strategies
- Timers
- Timer Tasks
Chapter 10. Memory Management
- Memory Management Techniques
- The WTK Memory Monitor
- Efficient Data Representation
- Controlling Object Creation
- Using Arrays Effectively
- String Manipulation
Chapter 11. Best Practices
- Exception Handling
- Cleaning Up Resources
- UI Design Considerations
- UI Responsiveness
- Portability Considerations
- Making Tasks Cancelable
- Conditional Features
Chapter 12. Over-the-Air Provisioning
- Application Management Software
- Requirements for OTA Provisioning
- Downloading JADs and JARs
- MIDlet Suite Lifecycle
- Security Considerations
- Signing MIDlet Suites
- MIDP PKI
Appendix A. Learning Resources
System Requirements
|
Hardware Requirements (Minimum)
|
1 GHz, 512 meg RAM, 500 meg disk space. |
|
Hardware Requirements (Recommended)
|
1.5 GHz, 1 gig RAM, 1 gig disk space. |
|
Operating System
|
Tested on Windows XP Professional. |
|
Network and Security
|
Limited privileges required -- please see our standard security requirements.
|
|
Software Requirements
|
All free downloadable tools. |
|
|