Wednesday, January 14, 2009

The Generic Connection Framework

The Generic Connection Framework :

Since the CDC is a superset of the CLDC, it includes the Generic Connection Framework (GCF). Unlike the CLDC, however, the CDC also requires GCF support for two specific connection types: files and datagrams. This makes sense because the CDC includes the file classes from the java.io package and the datagram classes from the java.net package.

It is therefore straightforward for the device manufacturer to write GCF implementation classes that simply map GCF requests (using the file or datagram protocol at the start of a URL) into their java.io and java.net equivalents.

Using the CDC : http://java.sun.com/javame/technology/cdc/index.jsp

Like the CLDC, the CDC is by itself a limited programming platform. Again, because it does not define any user interface classes or implement any I/O models, about all you can do for output is write to the System.out stream, which may or may not be captured to a console or file. The extra classes defined by one or more J2ME profiles are really required to write interactive applications.

Understanding The Connected Device Configuration (CDC)

Understanding The Connected Device Configuration (CDC) : 

The CDC specification defines four things in particular :

The capabilities of the Java virtual machine (VM). Unlike the CLDC, the CDC VM is a full-featured VM. 

A subset, much larger than the CLDC's, of the J2SE 1.3 classes.

The same APIs (application programming interfaces) that are new to the CLDC -- in other words, the Generic Connection Framework (GCF).

Support for file- and datagram-based input/output using both the GCF and the familiar java.io and java.net classes. 

Note that, just like the CLDC, the CDC does not define any user interface classes or how applications are loaded and activated: these are left for the profiles to define.

The Virtual Machine :

The CDC supports a complete, full-featured Java 2 virtual machine (VM) as defined in The Java Virtual Machine Specification. The low-level interfaces for calling native code, connecting to debuggers, and profiling code are optional, but if supported they must be the standard interfaces -- Java Native Interface (JNI), Java Virtual Machine Debugging Interface (JVMDI), and Java Virtual Machine Profiling Interface (JMVPI) -- used in Java 1.3.

Note that the CDC does not require preverification of classes, as full class verification is done on the device by the VM. Classes that have been preverified can also be used, of course, since the additional information added to the class files by the preverifier is ignored.

The J2SE Subset :

The subset of J2SE 1.3 included in the CDC consists of classes from these packages: 
java.io
java.lang
java.lang.ref
java.lang.math
java.net
java.security
java.security.cert
java.text
java.util
java.util.jar
java.util.zip

As you can see, the CDC includes many more packages than the CLDC, and many more classes even in the shared packages. For example, the CDC includes the collections classes from the java.util package, while the CLDC does not.

This makes the CDC a much more J2SE-like environment than the CLDC. There are still classes missing, of course. For example, the java.net package as defined by the CDC only includes the classes related to datagram sockets, not stream sockets.

Thursday, January 1, 2009

What is a Mobile Application?

What is a Mobile Application?

Most mobile applications use the Java Micro Edition (Java ME) platform, which was developed for small devices like mobile phones and set-top boxes. Java ME uses scaled down subsets of Java SE components, virtual machines and APIs.

It also defines APIs that are specifically targeted at consumer mobile and embedded devices. NetBeans Java ME supports the two base configurations of the Java ME platform, CLDC and CDC. 

Connected Limited Device Configuration (CLDC) is for devices with less memory and processing power than CDC-based devices. The Mobile Information Device Profile (MIDP) is based on CLDC and more than two billion MIDP devices are in use worldwide. 

Connected Device Configuration (CDC) is for devices with much greater memory, processing power and network connectivity such as smart phones, set-top boxes, and embedded servers and devices.