如果找到了对您有用的资料,烦请点击右手边的Google广告支持我继续共享知识,谢谢! http://dengpeng.spaces.live.com/

2008年5月29日星期四

Comparing Mobile Platforms: Java ME and Adobe Flash Lite

http://blogs.sun.com/mobility_techtips/entry/comparing_mobile_platforms_java_me

By Bruce Hopkins

If you’re a mobile developer, you may have noticed that more devices these days are supporting Adobe Flash Lite. According to the latest figures, approximately 300 million devices in the market support some form of the Flash Lite specification. Of course that’s nothing compared to the 1.2 billion (yes, that’s with a “b”) Java ME devices that are currently available, but I thought that it would be worthwhile to see the strengths and weaknesses of each platform side by side. In the tables that follow, I’ll compare the latest and greatest specifications for both platforms in the following categories:

Graphics
Multimedia
Local Device Accessibility
Security
Network Connectivity
Miscellaneous

Our first category for comparison is graphics. As you can see in the table below, the Flash Lite 3 platform supports all the standard rasterized graphic formats and supports FLA (Flash format) and SVG formats for vector graphics. In my opinion, FLA is a superior vector graphics format compared to SVG, and the tools required to create sophisticated applications are easier (and more widely available) to use for FLA compared to SVG. So, the Flash Lite 3 platform is a worthy competitor in the graphics department for mobile applications, and it is easy to see why many Flash Lite applications are games. One downside, however, is that Flash Lite 3 has no support for 3D graphics.

Graphics

When it comes to multimedia (the playback of various formats and codecs of audio and video). The Flash Lite 3 platform is a clear winner. It not only supports the Flash 8 video specification but also Sorensen video, which is an industry standard for compressed video. Both platforms support streaming audio and video, which is crucial when your mobile device needs to communicate with a media server.

Multimedia

How do the two platforms compare when you want to gain access to local resources on the mobile device? As you can see in the table below, the Java ME MSA specification gives the developer an unprecedented amount of access to local resources such as the GPS radio, camera, and microphone.

This may be a little known fact: both platforms support the capability to initiate a request to the handset to dial a phone number. However, since the Java ME MSA platform can also read phonebook entries on the local device, it’s more suited for creating powerful business applications. Note that there are Java ME and Flash Lite implementations that do have access to sensor data from accelerometers, but such functionality is not a part of the Java ME MSA spec or Flash Lite 3.

Accessibility

In the security realm, both platforms support HTTPS, so you can use either platform to securely communicate with a SSL-enabled web server. However, applications that use the Java ME MSA platform can also use digital certificates for secure identification. MSA devices have the added ability to use various encryption algorithms to secure data at rest (that is, on the filesystem).

Security

Which platform provides more options for connectivity when your mobile application needs to communicate with external resources? The following table gives you a good idea of what you can expect when you create a mobile application that needs to communicate to a networked or local device. As you can see, both platforms support the capability for mobile applications to initiate requests using raw TCP sockets or with the HTTP protocol. However, mobile devices that support the Java ME MSA standard have the additional capability to act as servers, and wait for incoming requests on various protocols on both TCP and UDP transports. This allows the mobile device to communicate in a peer-to-peer mode without the necessity of server-to-proxy requests between them. If you’re in server mode, your application doesn’t even need to be running in order to receive its data. The PushRegistry allows Java ME application to “wake up” upon an incoming network request.

Mobile devices that adhere to the Java ME MSA standard also have the ability to use the local serial and infrared ports on the mobile device.

Connectivity

The following capabilities really didn’t fit in any of the categories discussed earlier in this article. For those of you who have never developed Flash Lite applications, you may be surprised to learn that it supports floating point math, XML parsing, and even TCP/IP networking without necessitating the use of a threading framework for its developers.

Miscellany

Conclusion

Each platform has its own strengths and weaknesses when it comes to mobile application development. Flash Lite-enabled devices are really good at displaying graphics and multimedia, which lends itself to several gaming applications. On the other hand, devices that support the Java ME MSA platform are the obvious choice when you need to communicate with Bluetooth devices, use location based services, capture audio/video, render 3D graphics, or perform any form of asynchronous communication.

I’m really glad to see that one of the Java ME licensees, Sony Ericsson, has made significant progress on bridging the gap between both platforms with its Capuchin technology, which was announced in late April: "...a Java ME API that defines a bridge between the Java ME and Adobe Flash Lite programming environments. This API makes it possible to use Flash Lite as the front end and Java ME as the back end of applications, meaning that Flash tools can be used for UI design while still having access to all the phone services available to Java ME." Both platforms have made significant advances from their initial 1.0 versions. I can’t wait to see what’s on the horizon for both platforms as the standards evolve.

没有评论: