Header Sep
Latest News
Score
Login to rate page

December 22, 2004
Porting from BREW to J2ME

[Back]

 

Sony Ericsson receives a lot of questions from especially game developers in the US about the differences and similarities between BREW development and Java development for mobile phones. There seems to be a big interest in making as much money as possible out of existing and planned mobile applications. To address this interest and need for porting guidance, Sony Ericsson Developer World has created a Special Interest Paper - "From BREW to J2ME: An Application Porting Guide" - intended to give hands-on porting tips.

With the rapid growth of the mobile handset software market, many developers have been content on focusing on a single mobile platform, such as QUALCOMM BREW (Binary Runtime Environment for Wireless) on CDMA phones or J2ME (Java 2 Micro Edition). Increasingly, however, it's becoming more lucrative to bring your application to multiple platforms. This special interest paper describes a process for bringing your QUALCOMM BREW application to J2ME MIDP (Mobile Information Device Profile) 2.0-capable handsets such as the Sony Ericsson K500 or K700 series, giving you a handle on what it takes to bring your application to new markets.

Mobile devices and Java are no strangers; since the advent of PersonalJava, Sun in partnership with various hardware vendors has worked hard to bring Java to mobile devices. To date, over two hundred and fifty million devices have shipped running Java MIDP 1.0. Java MIDP 2.0 builds on the success of the original Java MIDP 1.0, addressing many shortcomings and including a number of new features, such as secure networking via Transport Layer Security (TLS), support for audio multimedia via a subset of the Mobile Media API (MMAPI), enhancements to graphics for games via the javax.microedition.lcdui.game APIs, and support for code signing and trusted code adhering to the principle of least privilege.

The QUALCOMM BREW platform is a component-based environment in which application developers write applications using C or C++. As you would imagine, J2ME applications are written in Java, using a different set of class libraries than those available to desktop (Java 2 Standard Edition) or enterprise (Java 2 Enterprise Edition) developers. While not a pure object-oriented environment like Ruby, Java is significantly closer than what BREW is. Java provides a class-based environment similar to C++.

In planning a port from Java to BREW, there are two fundamental differences you need to overcome: the language and the APIs. In fact, the fundamental language differences aren't as great as you might suppose; the challenge is often in determining the relationship between the BREW classes your application currently uses and the Java MIDP classes you will use to implement your application.

With few exceptions, the interfaces used in Java classes and the BREW interfaces you're already using are similar enough that you can port your key algorithms and use Java objects instead of BREW interfaces with little work, especially if you design your BREW application for portability from the beginning. Even if you haven't considered portability at the outset, and you begin to consider portability as you maintain your BREW application, when you finally make the move to Java, you'll find the work much easier. There are, however, a few key things that don't have common elements between BREW and Java. Understanding these points is key when evaluating the feasibility of a port to Java. Read this special interest paper to learn more!

You will learn how to write portable BREW code in C or C++, see code samples of different issues, and how to manage memory, file system use, application resources, and how to encapsulate your application data. This paper describes what you need to know about tools, completing the port and performing testing and debugging. You will also get a better understanding of the requirements of certification and finally go-to-market options in the J2ME market.

Download special interest paper>> 

 

Score
Login to rate page