Enterprise Java Introduction
Peter Komisar © Conestoga College  version 2.0  Fall / 2007

Reference:  Draft Document for Review August 22,2007
5:25 pm SG24-7501-00 Rational Application Developer
V7 Programming Guide.

This is a synopsis of information found in Introduction
and part of the second chapter of the Draft Document
for Review August 22, 2007 5:25 pm SG24-7501-00
Rational Application Developer V7 Programming Guide.
It has been prepared for private academic purposes
and is not an effort to publish the contained material.



General Focus

Early in Java's development, the language split
into different versions. The standard version was
augmented with the Micro version for things small
and the Enterprise edition for things large, namely
enterprises.

The Enterprise edition really caters to programming
that is done on servers that would be of typical use
to organizations both small and large.

IBM early on embraced the open source movement
and Java. They created Eclipse, a Java IDE which
they released into the Open Source world. They also
spent much effort creating the WebSphere line of web
server applications. Soon after they took advantage
of Eclipse as a tool to develop applications on
WebSphere.

More recently a very powerful and highly respected 
company, in the world of Object Oriented programming,
Rational, famous for it's founders the 'four amigos' who
authored UML was impacting the world of application
development.

IBM recognized the quality of their assets and bought
Rational. Rational, like IBM had extended Eclipse to
create an Application Development IDE for Enterprise
Java.

Because of many added features that the Rational
tool brought to the table, IBM dropped it's WebSphere
Studio and adopted Rational's Application Developer
Tool which in August of 2007 has been released in
version 7.

Eclipse or RAD 7

While there are many value added features with
RAD 7, essentially they build on Eclipse. The world
of Eclipse is a power to be reckoned with and just
doesn't sit idly by while improvements are made to
the RAD 7 package. The Eclipse developers have
been supplying tools that may be more spartan but
none the less do the same sorts of things that RAD
7 does.

In the previous version of this course we carried
both Eclipse and RAD 7 forward. The course ended
up being IDE heavy. As well it turns out that licencing
RAD 7 'seats' are very expensive. As well, in the previous
course we ran short on time explaining the underlying
Enterprise technologies as we were also training for
use of the IDE.

In this rendition we will attempt to resculpt the course
with the following objectives.

New Course Objectives

We leave the blurb on RAD 7 just to understand the
context which we are in. Some students may be interested
in following a parallel trail using RAD 7.


IBM Rational Application Developer
for WebSphere Software V7.0


Having bought it, the Rational Application now has
the IBM moniker as noted in our title above.

The software is described as follows:

"IBM Rational Application Developer for WebSphere
Software V7.0 is an integrated development environment
and platform for building Java Platform Standard Edition
(Java SE) and Java Platform Enterprise Edition (Java EE)
applications with a focus on applications to be deployed
to IBM WebSphere Application Server and IBM WebSphere
Portal."

// an IDE for both Standard and Enterprise Editions with
// a focus on applications to be deployed on WebSphere...



Following is a list of Rational Components which have
parallels developed or in development in Eclipse.

Rational Component Products

- a UML-based visual modeling and design tool

- a design tool that leverages model-driven development
with UML to create well-architected applications, including
those based on service-oriented architecture (SOA).

// useful for architects and senior developers
- a suite of development, analysis, and deployment tools
for rapid Java EE, Enterprise JavaBeans, portlets,
and Web applications.

// previously Application Developer V6.0 and WebSphere
// Studio Application Developer V5.x



- an automated testing tool that tests Java, HTML,
VB.NET, and Windows® applications.


- a multi-user system performance test product
- designed to test Web applications
- focuses on scalability.


- a manual test authoring and execution tool
- promotes test step reuse


- targets the business analyst who models business
processes. can generate Business Process Execution
Language (BPEL) definitions which can be imported
into WebSphere to create applications for the
WebSphere Process  Server.

// not a Rational brand product


Versions

The text used in the course describes version 7 of the
product which is backwards  compatible with version
6 and WebSphere Studio Application Developer
Version 5. We will extract the Eclipse trail out of the
pdf which incidently is very highly rated.

Themes

Following are themes that the IBM Rational software
attempts to capture.


Operating System Support

Microsoft
- XP Professional with Service Pack 1 or 2
- Various Windows 2000 Professional and Server editions
- Windows Vista

 Linux on Intel®:
- Red Hat Enterprise Linux Workstation Version 4.0
- Red Hat Desktop Version 4.0 (running in 32-bit mode)
- SUSE Linux Enterprise Server (SLES) Version 9 (all service packs;
             running in 32-bit mode)


Databases Supported

IBM Cloudscape V5.1
IBM DB2 Universal Database // many versions
Apache Derby 10.0, 10.1
Generic JDBC 1.0
Informix Dynamic Server V9.2, V9.3, V9.4, V10.0
MySQL 4.0, V4.1
Microsoft SQL Server 2000
Microsoft SQL Server 2005
Oracle8i V8.1.7, Oracle9i, Oracle10g
Sybase Adaptive Server Enterprise V12.x, V15


// gloss CD package contents, many new features,
// and which Java versions are supported



The Eclipse Project


The Eclipse Project is an open source project devoted
to creating a development platform along with integrated
tooling.

Components of  Eclipse
// The JDT is specifically Java-based and adds concepts of Java
// projects, perspectives, views,
editors, wizards, and refactoring tools.


IBM Eclipse SDK V3.2

"The IBM Eclipse SDK V3.2 is an IBM branded and
value added version of the Eclipse SDK V3.2. The
IBM Eclipse SDK V3.2 includes additional plug-ins
and the IBM Java Runtime Environment (JRE) V1.5
and V1.4.2."

The following components are part of IBM Eclipse
SDK V3.2:


Components of IBM Eclipse SDK V3.2



Connection of IBM Eclipse SDK to Rational Platform


"The IBM Eclipse SDK V3.2, which provides an open,
portable, and universal tooling platform, serves as the
base for the IBM Rational Software Delivery Platform
common to many Rational products including Application
Developer V7.0."


Test Server environments

Application Developer V7.0 support a number of
server environments for running, testing, and
debugging application code. In Application Developer
6.0 and 7.0 a full version of IBM WebSphere Application
Server is provided.

IBM Servers Environments Provided

Other Servers Available For Use


System Requirements

The system hardware requirements are as follows:
// detailed steps page 1177 of the RAD 7 pdf

// see pdf for licencing info, migration updates etc.


Tools


Application Developer V7.0 includes a large
number of tools, listed below to assist in simplifying
and eliminating error-prone taskes. Many similar
tools are also made available for Eclipse.

Tool List


Sample code 

The RAD 7 pdf supplies sample code. We in
an effort to develop a better understanding of
Enterprise Java will develop our own simple
examples as we go.


Programming Technologies  // chapter 2 in RAD 7 pdf


Chapter 2 of the Rational text considers the different
programming technologies that are used to generate
Enterprise Applications. Whether viewing from the
Enterprise edition from IBM's view or Sun's documentation
the same underlying technologies are used.

Below the component technologies are listed

Component Programming Technologies Used in J2EE


Desktop applications

By desktop applications for the most part run
on a single machine which the user interacts
with via a user interface. We say mostly as
a database running on another machine may
be involved, in which case is is viewed as a
service. All the main parts of the application,
the user interface, the business logic and the
control of flow are governed on the desktop.

Example Scenario

As an example, a situation is described where
a bank requires an application "to allow workers
in a bank call center to be able to view and update
customer account information."  A starting point for
this "Call Center Desktop" might be a simple
stand-alone application designed to run on
desktop computers.

We need early on to consider our own custom
applications that we create that exercises similar
aspects of the Enterprise Java platform.

Java 2 Standard Edition

The standard edition of Java provides all the resources
needed to build such an application as well as the
runtime environment to allow the application to be
executed.

Application Developer V7.0 supports the new
features found in Java SE V5.0. The book sticks
with code that works in version 1.4 so be consistent
with Java EE level 1.4. 

As of this revision of this note, the JDK is at version 6
and the Enterprise Edition is in version 5.


Rational's Description of Java

Rational see's Java as a general purpose, object-oriented
with basic language syntax similar to C and C++, with
significant differences. Java is seen as a higher-level
language than C or C++ as the developer is provided
with a more abstracted view of the underlying hardware,
with the user relieved of managing memory.

Compilation doesn't create executable binaries, rather
intermediate byte code which is executed by on a Java
Virtual Machine or JVM.

To create the Desktop app Rational describes the following
features they should be in the development tool, which, no
surprise, are present in Application Developer 7.0.

This yard stick can be applied to various IDE, including
Sun's NetBeans, and plain Eclipse.


What Rational Thinks Should be in a Development Tool


Database Access

Rational expects the The Call Center Desktop will need to
access data residing in a database such as IBM's own DB2
Universal Database.

The Java Standard Edition supplies the following
connective technologies to meet this end.

Java Standard Edition Connective Technologies

In Chapter 2 of the text the focus is on JDBC. JDBC
remains the primary workhorse in the world of Java to
handle database connectivity.


JDBC


"Java SEV1.4 includes JDBC V3.0. In earlier versions
of Java SE, the classes contained in the jaxa.sql package
were known as the JDBC Core API, whereas those in
the javax.sql package were known as the JDBC Standard
Extension API (or Optional Package), but now the V1.4
JDBC includes both packages as standard.

Although JDBC supports a wide range of data store types,
it is most commonly used for accessing relational databases
using SQL.


Common Classic JDBC Classes and interfaces
JDBC types such as java.sql.Date and java.sql.Blob are
Java equivalent of SQL data types that there is no Java
primitive type for.

Eclipse and RAD 7 Supplied Features for Database Development


Graphical User Interfaces

Applications  are enhanced by by providing graphical user
interfaces  (GUIs). Java supplies AWT and Swing to create
GUIs. IBM adds the SWT


Abstract Window Toolkit (AWT)


The Abstract Window Toolkit (AWT) has been enhanced
however it's basic building blocks have remained the same.

AWT Components

The AWT is implemented natively and have the
same look-and-feel as the operating system.

Downside

Swing


The new Swing that was added to Java provides
a number of more sophisticated GUI components,
(trees tables, etc. ) Components that overlap with
AWT have a J prefix and reside in a different package.

Example

java.awt.Button  vs  javax.swingJButton


Upside


Downside


SWT, Standard Widget Toolkit  // Eclipse Widgets

The Standard Widget Toolkit (SWT) is the GUI
toolkit provided with Eclipse and originally used
to build the Eclipse GUI. The SWT is written entirely
in Java and uses the Java Native Interface (JNI™)
to call through to the operating system where
possible. 

// uses native components when possible

The SWT uses native calls when  components are
available and builds component in Java when a native
one isn't available.

SWT may be thought of as the best of both worlds,
AWT and Swing.

SWT Features

Downside 
// minor problem


SWT is not a standard part of Java SE V1.4.  An
application using SWT has to be installed together
with SWT class libraries. This is not that big a problem
as the libraries are open source and freely distributable.


Standalone Applications vs Applets

Java applets normally run in a JVM provided by a
Web browser or a Web browser plug-in. Typically
the JVM has a very strict security model, by default.
Because of accessing restrictions, they are not
normally suitable for applications requiring access
to databases.


Eclipse and RAD 7 Features for GUI Building


XML


XML or Extensible Markup Language supplies a common
medium for different system using different data formats, to
communicate. In Rational's Call Center Desktop application
XML is used to able the exchange data with other applications.

XML is a standardized and easy language useful for the
exchange of data. The structure of the data is described in
the XML document itself. Mechanisims exist to validate that
the the conforms to an agreed format (Document Type
Definitions (DTDs)) and XML schemas (XSDs)).

Enterprise Java uses XML for configuration files called
deployment  descriptors, and WebSphere Application Server
V6 uses XML files for storing its configuration settings.


Java SE V1.4 includes the Java API for XML Processing (JAXP).
JAXP contains the following parts.


JAXP Components

Eclipse and Rational's XML Development Features


To do


1) Find Eclipse in the Enterprise Edition at the Eclipse
Web site.Take a copy and have one on your personal
drive at the school, on your USB stick, ( if there is room
and on your home and / or work PC.)

2) Consider an informal description of a business
for which you will create an Enterprise application.
This will take the form of a project for this course.

It should have the following components. You will see
that in the literature we use as reference, many of these
functionalities are exampled.

For the database, typically inventory information will need
to be stored and retrieved. The GUI might be a time entry
system, where hours worked might be added. It could also
be an admin tool where accounts are added or removed.

What we might do is emulate the banking application that
the RAD 7 pdf uses as an example but simplify it so our
tour of the Enterprise system is easier to comprehend.

Perhaps a study of the Banking app will allow us to create
a simplified skeleton of the overall application structure.



Assignment


Following we touch base with each of the technologies
mentioned in the last part of the note.

1 ) Create a Java program with methods that gets and sets
an int value, a double and a String value. Show the program
outputing the values to screen using System.out.println
statements.

2) Create a Swing GUI that uses setText( ) methods to set
each of these values in three textfields when a button is
pushed.

3) Create an XML document that describes a house.
The primary element would be called house. Then sub-elements
would be each of the rooms in the house. For example the
living room, dining room etc. This can be as basic as you
like.

IBM's Rational wizards will provide much of our programming
for us. So we needed be concerned from developing the above
from a 'clean sheet'. Feel free to browse the net for simple base
examples of each of the above codes and use them as a base
to provide your solutions.


Assignment Form

Name Assignment Number Topic

Question

Your Answer

etc.