• No results found

The Editions of Java

When Java was introduced, it primarily consisted of two components: the pro- gramming language specification, and the Java runtime environment specifi- cation that described the features of a JVM. As the Java language evolved over the years, Sun Microsystems gradually added new specifications and tech- nologies that made Java more than just a programming language.

For example, servlets and JavaServer Pages were introduced to provide a mechanism for using Java to create dynamic Web pages. JavaBeans provide a Java software component architecture. Enterprise JavaBeans provide a mecha- nism for developing distributed applications. Each of these technologies has its own specification.

Soon after the release of Java 2, however, (which coincided with the release of version 1.2 of the Java Development Kit), to create common runtime envi- ronments for Java developers to target, Sun grouped their major Java pro- gramming technologies into three editions:

■■ J2ME: Java 2 Platform, Micro Edition ■■ J2SE: Java 2 Platform, Standard Edition ■■ J2EE: Java 2 Platform, Enterprise Edition

J2SE

J2SE is what I like to call the core Java language. This book focuses on the key elements of this Standard Edition. J2SE provides an environment for develop- ing many different types of Java applications and includes support for GUI programming, threads, input/output, networking, XML, CORBA, applets, JavaBeans, remote method invocation, security, and database access.

If you are interested in eventually taking the exam to become a Sun Certified Java Programmer, you need to become familiar with the J2SE.

J2ME

J2ME is not a slimmed-down version of J2SE. Instead, it establishes a proce- dure for defining what a particular JVM designed for an electronic device will provide. The J2ME technology has two components:

Configurations. Define the type of JVM that is being targeted.

Profiles. Describe specification details about the device that is being tar- geted. Each device has a profile listing the standard Java APIs available for that device.

Configurations are composed of Java APIs and virtual machines designed to run on two different types of devices. The first type of device is those with 128–512K of memory. This configuration is called the Connected Limited Device Configuration (CLDC), and the corresponding JVM is referred to as the K Virtual Machine, or KVM.

The second configuration is for devices with more than 512K of memory. This configuration is called the Connected Device Configuration and uses the standard JVM, with all the same capabilities of a regular desktop computer.

Profiles are defined by the Java Community Process (JCP), which allows for input from any industry interested in a profile for a particular type of elec- tronic device. For example, a profile would be created for wireless phones, with the profile defining the configuration to use for wireless phones and the Java APIs that will be available. Any company that had an interest in wireless phones could join the Java Community Process to help determine which con- figuration to choose and what the Java API would look like for developing Java applications for wireless phones.

J2EE

J2EE is a collection of Java technologies that create a platform for distributed applications. Along with the J2SE (some of the J2EE technologies are actually a part of the Java 2, Standard Edition), J2EE allows for the most complex of mul- titier software applications to be portable across multiple platforms.

J2EE consists of the following technologies:

Enterprise JavaBeans (EJB). An EJB is a component architecture for the development and deployment of object-oriented distributed business applications. Applications written using the EJB architecture are scal- able, transactional, and multiuser secure.

Java Servlets. A servlet is a Java application that runs in a Web server.

JavaServer Pages (JSP). A JavaServer Page is similar to a servlet and allows for the creation of dynamic Web pages.

Java Database Connectivity (JDBC). JDBC allows Java applications to access a database.

Extensible Markup Language (XML). XML provides a mechanism for describing data using tags in a platform-independent manner.

Java Naming and Directory Interface (JNDI). JNDI allows Java applica- tions to access naming services and directory services.

Java Transaction API (JTA). JTA allows Java applications to access a transaction service.

Java Transaction Service (JTS). JTS defines the implementation of a transaction manager that supports the JTA.

Java Messaging Service (JMS). JMS allows for Java applications to access a message service.

Java IDL. The Java IDL allows Java applications to use CORBA implementations.

JavaMail. JavaMail allows Java applications to access an email service. RMI-IIOP. RMI-IIOP is for using Remote Method Invocation over the

Internet InterOrb Protocol.

Connectors. Connectors allow Java applications to access enterprise information systems.

Java Web Services. Java Web Services allow Java applications to take advantage of the emerging Web services technologies.

Similar to J2SE programs run in a JVM, J2EE applications run in a J2EE- compliant application server. The application server implements the J2EE specification, allowing developers to create applications that use any or all of the J2EE technologies, but that still are platform independent. Some of the more popular applications servers are IBM’s WebSphere, BEA Systems’ WebLogic, and Macromedia’s JRun.