J2ME (Java 2 Micro Edition) and the .Net Compact Framework follow different design philosophies and target different developer communities. However, both have important places in the future world of pervasive computing.Developers must choose and mix the right tools for real-world challenges. In this article, Michael Juntao Yuan uses a mobile driving-directions example to discuss how the Java and .Net platforms work together from end to end with the help of XML Web services. Through the code examples, he also illustrates each platform’s key benefits and problems.
Part 1, Part 2, and also another article about how to write Games on .NET Compact – for PocketPCs and Smartphones.
http://www.xwt.org
This project is really moving and you’ll see it become available for mobile phones before long, and you’ll also see some nifty little games cropping up on it.
Squeak isn’t to the point where most businesses (largely for support or political reasons) would use it, but it is definately a useful tool for PDA development. Java and .NET both need so much shrinking and class-cropping because they both have gigantic footprints in their original forms. Thanks to Smalltalk’s relative economy, relatively little has to be dumped from the switch from a desktop-class machine to a PDA. Heck, you can run the full Squeak image on a PDA with 16 MB of RAM. It has tons of stuff that you don’t need, but it’s possible.
One can trim a Squeak system, including VM, all the way down to a piddly 2 MB. Yet, it includes GUI capabilities and networking, as well as lot of the core Smalltalk classes for logic, etc.
<shameless plug>
Especially cool is Dynapad, a PDA operating environment which I’m writing in Squeak. It provides all the services of a PDA OS, and then some. Networking, naturally. The Morphic GUI system allows the user to interact with the PDA in ways you couldn’t do (without writing a new GUI toolkit!) on PalmOS or PocketPC. An object database for all user data (and soon, for applications) makes the need for special sync applications and conduits obsolete.
And of course, there is still a complete Smalltalk development environment behind it all, providing user customization and scripting for any application both in textual Smalltalk as well as graphical means of developing this logic. A user can use these scripts to manipulate and create data efficiently. Want to email your sister a list of all the names and birthdays in your addressbook in the “Family” category? You can built the request graphically, or simply by running the following “script” within a new message address to her:
(People at: #Family) collect: [ :p | p name, tab, p birthDate, cr. ]
This core, along with a bunch of applications- web browser, email client, irc client, calculator, function plotter, calendar, todo app, addressbook, a notes app (which already beats anything you can get on the Zaurus!) and more. It does this all and more in under 8 MB. It does this on a number of platforms, both PDA and on the desktop with complete binary compatability. Not the write-once-debug-everywhere “binary compatability” known in Java.
http://spe.sf.net
There is a huge release coming up- the latest version on the page is old but a decent proof of concept.
</shameless plug>
Is this a fair match?
Also- to me it seels that a better match would be .NET Compact Framework vs PersonalJava. Both are intended for use on PDAs, whereas J2ME is meant for more limited devices like current cell phones, which have relatively (even to most PocketPC) small amounts of computing resources. However, it seems that PersonalJava has been end-of-lifed- will Sun bring anything out to replace it? It seems to me that J2ME lacks the kind of features and classes a Java developer would want when doing PDA development, while full-on Java is also out of the question. PersonalJava 1.2 seemed like a good in between, but evidentally Sun doesn’t think so.
PersonalJava is, indeed, end-of-lifed (I prefer “dead”) and never really made it out in the wild. However, Sun did bring out something to replace it, J2ME’s MIDP standards.
The first round of J2ME MIDP was unimpressive, the implementation too limited, devices unavailable until just recently; they still have a slew of bugs however, the limitations prevent any kind of full-scale adoption (not just for games, but any kind of downloadable application over WAP). MIDP 1.0 and 1.1 (currently used) will leave place to MIDP 2.0 later this year, which addresses many limitations, speed issues, and new devices will be under way soon enough.
Thanks for posting this article. Finally I found a possibility to develop for J2ME with MacOSX. http://www.datarepresentations.com offers Simplicity for Mobile Devices, which is written in JAVA, there is even a special dmg archive for Mac available. I downloaded the demo version and will test it as soon as possible.
Does anyone know if there are any other possibilities for development of J2ME applications with MacOSX? I´m dissapointed a bit, that Eclipse doesn´t offer anything in this direction.
Greetings from Anton
Title say’s it all. Next!
The MIDP 2.0 can do quite a bit more than just tetris (MIDP 1.0 sucks thou. ) and JSR 186 [ http://jcp.org/en/jsr/detail?id=184 ] looks very intresting. ( optional 3D API )
re: MacOS
ASAIK the actually tools are written in Java, so could you just use (insert you fav. IDE here), and set you classpath to MIDPAPI.zip for than application? Then use ANT with the StampySoft build rules [ http://www.stampysoft.com/ant/index.html ] to build?
re: The first round of J2ME MIDP was unimpressive, the implementation too limited
They are not completly useless, but the sooner MIDP2 is rolled out the better
I hope most phones will support a firmware update…
…a form of torture given to bad junior programmers when they annoy their line managers too much 😉
No offence, but Smalltalk is horrible to learn if you come from a programming background on any Micro from the ’80s. C/C++/Java/C#, Pascal, and VB are all easy to pick up because they are all based on a similar design pattern to the ROM Basic found on C64, Atari, Apple etc. Smalltalk is just out there. It’s not that it’s a bad or incapable language, it’s just that it’s not a particularly accessable one. Believe me, I did a semester of Smalltalk, and I hated it. I also did other ‘out there languages’ and found them much easier (Prolog and 8086 16-bit Assmebler come to mind)
Just MHO, and my €0.02
everywhere is full of wonderful j2me midlets. great games and applications around. all the phone producers are supporting it. nokia, siemens, motorola, sony/ericson, etc. have all special ides for developing midp games and applications on their phones. to have a look 300+ available java games and programs, please check out the following link.
http://www.midlet.org
.net mobile framework on the other hand, is sharing the same fate with other .net family products. that is, it is being neglected by both developers and phone companies. –: )))) this is mostly because of ms’s unethical, vicious tactics (like they did to sendo).
.net mobile framework on the other hand, is sharing the same fate with other .net family products. that is, it is being neglected by both developers and phone companies.
That sounds like an opinion based more like wishful thinking than on facts. Sure, there are probably more J2ME apps out there than ones written for the .NET compact framework… but there are also more COBOL programs out there than ones written in Java. The number of people using a technology is not indicative of its quality. J2ME has just been around a little longer, and Java itself longer still than .NET CF.
I’m no MS fanboy, but VS.NET 2003’s support for the .NET compact framework is really drool-worthy. You just program your application just like you would any Win32 app, and test it out on the various phone/PDA emulators that come with VS.NET 2003. I think the ease with which you can write your applications in .NET is going to attract a significant developer base over the next couple of years. That’s not to say that J2ME won’t also grow, but just that it’s pretty silly to discount a player with such an attractive product in an emerging market.
I see Java keeping the developers it has, but it doesn’t seem to be attracting new ones – it will still grow as more projects are built off of existing Java ones, but I see developers flocking to the .NET offering. And not because of PHBs and buzzwords, but because as a developer, .NET has become what I’ve been wishing Java was for the past 8 years.
First I must say I a m little biased, I admit it. I am a big fan of java and I do some MIDP prog. Besides that, nowadays with a service plan here in switzerland and probably in most of europe you can get a free java phone (nokia 7210 and equivalent, that is 128×128 @4096 colors). So called smartphones however are not available at a cheap price anywhere.
Of course MIDP 1.0 is a bit lacking in many areas. Very often you have to use proprietary API calls on each device which really makes the whole development slower (something like x2 as compared to being able to run the same version on all phones). I expect however that with MIDP 2.0 most of this will be solved.
I have to disagree. The first language I learned was Pascal, then I studied C, C++, Java, and finally Smalltalk. I have found Smalltalk easier to learn and more productive than every other language I ever used.
It still amazes me how much you can do in Smalltalk with so few lines of code and so few syntactic constructs.
C/C++/Java/C#, Pascal, and VB are all easy to pick up because they are all based on a similar design pattern to the ROM Basic found on C64, Atari, Apple etc.
WTF ? How is C similar to C64 Basic – other than using some structures every programming language uses (like if…then and the like) ?
With the exception of pascal and vb all the languages you mention are generally considered hard to learn. I’ve seen plenty of people drop out of programming classes because they just didn’t “get” pointers.
If you want to see a real “easy-to-learn” language, check out Python. It took me about 2 minutes to get the hang of 🙂
“That sounds like an opinion based more like wishful thinking than on facts.”
it is based on 100 percent facts. 80 percent of mobile industry is java based now, and its increasing. can you show me ONE popular .net phone? no. all the big phone producers are backing java. all of them. there are millions of java phones in europe and japan already. it is simply impossible for ms to win mobile phone war.
“The number of people using a technology is not indicative of its quality. J2ME has just been around a little longer, and Java itself longer still than .NET CF.”
so do you mean .net has more quality than java in the mobile field? don’t be funny please.
“I’m no MS fanboy, but VS.NET 2003’s support for the .NET compact framework is really drool-worthy. You just program your application just like you would any Win32 app, and test it out on the various phone/PDA emulators that come with VS.NET 2003. I think the ease with which you can write your applications in .NET is going to attract a significant developer base over the next couple of years. That’s not to say that J2ME won’t also grow, but just that it’s pretty silly to discount a player with such an attractive product in an emerging market.”
complete bullshit. there are more important factors, such as hw support. can you show me ONE .NET phone? besides, developing MIDP programs is piece of cake. there are many IDEs (free / commercial) targetted on developing MIDP application. moreover, all the phone producers have special ides for developing MIDP applications.
“I see Java keeping the developers it has, but it doesn’t seem to be attracting new ones – it will still grow as more projects are built off of existing Java ones, but I see developers flocking to the .NET offering.”
i see completely vice versa dear. as a project manager in a big company, i am into many projects in europe and asia, and i am seeing that java is booming. java developers are not leaving java, thats true, but ms developers are branching into two ways. half go to .net way, half go to java way. in the end, java community is getting larger and larger every day. this shows in the increase in the java projects especially in the last two years.
“And not because of PHBs and buzzwords, but because as a developer, .NET has become what I’ve been wishing Java was for the past 8 years.”
its your personal view. i favor java over .net for many reasons starting with being only vm based cross platform compatible development environment.
i think they are both great languages. i am especially very much impressed with python’s ease of use and speed. if it goes like this python can really become lingua franca. the next five years will show. but, i really don’t think that .net is the holy grail as ms marketing and greedy part of linux crowd (that is miguel and his trillion and hundred programmers) are trying to show.
I was just reading an article about J2ME yesterday, ironically. I
find it a nice choice for portable development, due primarily to the
fact I can, actually, run it everywhere. 8)
I’m very interested to see how this war goes.
Personally I agree with CroanoN, Java has a greater coverage than .NET at the moment, and barring some kind of miracle will continue to have a greater coverage in the future. .NET will only be available on MS based phones (unless there is some kind of Mono CF in the works, which I dought) whereas Java will be available everywhere, be the phone based on an MS, Symbian, Danger, Palm, propritory OS, or no OS at all.
Plus the small problem of the current version having problems “industry sources said the phone software still has “fundamental problems” leading to high failure rates” http://msn-cnet.com.com/2100-1039_3-1001769.html
This kind of embeded devices was what Java was designed for originally afterall.
Smalltalk harder to use than 8086 assembly? Perhaps you’re thinking of another language… I’ll be the first to admit that Smalltalk isn’t for everyone, especially those who have a prejudice against languages that don’t look like C. Not an unnatural thing, that- I have a prejudice against languages with excessive syntax.
I’d have to agree with Valkadesh- Smalltalk is incredibly simple. I mean, one of its major design points was for it to be extremely powerful yet learnable by children. Granted, kids are a clean slate, and haven’t had their brains stunted by Algol-derived languages. But that isn’t to say it’s that far out to anyone who has done any half-assed OO [1] in Java or C++ – that’s about where I was before I learned and switched to Smalltalk 4 years ago.
[1] That isn’t to say that all coding in Java or C++ is half-assed OO, but that’s what a lot of Java and C++ programmers do, and it was what I was doing then.
Can’t be worse than lisp, the highest form of mental torture yuk!
Nah, Lisp isn’t bad at all. For a big project, I’d much rather use Common Lisp than Scheme, but Lisp is a cool system. I think most people hate Lisp because of a Intro to CS 1 class they took as freshman… So many kids don’t do well in CS1 because they come in to college with a little programming experience in C or perhaps VB, and feel like they know it all… When their prof and the Scheme language show them that they really don’t know a damned thing about real Computer Science or its theory, people get pissed. I mean, they have to do crazy stuff like think! For those who haven’t gone through this- try to imagine the horror. Recursion! OH NO!
Those who come in as big fans of C, C++, Java or even VB that actually put some effort into learning real CS and Scheme come out better C, C++, Java or VB programmers than they would’ve otherwise.
BF and Whitespace kick asre!
The rest are just toys!
Actually, the .NET Compact Framework is available for all Pocket PCs, including Pocket PC Phone Editions (which are carried by every major network operator in the US–Verizon, AT&T Wireless, Sprint PCS, and T-Mobile, as well as other CMDA and GSM devices–iDEN soon?). You can get them wordwide from many other network operators, and they will run on virtually any network around the world. It seems a little Java heavy here, so I’ll play the Devil’s advocate here =)
Even though J2ME is becoming ubiquitous on devices, there is no benefit for application developers because each device has different properties that make writing a single app for more than one device very difficult. For example, one device might be black & green short and wide with a QWERTY keyboard, another might have full color and be tall and thin with a T9 keypad, others have many variations. For application support these are different enough to fragment developers. I will admit that I haven’t written a J2ME app designed for cross-platform across Nokia devices, but a colleague at a major mobile game developer has told me that they can’t even support more than 2 Nokia devices because their support for J2ME, the vendor-specific libraries, and the hardware differences introduce incompatibilities that make it too much work in source management and maintenance.
The strength Microsoft has here is that they have done something the rest of the industry can’t–platform standardization for developers. Love them or hate them, Microsoft has recognized that one single device with one single programming model and millions of software developers (supported by 35+ OEMs) will be much more successful than a bunch of better devices with a common programming model (although requiring vendor specifics) and a fragmented set of developers. On Pocket PCs, developers know what they can expect every time, in size, color, input, etc. At the same time, this is why OEMs hate them because they cling to this standardization so dearly, but they still support them because the devices sell–especially in the enterprise.
The biggest weakness Microsoft has is that everyone hates them. Even if their devices get better (or closer to being better), it will all depend on whether or not the developers turn on them. As a developer, I’ll be honest and say that I won’t turn on them until they stop helping me make money. I’ll write J2ME code when my job asks for it, but so far all that training and practice is going to waste.
Well, i like recursion, but lisp kind of exaggerates on that don’t you think? Not to mention getting Lost In Stupid Parenthesis all the time. Other than using it for A.I. stuff i really never found any use for it, the only thing it seems to good at is handling lists.
Again, you don’t have to use so much recursion in lisp. Intro to CS Scheme students usually have to use just recursion in their assignments, but what you learn in an intro class is not all there is in a language. Good thing people Common Lisp has a loop function that is beyond anything you can do with for, foreach, while, etc in the Algol derivative group.
I’ve never found the parens confusing- I see it as a decent tradeoff for the simplicity of the syntax. You don’t have to write the whole app on one line…
Yes, i could use loop, but iterative cycles seem out of place in lisp, as ugly as using goto’s in c, so i try not to use them.