Enterprise Java
Introduction
Peter Komisar © Conestoga
College version 1.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.
That is where we begin!
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...
A Rational Term
SDP - The IBM Rational Software Delivery Platform
(SDP) an integrated set of products built on the Eclipse
3.2 framework.
//
see diagram in PDF
Rational Component Products
- Rational
Software Modeler
- a UML-based visual modeling and design tool for
system analysts, software architects, and designers
- enables defining and communicating architectural
specifications to stakeholders.
//
previously known as the Rational XDEâ„¢ Modeler
- Rational
Software Architect
- a design and construction 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 to create
applications in Java or C++.
//
previously known as Rational Rose® and Rational XDE
// Developer Plus for Java.
- Rational
Application Developer
- 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
- Rational
Functional Tester
- an automated testing tool that tests Java, HTML,
VB.NET, and Windows® applications.
- Rational
Performance Tester
- 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
- WebSphere
Business Modeler
- 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
Version
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.
Themes
Following are themes that the
IBM Rational software
attempts to capture.
- Open computing
- latest open standards
- Eclipse 3.2
- JDK 5 // old already
- JavaServer Faces 1.1 etc.
- Consumability
- improve
- trying, buying, downloading
- installing, deploying running
- servicing, migration from trial
- Compliance
- optional enforcement of floating licenses
- SOA
- generalize the approach to SOA
- improved web services tools
- new web service wizard
- new WSDL visual editor
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
- Eclipse Platform
- a foundation that tool developers can extend
- Eclipse Java Development Tools (JDT)
- workbench
- concept of projects
- user interface libraries (JFace, SWT)
- built-in help engine
- support for team development
and debug
//
The JDT is specifically Java-based and adds
// concepts of Java projects,
perspectives, views,
// editors, wizards, and
refactoring tools.
- Eclipse Plug-in Development Environment (PDE)
- tools for developing Eclipse plug-ins.
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
- Eclipse SDK 3.2 (Platform, JDT, PDE)
- Eclipse Modeling Framework (EMF)
- Eclipse Hyades
- C/C++ Development Tooling (CDT)
- Graphical Editing Framework (GEF)
- XML Schema Infoset Model (XSD)
- UML 2.0 Metamodel Implementation (UML2)
- IBM Java Runtime Environment (JRE) V1.5 and V1.4.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
- IBM WebSphere Application Server
- V6.x, V6.1, V6.0, V5.x, V5.1
- IBM WebSphere Application Server Express V5.1
Other Servers Available For Use
- Apache Tomcat
- V3.2, V4.0, V4.1, V5.0, V5.5
- Oracle® OC4J Standalone Server V10.1.3
System
Requirements
The system hardware requirements are as follows:
- Pentium® III 800 MHz or higher
- 1 GB RAM minimum
- 1024x768 video resolution or higher
- 2 GB or free hard disk space to install all components.
- The temporary (/tmp Linux or c:\temp Windows) -> at least 500
MB
//
detailed steps page 1177 of the 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.
Tool List
- Java development tools (JDT)
- Relational database tools
- XML tools
- Web development tools
- Struts tools
- JSF development tools
- SDO development tools
- Enterprise Generation Language tools
- EJB tools
- Portal tools
- Web services tools
- Team collaboration tools
- Debugging tools
- Performance profiling and analysis tools
- Server configuration tools
- Testing tools
- Deployment tools
- Plug-in development tools
Sample
code // Rational makes us do the work
"The chapters are written so that you can follow
along and create the code from scratch. In places
where there is lots of typing involved we have
provided snippets of code to cut and paste".
Programming Technologies //
chapter 2
Chapter 2 of the Rational text considers the
different programming technologies that are
used to generate Enterprise Applications.
Below the component technologies are listed
Component Programming
Technologies Used in J2EE
- Desktop applications
- Static Web sites
- Dynamic Web applications
- Enterprise JavaBeans
- J2EE Application Clients
- Web services
- Messaging systems
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.
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.
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.
What Rational Thinks Should be
in a Development Tool
- A specialized code editor, providing syntax highlighting
- Assistance with completing code and
correcting
syntactical errors
- Facilities for visualizing the relationships between
the
classes in the application
- Assistance with documenting code
- Automatic code review functionality to ensure that
code
is being developed according to recognized best practices
- A simple way of testing applications
Database Access
The Call Center Desktop will likely 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.
Java Standard Edition
Connective Technologies
- JDBC
- RMI // Java Remote Method
Invocation
- JNDI // Java Naming and Directory Interface
- Java IDL // Java's Interface Definition
Language for CORBA
In Chapter 2 of the text the focus is on JDBC.
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
- java.sql.DriverManager and javax.sql.DataSource
- // used to obtain a connection to a database system
- java.sql.Connection
- // represents the connection to a database system
- java.sql.Statement, PreparedStatement, and CallableStatement
- // represent executable statements used in updates &
queries
- java.sql.ResultSet
- // represents the values returned from a
database query
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.
What Rational's Developer 7.0
supplies for Database Development
- access to all the facilities of JDBC V3.0
- A view of the structure of an external database
- A mechanism for viewing sample contents of tables
- a way to import structural information from a database
- wizards & editors to manipulate database relations
- A feature to export mods to an external database server
- A wizard to help create and test SQL statements
Graphical user interfaces
The Call Center Desktop application would enhanced
by by providing a graphical user interface (GUI). Java
supplies AWT and Swing to create GUIs.
Abstract Window Toolkit (AWT)
The Abstract Window Toolkit (AWT) has been enhanced
however it's basic building blocks have remained the same.
AWT Components
- user interface components
- // [java.awt.] Frame, Button, Label etc.
- An event-handling model
- // events such as button clicks, menuchoices etc.
- graphics and image processing classes
- layout manager classes
- // for positioning components
- drag-and-drop functionality
The AWT is implemented natively and have the
same look-and-feel as the operating system.
Downside
- the range of GUI components is limited
- and thelook-and-feel cannot be changed.
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
- a richer set of controls
- pluggable look-and-feel
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
- a rich, portable component model //
like Swing
- the same look-and-feel as the native OS //
like AWT
- SWT GUIs perform well //
like AWT
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.
Application
Developer 7.0 Features for GUI Building
- a specialized editor that uses a variety of frameworks
- focus on GUI layout, rather than code
- able to add event-handling code & business logic calls.
- dynamic, immediate reflection of changes visually
- testing facilities for the GUI
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 relativelly language enabling 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
- A parser interface
- based on the W3C Document Object Model (DOM)
- builds a representation of an XML document within an app
- The Simple API for XML Parsing (SAX),
- allows event-driven dynamic document parsing
- XSL Transformations (XSLT), Extensible Stylesheet Language
- allows transformation of XML documents into different forms
Rational's XL Development
Features
- an XML editor, that check for 'well-formedness'
- well-formedness ->
- XML structural conformance
- adherence to a DTD or Schema
- wizards for ->
- creating XML documents from DTDs & Schemas
- creating DTDs and XML schemas from XML documents
- converting between DTDs and XML schemas
- generating JavaBeans to represent XML data
- creating XSL
- a test and debug environment for XSL transformations
To do
1) Find the IBM Rational Application Developer V7.0 pdf
at the IBM 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) Decide when and how you are going to take the trial
version of IBM Rational Application Developer V7.0.
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.