one of the most powerful aspects of j2me is connected mobility: youre no longer tied to your desk to accomplish many vital tasks. you can carry everything you need in your shirt pocket, send an e-mail while standing in line at the grocery store, or check the latest stock figures while at a baseball game.
there is nothing new about distributed applications; people have been using them for years and their effectiveness and potential are widely accepted. this is where j2me comes into the picture - providing mobile devices with a powerful means of running robust connected applications. the possibilities seem endless.
we assume youre already familiar with j2se or j2ee and the basic architecture of a j2me midlet. if not, you might want to read our article "building your first j2me application" at www.altisimo.com/publications/j2me-hello.
this article shows how to build an internet-enabled mobile application and illustrates the considerations that must be taken into account during design and development. the application we build consists of a j2me client and a j2ee server. by the end of this article, youll know how to: get input from a user programmatically establish an internet connection send data to a remote server read the data returned by the server present the received data to the user the echo application
well first build an "echo" client and server. echo is the standard program we write when learning a new networking technology. the client sends a string to the server, the server sends it back to the client, and the client verifies that the servers response is the original string. this little application allows us to test many of the most important features of a new networking system: collecting and displaying information to a user, establishing a connection to a remote system, and transmitting and receiving data along that connection.well build the application iteratively, improving it with each iteration. in the initial iteration, were primarily interested in having the mobile device establish a connection to a remote server and using that connection to transmit and receive information. as a result, we need both j2ee and j2me components, each of which is tailored for a specific set of tasks. the aspect of the application were ... 下一页