Core J2ME Technology and MIDP

  • Authors:
  • John W. Muchow

  • Affiliations:
  • -

  • Venue:
  • Core J2ME Technology and MIDP
  • Year:
  • 2001

Quantified Score

Hi-index 0.00

Visualization

Abstract

From the Book:PrefaceIt is estimated that in Japan alone over 20 million Java 2 Micro Edition (J2ME) enabled mobile phones were manufactured in 2001. The opportunity for those interested in writing for the J2ME platform speaks for itself. With its support for a broad range of devices and portability across platforms, acceptance among manufacturers and service providers has been astounding.The focus of this book is on application development using the Mobile Information Device Profile (MIDP) and Connected, Limited Device Configuration (CLDC). Together, these application programming interfaces (API's) form a complete J2ME development toolkit for wireless devices including: mobile phones, pagers and personal organizers.Who Is This Book ForAs a developer at heart, I have often sought a book that covered "all I need to know" to get started with a technology that was of interest. Instead I found myself putting together pieces and parts based on information from various websites, newsgroups, how-to articles, and the like. There was never one definitive guide covering everything: where to find the software, how to install and configure my computer, and learning to write applications from the ground up. Most important of all, there always seemed to be gap between what information I could find and what appeared to be available as part of the specification describing the technology.I hope this book is as close to one-stop shopping as you will find for learning and developing applications for J2ME and the Mobile Information Device Profile. It has what I feel are the essentials to get up and running, everything from downloading and installing thesoftware to writing applications from simple to comprehensive. The entire programming interface is covered in a logical step-by-step manner, leaving no stone unturned. It also includes a quick reference guide for both MIDP and CLDC.Although this book takes a step-by-step approach to teaching application development with MIDP, the assumption is made that the reader will have experience as a software developer. Further, as J2ME is a subset of Java 2 Standard Edition, a background in Java programming is essential to make the most of this book.Focus of this BookWith many years of experience as a developer, and an extensive background in technical training, I've discovered that most people (myself included) learn best by example. With that in mind, this book provides an abundance of source code, with the intention of presenting solutions to real-world programming issues. With over 70 examples, you'll have an excellent base of code to build upon: Creating a "clipboard" to share data among components Using streams to read and write persistent storage Searching and sorting records in persistent storage Low-level event handling Primitive drawing operations (arcs, rectangles, text, etc.) Creating simple animations Scheduling timers Creating a client request and interpreting a server response using HTTP How and when to use HTTP request methods GET and POST Managing sessions with a Java Servlet through cookies and URL-rewriting Using a thread to download network data in the background Download and view files and imagesContentsThis book is divided into three sections:Part I: Introduction to J2ME, CLDC, and MIDPWe begin with an overview of Java 2 Micro Edition. This includes information about the architecture of J2ME and how configurations and profiles make it possible for this micro version of Java to support devices with an exceptionally wide range of capabilities. Also included are step-by-step instructions for installing the required software and configuring your computer to develop J2ME applications (MIDlets).Part II: Programming with MIDPHere you will find the bulk of information about programming with the MID Profile. Presented in a tutorial fashion, we cover each aspect of the application programming interface. For each topic there is a brief introduction, information about the API, followed by one or more examples to bring home the concepts presented. Following is a list of the main topics: Basics of MIDlets and the Display Event Handling High-level User Interface Low-level User Interface Case Study: Building a Display Manager Persistent Storage with the Record Management System Case Study: Todo-List MIDlet Scheduling Timers and Tasks Network Communication with the Generic Connection Framework MIDP for the Palm OSThe case studies tie together concepts presented throughout the book. The first builds a simple, yet very useful class to facilitate managing objects displayed on a mobile device. You'll learn why such a class is needed, how to design and create the class, and will see the c demonstrates how to animate a series of images. The second case-study builds a todo-list application. At nearly 900 lines of code this comprehensive example covers many aspects of MIDlet development from interface and data design to the internal application logic. This application also makes extensive use of the persistent storage mechanism provided in MIDP.Part II: AppendicesThere are three appendices: * Over the Air User Initiated Provisioning Recommended Practice This addendum to the MID Profile covers the recommended procedure for deploying MIDlets * CLDC Quick Reference Connected, Limited Device Configuration API divided into the following sections: java.io, java.lang, java.util, javax.microedition.io * MIDP Quick Reference Mobile Information Device Profile APIMobile Information Device EmulatorsSun Microsystems provides two reference implementations of MIDP. These software packages are available for developers to use as a testing ground, and also provide device manufacturers with a model, or starting point, for creating an implementation of MIDP for a device(s). The implementations available from Sun are: * MIDP and CLDC as standalone packages Applications are compiled and run from the command line * J2ME Wireless Toolkit Applications are compiled and run within a minimal development environmentThe actual look and feel of MIDP components may v functionality they must provide. For instance, the figure below shows the same application running on three different emulators. Although each looks different, the functionality remains consistent.Throughout the book, all application screen-shots were created with one of the two Sun Microsystems reference implementations. If you download and install an implementation of MIDP from a device manufacturer, or a third-party source, examples may look different than shown in the book, however, the functionality should be equivalent. CoreJ2ME.com WebsiteThere is a companion website for this book: www.CoreJ2ME.com. Here you will find the latest source code for the examples in this book, important notes about changes to the MIDP and/or CLDC specification and how this effects the examples (if at all), how-to articles, links to the software, information about J2ME and MIDP training, and a developer resources section that includes links to tools, faqs, discussion areas, newsgroups and mailing lists, as well as other J2ME related websites.