Palmtops, Pagers and cell phones are everywhere and the variety is endless. The industry's need for these devices to be able to run and action almost any duty that utilised to be finished on desktops requires a standard and simple artefact to develop applications. The solution must suit a variety of platforms and take in care some limitations such as limited memory, small screen sizes, alternative input methods, and slow processors that being small brings with.
Recognizing that \"one size doesn't fit all\", Sun regrouped its Java technologies into three editions, apiece is aimed at a specific market segment:
• J2EE - Aimed at heavy duty server systems.
• J2SE - Aimed at Standard desktop & workstation applications
And Java 2 Platform Micro Edition (J2ME) - Aimed at Small & module constrained devices and standardize the ingest of Java technology in wireless devices. The J2ME architecture had to be modular and scalable due to the diversity of direct devices. To achieve this, J2ME provides a range of realistic machines, apiece optimized to the different processor types and module footprints.
J2ME advantages include improved section and consistency of applications across platforms and devices, superior user interfaces with graphics, the ability to function off-line discover of wireless coverage, peer-to-peer networking and no licensing expenses necessary for the SDK, which means that anyone crapper create an covering and market it.
J2ME vs. WAP
J2ME apps have much more to offer than those built low the Wireless Application Protocol (WAP), in terms of both features and security. Whereas WAP is a thin-client utilization protocol, J2ME is a utilization platform specifically for sharp applications. J2ME applications offer the mass section advantages over WAP applications:
• Without a WAP gateway in the middle, sharp applications crapper wage scalable end-to-end section from the back end to wireless devices. This will become especially important as the back end evolves into a message-driven Web-services framework.
• Smart applications crapper store and process accumulation locally, thereby reducing network traffic. Not only does this conserve precious wireless bandwidth and reduce latency, it reduces the likelihood that crucial information will be intercepted or broken (e.g., by denial-of-service attacks).
• Smart applications utilize device processing power efficiently. Instead of encrypting everything with the same key strength regardless of needs, rich clients crapper establish a comprehensive differentiating section policy based on the content.
J2ME vs. native platforms
As compared with the native platforms, the main strength of the Java platform is that it allows us to write portable applications. The Java platform's portability stems from its enforcement model. Specifically, it stems from the ingest of the JVM to process Java bytecode into machine code at runtime, providing a compatibility layer on top of the hardware. The Java platform's enforcement model also introduces some important section benefits that are absent in device-native applications. These benefits are as follows:
• The JVM verifies all classes in class loaders and ensures that applications do not action any chanceful operations. Because runtime class verification is computationally expensive for MIDP VMs, MIDP has a special two-step bytecode verification scheme. We'll address this scheme in a after section.
• The JVM has a monitoring mechanism to safeguard runtime covering errors. A beatific example is the garbage collector. The JVM crapper clean up covering module heaps automatically at runtime. This helps to refrain module leaks, which are the major cause of crashes among native applications.
• The JVM crapper wage a section trainer or sandbox for applications. Viruses and other hostile code accidentally downloaded from the Web crapper pose serious section risks. On the Java platform, entire applications (i.e., JAR files) crapper be digitally signed. The JVM section trainer grants the signed covering privileges to access specific APIs (domains) based on the trust take of the signer. We'll handle domain-based mobile code section in more detail in a after section.
Smart, usability-focused design and the Java platform's built-in enforcement model provide J2ME applications significant performance and section advantages over both WAP and native applications.
