Getting started with JME - Part II / III
Hi all !!
LetÂ´s talk today about witch IDE use to JME development and after, about MIDlet (and MIDlet life-cycle) and User Interface.
Until few days ago I used to develop my applications with Eclipse, mainly by your excellent code editor and great re-factor stuff thats made faster the code re usability. But, at last Sun Tech Days I was very surprised with the examples using NetBeans 5.5 and since that IÂ´m using NetBeans in some personal projects.
What I can say is, if you are getting start with JME development, maybe NetBeans could be the better choice because itÂ´s allow you to create an entire application without enter a single code line, and also allow you to go directly to the source and make the code like you want!! :-)
But, to start using NetBeans 5.5 to mobile development youÂ´ll need to install also the "Mobility Pack". The responsible to give to NetBeans the "power" of Mobile Development! ;-) Both can be found at:
Well, after this all "bla bla bla" letÂ´s go to the "entrance door" of you JME applcation. :-)
ItÂ´s through the MIDlet that your JME application is started and over it your application will make important actions and because it will have at least one class that extends from MIDlet. For example, is from the MIDlet that youÂ´ll be able to get the Display instance for your application.
The life-cycle of a MIDlet is something like the picture:
Taking a look to the picture, we can feel that weÂ´ll hat to develop at minimum 3 methods: startApp, pauseApp and destroyApp. By the own name of the methods, you can suppose the methodÂ´s purpose: start, pause and the end of the application, respectably.
An important observation to do is about the startApp method. How we can observe at the picture, this method is called ever when the application goes from paused to active status, and because this you should not create new objects or program this method like itÂ´s called just once per execution. You should program it like a "re-start" method, let the objects creations and attribution to the MIDlet constructor.
Now, you already know from where start you JME development, so itÂ´s time to make the user interface and handle the commands that the user will use. On this point the better thing to do is visit the article: MIDP GUI Programming: Programming the Phone Interface thats describes very well the UI development to mobile phones. ;-)
Scenes from next chapter !! :D
On the next post IÂ´ll talk a little about the GCF (Generic Connection Framework) thats allow you to connect your mobile application to the Internet or send a SMS message. Also, IÂ´ll write something about how to distribute and deploy your JME application. ItÂ´s just wait!!! ;-)