Why PHP with J2ME? You my have noticed in last year or two there has been an increasing boom in technology in the area of mobile handsets and mobile software development. Wireless technology is not only becoming more commonplace, but also more affordable. To support this even further, a survey released by IDC projected revenues in wireless gaming alone will generate approximately 72.2 million by 2007. Along side with mobile gaming there will be an ever-increasing demand for mobile applications.
This is all fine and dandy, but what does it have to do with PHP? Not only will there be thousands of new wireless applications, but many existing applications of today will also be enhanced/modified to work with mobile handsets. In most cases it would make sense to keep the current technology and architecture and simply have it interface with the new mobile technology.
This possibly means that sites already written in PHP now need to interact with mobile technology. One of the more popular emerging technologies is J2ME. J2ME is provided by Sun Microsystems and stands for Java 2 Platform Micro Edition. To learn more about J2ME and Java general, visit http://java.sun.com.
J2ME produces small Java applications or games called midlets. A very simple comparison would go like this: midlets are to WML what Java applets are to HTML. Though midlets do not run directly inside WML, you would access/download a midlet through a WML capable browser. You also have the option to directly upload the midlet to your mobile handset via a PC and cable connector.
There are a few options available when considering how to communicate from PHP to J2ME:
HTTP Simple Fetch
Requirements This article uses both J2ME and PHP. You will need the J2ME development kit from http://wireless.java.sun.com. You will also need a basic Apache and PHP web server setup. Apache can be obtained from http://www.apache.org. Please consult theses sites for installation instructions. Once you’ve successfully installed the software, continue with the article.