RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Develop a Mobile RSS Feed the Easy Way

Find out how to take your basic web development skills and build a mobile J2ME application.

o, you've decided to try building a mobile application. You're looking for a lot of control over the user experience and you'd also like access to various device features: sound, camera, local storage, and so on—features to which you normally would not have access in a web-based application.

The first issue you face is deciding upon a platform. While there are several major platforms, the biggest by far is J2ME. Because of it's market share, you choose this platform.

Looking at your J2ME options, you'll see that, even if you program in J2ME, mobile phones come in different configurations. This impacts screen size and resolution and buttons and keyboard layouts, among other things. You've probably already realized that it's going to take a lot of code to create something useful, and then you'll have to port your app to all the different platforms out there. Presuming you'd rather spend your time developing than testing and porting, it would be worth your time to check into Breeze, a new J2ME development platform from called Cascada Mobile. With Breeze, you build your mobile app in J2ME, but you develop in HTML and JavaScript. Breeze supports DOM and CSS, which gives you control over look and feel, and also allows you to create internet-connected applications. Best of all, the price is right: Breeze is free. You can even distribute your new mobile application for free at the Breeze Application.

Sounds too good to be true? This article will walk you through the development of a simple mobile RSS feed, built using the Breeze platform. Click here to download the sample code and follow along. See for yourself how easy it is!

Your Mobile RSS Feed: The Foundation
After you've installed the Java developer kit for wireless, get started by downloading Breeze at www.cascadamobile.com. It's pretty straightforward. You can use a standalone simulator, or an Eclipse plug-in. Breeze ships with the source code for a sample application which is a nice tutorial, and everything you need, in terms of documentation, can be found here.

With the Eclipse plug-in installed, create a new Breeze project and the basic app template is set up for you, as shown in Figure 1.

Next, use HTML to create your basic layout. Now, you could do this in any editor, and even just preview it in a desktop browser, but you might as well make sure it looks good on a phone right from the start. So, grab a logo, and put some HTML in to place it on the screen, and then set up a spot for your text to appear. To add some nice CSS to the application, you can also go ahead and set up some DIV and class information.

Figure 1. A Basic App Template: Breeze sets up the basic application template automatically.
Figure 2. Appplication Home Page: After Eclipse rebuilds, you should see something like this.

In this example, your project folder is called res and it will contain your logos and CSS files. The code in Listing 1 shows the app's placeholder text where the data will appear. Use the code in Listing 2 add a little style and color with some CSS.

After Eclipse rebuilds things, your application should look like Figure 2.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date