Getting familiar with .Net Compact

Trying to educate myself on exactly what is going on in the Microsoft camp has been very interesting. Today I've been exploring how development is done on the PocketPC and Smartphone and it's been enlightening, especially learning how the .Net Compact framework fits in. For the launch of Windows Mobile 2003, Microsoft has cut down the .Net runtime into the .Net Compact the same way that Sun has cut down Java to J2ME. Both systems use lighter version of their respective APIs, but in general you program using the same language and the same environments.

For consumer products developers, this may not be a big deal as I assume the more power-hungry or highly-customized apps will continue to be written using C++ and low level APIs. But for corporate mobile developers it's quite a shift in thinking.

Check out this video of a simple development demonstration using the new Windows Mobile 2003 Smartphone SDK and Visual Studio .Net. If you're a Java, Linux, Palm or Symbian developer, I want to ask you how much effort you'd need to go through to duplicate that demo - it was pretty impressive.

In the demo, in case you don't want to bother with the video, the MS heads do a basic VB-like app which has a simple form with a text box for a zip code and calls a SOAP temperature service from xmethods.com and puts the results in a label. Normally I would ignore the bells and whistles like drag and drop UI components since many times that's just fluff. But in this instance, it's not. It shows that forms on Smartphones are highly customizable whereas in Java they're not placeable at all. In fact, the .Net's forms allow things like tabs that aren't available at all on the Java, unless you start drawing your own widget libraries from scratch. It also shows the integration of XML within the framework - including higher level libraries such as SOAP. Both of these are add-ons for Java, and right now there's not a lot of great libraries to choose from. It also shows how C# (which is syntactically identical to Java) is used to do all this without any major ugly spots.

The rest of the points in the demo are somewhat comparable to a similar environment in Java. The dev environment is integrated, fast and debugging is easy. I was able to get something similar to this in J2ME using IBM's Websphere Device Developer which is basically Eclipse with a custom J9-based emulator for the phone. And maybe NetBeans also allows this sort of integration for J2ME as well, but I have't tried it for a long time, so I don't know (and sorta doubt it).

Compiling, debugging, copying and then running the app to the phone in the video was all relatively painless in the demo, though *very* slow. I can copy and install a .jar over to my phone via Bluetooth in a lot less time and the new SonyErisson T610 actually allows on-phone debugging which I think is quite nifty as well. I wonder how fast the CLR on the phone *really* is?

But regardless, the fact remains that it's as easy to create .Net Compact Framework apps as it is J2ME apps and these apps run both on phones and legacy PocketPC devices as well. Also, I don't know what the limitations are yet with the Smartphone APIs, but I seriously doubt that Microsoft has castrated .Net Compact like Sun has castrated J2ME. From what I saw in the demo, the apps need to be signed, which hints to me that after they're authorized, the apps can get to whatever part of the phone they want to. Which means you'll have more compelling, easy to create forms that can actually do real work on your phone.

Right now in the Symbian/Java world there's just no comparison in ease of development combined with power like this. In most phones today J2ME is cut off from the hardware itself (you can't get at the calendar or addressbook for instance) and development for the SymbianOS doesn't have anywhere *near* this level of integration with the IDE or ease of development - ask anyone who's dealt with wacky Perl script errors trying to compile HelloWorld for their phone and they'll tell you.

It's late, those are my observations for now...

-Russ

< Previous         Next >