Tuesday, July 17, 2007

Why I use NetBeans Mobility Pack to write Cotopia

In my previous post I've mentioned that I 'forgive' Tomas for using Eclipse. So let me take this blog entry to justify my attitude and explain why NetBeans is without a doubt the superior tool for Mobile Java development :)

Reason #1: Built in preprocessor
When you develop mobile apps you often need to cater to different devices (phones) because one can be oh-so different from the next. In code you often want to say something like:

if screenSize is 128x128
then do this and show this image...
else
do this and show some other image...

NetBeans Mobility Pack includes a build in preprocessor that lets you specify which code you want to include for which target device and you don't even have to mess around with preprocessor directives too much - tons of the functionality is integrated with the Java code editor.

Reason #2: Emulator integration
As I write code I can just click and see how my game runs in an emulator or even run the emulator in debug mode to find bugs. With SonyEricsson phones I can even use on-device-debugging so that my code is running on an actual phone as I step through breakpoints.

Reason #3: Build system and deployment
If you have ever written a serious Mobile Java app you'll know that without proper tool you are stuck writing nearly as much Ant xml as you are writing Java. This is a serious waste of time if someone else can do it for you. With NetBeans Mobility Pack pretty much all the hard work is done for you. With a click of the mouse I can either build my application and execute it in in an emulator or build binaries for all target devices and upload them to our deployment server.

Reason #4: Fast prototyping
NetBeans Mobility comes with a tool called Visual Designer which allows me to throw together an application very rapidly from designing screen-flow to individual screen design. I can literally create a working app prototype in a few minutes while keeping manual code to minimum.

Reason #5: It's alive
Looking at the preview releases of NetBeans 6.0 I know that there is tons of development going on and Mobility Pack is going to stay on top. I am talking about SVG support, Game Builder, better Visual Designer, Web Services integration and tons and tons of cool features that will make my life easier.

In all fairness there are a few competing projects out there but none comes even close in terms of functionality. There is the Eclipse MTJ and some Mobile Java support in IntelliJ but neither offers as much as 10% of the functionality.

2 comments:

Anonymous said...

NetBeans is very good for mobile development and I have choosed it too.. so I have adapted my own JCP preprocessor to work with NB and it really increases the power of development for mobile devices by NB.

Anonymous said...

I have a recommendation its in J2me which is more difficult than just normal java to do.it is a cool add on for it. It’s called i-Citizen and it came out recently. It’s the world’s first 3D world and the k800 works like a charm on it. Its fun to play and you can meet people and chat to them as you might have guessed. They have promotions where they give away PS3’s and Xboxes to people in a place called i-Bid in the app. Its beta release was announced in March 2008 and anyone can give it a try. You can get it from your mobiles browser or your pc by going to http://wap.icitizencommunity.com or http://www.micazook.com.