In the previous post of this series, we talked about out motivations for using J2ME Polish and some issues about licensing. Now we are going to look at all the features included in the J2ME Polish bundle, as it is actually a whole collection of different tools for MIDP developers.
The tools range from standard build tools for compiling, preverifying and packaging the applications to a sophisticated optional GUI which can be designed with simple CSS textfiles. These are the tools included:
BuildTools/ J2ME Polish Task
The core components of the framework are those allowing preprocessing, resource assembling, localization, compilation, preverification, obfucation and packaging of J2ME applications. All this building process is based on Ant, by including its own customizable task. This is the de-facto standard for Java and supported by the most common IDEs. The core idea is that you can optimize your application for multiple devices and languages/locales by using a unique build.xml file. J2ME Polish can also invoke any emulators for you.
An XML-based device database provides a convenient and portable way for adjusting your application to different devices. Thanks to the powerful preprocessing capabilities you can use this database directly in your application or your build.xml file. All the devices are arranged by vendor, family. This way you can target at a same time all devices from certain vendor or certain line-up, such as Nokia or NSeries.
Automatic Resource Assembling
All resources like images and sound files are assembled automatically for you depending on the specific target for the build. You can use specific resources for vendors like Nokia or for devices which support a specific format easily. You can even include resources only when some conditions are met. For example, for including MIDIsoundfiles only when the target device does not support MP3 but supports the MIDI format.
This can be used to enable or disable logging levels for classes or complete packages just by modifying some settings in the central build.xml. Log messages can be shown on real devices as well, by simply using System.out.println(). Of course you can disable all logging completely, so that no traces are left in the application.
It’s easy to create localized applications – just provide the translations and other locale specific resources and J2ME Polish will embed them into the application. In contrast to all other solutions, localized applications do not have an overhead compared with nonlocalized applications, since the translations are actually integrated on the sourcecode level.
J2ME Polish allows using the standard MIDP/1.0 as well as MIDP/2.0 widgets in your program and design them with simple CSS directives like those used in web development. Designers can now design the application independently of programmers. As J2ME Polish includes implementation for those standard widgets you can even use MIDP/2.0 widgets on MIDP/1.0 phones.
Moreover, for allowing J2ME Polish GUI capabilities in your legacy MIDP applications you do not need to change a line of source code. Just include the proper configurations setting in the build.xml file and you will get all the power of CSS design.
The GUI framework includes a game engine implementation, that allows to use the same API for MIDP/2.0 and MIDP/1.0.
J2ME Polish includes some often used components that are available in Java but not in the MIDP specification. This includes support for generics, ArrayList, MathUtil, HashMap, image managing, classes for managing bitmap fonts,…
Some standalone tools are bundled into the pack. The binary data editor can be used for editing any structured binary data file. Another pretty useful tool is the bitmap font editor, which can be used for creating bitmap fonts out of any True Type fonts.
Thanks to its Ant-based build, J2ME Polish includes plugings for both NetBeans and Eclipse, the most popular IDEs in Java world.
Well… you see J2ME Polish really bundles a lot of stuff, and of course, you can extend the framework and use your own widgets, add your own preprocessor, or integrate your own obfuscator in a relative simple way.
Link J2ME Polish