I was reading a forum discussion recently that argued that J2ME was a mess. The general consensus (admittedly there weren't that many messages) seemed to be that this conclusion was correct. My automatic response was "What a complete load of bollocks" (which I think means I've been living in England far too long). However, upon reflection, I still don't entirely agree, but I don't disagree either. I am officially in-betwixt camps. Neutral. Unbiased (yeah, right).
If you mistakenly view J2ME as the sum of all Java technologies for embedded and mobile devices, then yes, it can be confusing. You have a couple of flavors of Waba, which have nothing to do with Sun and aren't part of J2ME at all. There's also iAppli, NTT DoCoMo's "somewhat-similar-to-MIDP-but-not-quite" Java API for their i-mode mobile phones. You have PersonalJava, which is, kind of, part of the J2ME family, but was around first so it doesn't really fit. And you have JavaPhone, Java TV, and EmbeddedJava. Then we launch into buzzword territory: MIDP, CLDC, CDC, KVM, CVM...I could probably keep going. It's hardly surprising that, looking at this bewildering array of products and APIs, people turn somewhat chalky gray and decide there's no sense of direction there.
For a moment, imagine the world is a better place. No one has taken potshots at each other since World War II, John Lennon was never assassinated, the Beatles never broke up and now head a global chain of McBeatles vegetarian fast food and music stores. I won the lottery last year and am consequently living a life of indolent luxury somewhere on my own private Pacific island (with a luxury yacht, don't forget the yacht).
And no one worries about legacy systems.
"What, our financial application was written a hundred years ago in Cobol? Don't worry about it. Scrap the whole thing and rewrite it in Java!"
In this perfect world (my perfect, not necessarily yours), J2ME becomes the fundamental structure of the entire Java platform. Configurations define the base (non-GUI) level of an API, and each configuration builds upon the ones below it. Profiles provide the user interface API with a product and, if they don't build up from one another in a hierarchical relationship like configurations, at the very least they share large chunks of their API set. CDC inherits from CLDC. The Personal Profile (goodbye PersonalJava) builds on top of CDC and MIDP builds on top of CLDC.
Developers can take advantage of this structure when writing applications. An application is partitioned, separating the user interface from the rest of the code. A certain amount of rewriting or additional coding will always be required when, for example, moving an application from a mobile phone up to a PDA, simply because of the variation in device and functionality provided; however, the amount of rework will hopefully be limited by the basic design.
The funny thing is, carried to the logical (and yes, a bit oversimplified) conclusion, this structure could propagate up into J2SE and J2EE with each inheriting a configuration and then defining a profile for the "extra bits." Which means J2ME becomes the central core of Java -






