views:

165

answers:

4

Hello!

Recently I started playing around with Java ME.
The standard API seems very limited to me, compared to recent Java SE.

Are there some good opensource APIs which would make Java ME more Java SE like?

+1  A: 

In general, the answer is no. There are variety of reasons for this. Remember that Java SE has come into existence after the desktop paradigm was more or less standardized. Meaning, when you purchase a PC or a laptop, you know beforehand how its going to work. The situation is quite different in mobile phone world.

  1. Today, it's the consumers that purchase mobile phones.
  2. Consumers require differentiation in order to get attracted to a prticular phone. This requirement translates into innovation on part of OEM.
  3. Innovation by definition implies doing something non-standard. Hence, OEM bundles new hardware/display technology/ input methods/middleware software etc.
  4. With non-standard hardware, there is NO way an industry standard could be established.
  5. Operators would want some control over the phone software. Again this is also not standard. For example, the way an operator wants to do business with iPhone would be different from the strategy used for Blackberry.

Let me provide an illustration. Nokia produces phones with T9 keypad as well as QWERTY keypad. Blackberry phones are mostly QWERTY type. If an application( J2ME or not) is designed to work on QWERTY devices, the application can have large text fields - probably rich text composing etc. The same application is run on phones with T9 keypad, the user would find it to be a huge pain to use.

The underlying reasons for not having a J2Se like environment are different. May be MSA (check out JSR 248, 249) could bring it a bit closer.

Kiran Kuppa
+1  A: 

I would say "yes" - to some extent. At TomTom we created a small version of Spring, that allowed us to program to a common paradigm familiar with most folks from the Java world. It's open sourced and available here. Admittedly, that only bridges a small portion of the gap between Java SE and Java ME, but we found it to be pretty helpful.

Something else that we ended up doing is write our own version of the Swing Application Framework (JSR 296). Not that we were actually using Swing on the front-end, but we did have an Action-type of abstraction that we could bind in several ways. Unfortunately, it never got open sourced. (That's a shame, because I think that would also have been pretty useful.)

If you are completely new to the game, I would suggest that you have a look at J2ME Polish. Again, it's not perfect, but at least it allows you to focus on code rather than other painful Java ME specifics.

Wilfred Springer
+3  A: 

For GUI development, java LWUIT is designed to be Swing-like in mind. This project is sponsored by Sun itself.

http://lwuit.blogspot.com/2008/09/exciting-changes-to-lwuit.html

when you are programming JavaME, the thing you need to take care is no longer just functionality. Instead you need to be strict on efficiency and memory footprint. And JavaME api is aim at these 2 areas, so it will stripes out duplicate / similar classes to make itself slim.

janetsmith
+1  A: 

This maybe not directly related to your question of open source libraries for enhancing the functionality of J2ME but you may still be interested in these:

These are 2 posts I wrote while developing some apps with J2ME.

Juri