Eclipse and Java are key components of Android, Google's mobile operating system. While it's an OS meant to challenge the likes of Microsoft Windows Mobile and Apple iPhone, Android also promises to be an important development platform.
Google's Android is a complete mobile operating system. While the technology is meant to challenge other mobile OSes-including
Microsoft's Windows Mobile and
Apple's iPhone-it also promises to be a key development platform.
For developers, that means using
Java and Eclipse, and understanding the fundamental mobile architecture of Android.
Here is an overview of the architecture.
Eclipse: The Preferred IDE
The preferred development environment
for developing for Android is the open-source Eclipse IDE.
While developers could use their favorite editor and command-line tools
directly, development is certainly easier in Eclipse, since Google has given us
a pretty nice plug-in to simplify development in Eclipse. This plug-in
automatically creates a project for developers, including some starter files
such as a class for the main application, which even includes some starting
code.
Development, therefore, requires
that Eclipse and the Android software development kit be installed, as well as
the plug-in for Eclipse.
The Language Is Java
To develop for Android, programmers
use the latest version of Java. Included with the Android SDK is a whole set of
Java libraries found in such namespaces as android.app and android.os. These
classes are all contained in a single jar file; looking at the jar file, I saw
such namespaces as android.content, android.database, android.graphics,
android.hardware, android.net, android.net.wifi (cool!), android.sax (as in
Additionally there's a large set of Apache
classes and World Wide Web Consortium classes. The Apache classes are primarily
for HTTP communication, while the W3C classes are the DOM
(Document Object Model) processing classes.
Remember, Android is a complete
operating system, and as is obvious, through these Java classes, developers
have access to a great deal of features that they can use in their programs.
I was curious about one aspect of
the HTTP classes in particular. I looked through all the class names, and sure
enough, this one was present: org.apache.http.HttpServerConnection. That's for
server-side processing. Does Android let developers run an actual HTTP server?
HttpServerConnection is just an interface; on further inspection, I found this
class: org.apache.http.impl.DefaultHttpServerConnection. Indeed, this class is
an implementation of a server connection class. I didn't have time for this
particular article to explore this further, but I'm definitely going to do that
soon. The idea of running server software on a mobile device is certainly intriguing.