The Challenge of Java
Integration with Legacy
Assets Organizations are
developing a new class of
electronic business
applications, using Java
to capture new business
logic. In some cases
these e-business
applications ,have gone
beyond just successful
deployment to redefining
the competitive
landscape. Examples are
package tracking, home
banking, travel services,
automobile purchasing,
home shopping, customer
support, billing, global
securities trading and
publishing. The driving
forces behind these
applications are
increased competition in
growing markets and the
need to reduce costs in
services and support.
Because e-business is a
significant part of the
business image in
competitive markets,
demand for higher
performance and
reliability is
continually increasing.
In recent days, CORBA has
fast become a standard
for the development of
distributed applications.
A CORBA application may
consist of one or more
CORBA server objects and
many clients who connect
to these servers. A CORBA
server object makes
itself available to the
client by registering
with the CORBA Naming
Service or a CORBA Trader
Service. A client locates
the desired server object
on the network by using
this Naming or Trader
service. Once the server
object is located, the
client receives a
reference to it. Using
this reference, the
client can invoke methods
on the server object and
carry out its desired
work. Thus it's the
client that usually makes
use of server facilities;
the server simply returns
the results of method
invocations to the
client. However, in some
situations, it may be
necessary for the server
to invoke a method on the
client object. For
example, the server may
like to notify the client
of the occurrence of a
certain event on the
server or the completion
of a processing job
requested by the client.
This method of invocation
on the client is called
Callback. CORBA
specifications allow
Callbacks on clients.
This article discusses
the implementation of
CORBA callbacks using
Java.
Persistence is our way to
fight the decay of time.
We take pictures and film
events in order to
remember, review and
analyze them. We freeze
perishable products in
order to preserve or
transport them over long
distances. And in much
the same way, computer
users save ideas and
programs as files on hard
disks and transmit them
over networks so that
they too can be printed
and preserved - persisted
- over time.
In the previous two parts
of this three-part
article (JDJ Vol. 3,
Issue 12 and JDJ Vol. 4,
Issue 1), we looked at
the fundamentals of
programming with Java I/O
streams and the various
APIs they can be used
with. This month we'll
conclude this article by
discussing the concept of
writing custom (or,
specialized) stream
classes that can process
(or, filter) data in a
special fashion.
Program correctness may
be viewed as proof that
the computation, given
correct input, terminated
with correct output. The
person who invokes the
computation has the
responsibility of
providing the correct
input, which is a
precondition. If the
computation is
successful, we say that
the computation has
satisfied the
postcondition. The Eiffel
programming language
(www.eiffel.com) for
example, encourages
programmers to provide a
fully formal proof of
correctness by writing
assertions that may
appear in the following
roles
Do your Java applets and
servlets need to read and
write files stored on a
server elsewhere in the
network? If so, you need
NFS, a fast file-access
protocol that is destined
to become a standard for
file access over local
area networks (LANS) and
the Internet.
This is the first in a
two-part series on Event
management in large
distributed applications
built on top of
Enterprise JavaBeans
(EJB). This installment
will cover the
architecture and the
implementation of a local
(single VM) version of
the event distribution
system. The second
article will implement an
EJB version of the system
that will handle
distributed events from
remote VMs.
This article describes
our use of design
patterns to create an
interpreter in Java, and
shows how it can be built
in a "pure,"
object-oriented fashion.
.The patterns we use are
from Design Patterns:
Elements of Reusable
Object-Oriented Software
by Gamma, Helm, Johnson
and Vlissides, published
by Addison Wesley in
1995. (We'll refer to
this book henceforth as
DP.)
As Java takes a leap
toward the next
generation of enterprise
computing, enterprises
get ready to deploy
large-scale business
applications using Java.
This article describes
how the new Enterprise
Java-Beans (EJB)
technology from Sun
Microsystems can be
instrumental in building
distributed enterprise
applications. We'll first
look at the application
server implemented by
Weblogic, which uses EJB
technology to provide
business solutions. Then
I'll discuss how this
powerful technology can
be used in the context of
a true distributed
environment such as
CORBA.
Last month's issue (JDJ,
Vol. 3, Issue 12)
covered the basic
concepts of programming
with Java's I/O streams,
such as the difference
between byte and
character streams, the
various stream classes,
the concept of stream
chaining and more. We'll
conclude the subject this
month by looking at some
practical uses of these
streams.
It's true that you don't
need a computer degree to
know how to program.
However, to do it with
the kind of quality that
allows for easy
maintenance and change is
another matter. As we all
know, based on Software
Engineering (SE)
principles, a software
product's life cycle
consists of analysis,
design, implementation
and testing.Most people
seem to spend the
majority of their time on
the latter two phases
while forgetting about or
putting less emphasis on
the former two. This is
wrong, especially in the
implementation phase.
Implementation should
constitute the smallest
part of the whole
development time. Part of
the reason why
programmers have to spend
so much time and effort
on the implementation -
and then later on the
testing - is from not
having a good design in
the first place.
Hypertext is wonderful.
It allows the Webmaster
to link from any page to
millions of other
computers all over the
world. Unfortunately, the
Web pages you find will
only have the links that
were placed by the
Webmasters. What if you
want more information
about a word or a phrase
on a page and there's no
link?
Sometimes Java applets
continue their execution
even after the page that
contains them is no
longer visible. Run a few
of them and your computer
will slow down
dramatically. If you
continue you might need
to reboot the system to
avoid a crash. So you
disconnect, reboot,
reconnect and start all
over again. Isn't it
simpler to just disable
the applets?
When you see the words
Java database
application, you probably
start thinking about
enterprise-level
solutions with multitier
architectures and
distributed deployment.
But Java is a great
general-purpose,
object-oriented language
and thus a good choice
for developing smaller
scale, stand-alone
database aplications as
well. You can enjoy the
benefits of programming
in Java regardless of an
application's scale or
deployment.
Most programs use data in
one form or another - as
input, output or both.
The sources of input and
output can vary from a
local file to a socket on
the network, a database,
in memory or another
program. Even the type of
data can vary from
objects and characters to
multimedia and more.
The Internet is rapidly
evolving from a static,
stateless,
information-exchange
medium to a dynamic
transactional medium that
offers new opportunities
to change how we do
business. To exploit
these opportunities,
leading-edge independent
software vendors and
corporate IT
organizations are
beginning to build and
deploy enterprise
applications using open
Internet standards. They
use standard Internet
browsers and HTML as
clients, model their
business logic in Java
and access these
applications via open
Internet communication
protocols such as HTTP
and IIOP. They deploy
applications on a small
number of professionally
managed, highly scalable
and high-performance
application servers and
database servers.
So I get to the office in
the morning and see Mr.
Job Prospect's résumé
lying on my desk. That
gives me about 20 minutes
to think of interview
questions I'd like to ask
him. A quick scan of the
résumé reveals that he's
done some serious work in
Java that includes
programming with JFC,
JavaBeans, Java threads,
Java Applets - the works.
As usual, I decide to
play devil's advocate.
That always throws them
for a loop.
A layout manager is an
object that positions and
resizes components within
a display area according
to a specific algorithm.
The Java 1.2 AWT package
provides 10 layout
manager classes that can
be used to accomplish
this task. Each has a
defined set of behaviors
that organize components
in a container. Each Java
container instance is
associated with an
instance of one of these
layout managers. By
nesting one
container/layout manager
combination within
another one, complex
screen layouts can be
implemented.
We all know what AWT is.
We know that AWT 1.0 is
simple and easy to use.
It's compatible with the
old versions of the Web
browsers, but has an
inefficient
event-handling model. The
events are received by
the components, which
handle or ignore them.
Worse, if you want to add
a small functionality to
a component, you have to
create a new class of
components. AWT 1.1
corrects these defects.
It's a little more
complex, but has many
advantages. The new
delegation-based event
model plays a key role in
the JavaBeans
architecture as it
facilitates the
communications between
beans. Design patterns
allow the development
tools to use reflection
to become smarter. With
AWT 1.1 you can create
lightweight components
(like those of Swing)
that are serializable so
you can create persistent
user interfaces. The
delegation-based event
model allows programmers
to isolate the
application logic from
the user interface and
improve UI performances
of the applications.
Henry Ford revolutionized
manufacturing with the
first automated assembly
line in 1913,
incorporating the latest
time-study theories to
make Model T's flow
through the system
"like the flow of
water through a
pipeline." His
engineers and foremen
repeatedly analyzed every
task in the assembly
process to find ways to
save valuable inches and
seconds.
Persistence in Enterprise
JavaBeans is encapsulated
in the notion of
EntityBeans. This
article describes bean-
and container-managed
EntityBean persistence
and the relative merit of
these techniques with
respect to portability,
productivity and
performance.
As Java matures, new sets
of behavior added to its
API allow developers and
programmers to write more
sophisticated programs
with less difficulty.
This article focuses on
collections API, a new
abstract data structure
that will be a part of
the core Java Development
Kit (JDK) 1.2 API. (The
collection classes are
also available as an
add-on package for the
JDK 1.1 class libraries.)
Developing and
maintaining distributed
business applications is
hard. As if writing
business logic weren't
hard enough, enterprise
application developers
have also been saddled
traditionally with the
daunting task of
implementing transaction
management, persistent
state management, thread
safety, resource pooling,
security, distribution
and life cycle/location
of business objects. This
makes enterprise
application development
more time-consuming and
costly, and requires a
broad range of expertise
from the development
team.
Java servlets provide a
new way to develop
server-side solutions.
They provide the features
of traditional CGI
scripts with the
additional benefits of
efficiency and
portability. Currently,
major corporations are
making the migration from
CGI scripts to Java
servlets. As a result,
the demand for applet and
servlet communication is
on the rise.
I'm starting my computer.
I'm waiting for the
operating system to be
loaded. Now I can see the
icons of my favorite
applications. They're
aligned on my desktop and
in the same positions I
left them.
Java brought garbage
collection to mainstream
programming. Never before
have commercial software
developers been so aware
of the need and benefit
of using a collector.
Notwithstanding, the
benefits of garbage
collection in Java are
far from being completely
realized. As larger and
more complex applications
are built in Java, it's
becoming apparent that
some very flexible memory
management schemes are
both needed and possible.
It's widely known that an
applet isn't allowed to
create a network
connection to a computer
that's not the one from
which the applet itself
was loaded. This has led
to the idea that two
applets aren't allowed to
communicate directly with
each other unless they're
located on the same host.
This article provides a
brief overview of Java's
Remote Method Invocation
(RMI), describes a small
conferencing program and
shows how direct
applet-to-applet
communication can be
established with RMI.
When Sun Microsystems
introduced the Java
programming language in
May 1995, it handed
developers the
programmer's equivalent
of the holy grail. Java's
promise of write once,
run anywhere proved real.
For the first time,
developers could write
their source code just
once, run it across
multiple platforms
without modification and
generate bit-for-bit
identical results. Now,
less than three years
later, Java technology
has become more than just
a wildly popular
development environment;
it has enabled the
creation of a whole class
of new computing devices
called
"thin-clients"
that were not imaginable
three years ago.
This article tries to
take the mystery out of
the black art of
developing layout
managers. Much of the
coverage in books and
magazines typically
centers on trying to
wrench the complicated
GridBagLayout into
submission or
demonstrates the
development of a layout
manager with virtually no
practical use. In the
real world of software
engineering, the need for
applicable solutions
takes precedence. This
article will add a trio
of reusable classes to
your inventory and,
hopefully, a few
techniques to your
personal bag of tricks.
Version 1.0 offered
developer productivity,
ease of use and powerful
features. Now, with a new
high performance
compiler, connections to
more enterprise systems,
team programming support
and exploitation of the
latest in Java
technology, VisualAge for
Java, Version 2.0, looks
like a great choice for
Java programmers.
So you joined a startup.
You have plenty of stock
options, a new company to
build and a lot of work
ahead of you. What's
motivating you is the
challenge and the chance
to learn and grow. But be
honest. You really want
your stock options to be
worth something one day.
You want to get
rich here.
The JECF provides
services (application
programmer interfaces) on
top of Java for creating
payment and financial
applications. The current
version (beta release
0.8) provides services
such as graphical user
interface, secure
encrypted database,
capability mechanism,
access to cryptography,
applets and
infrastructure for
purchasing.
Undoubtedly, the support
for distributed
transactions is a part of
any enterprise system.
Part One of this series
(JDJ, March 1998)
explored the X/Open
Distributed Transaction
Processing (DTP) Model -
a common model for
distributed transaction
processing. We also
explained the concepts of
Microsoft Transaction
Server (MTS) that quickly
become de facto standard
for developing business
components on the Windows
platform. We demonstrated
how to write
"first-class"
MTS COM components in
Java. The described
process of creating these
components has been
greatly simplified by the
release of Microsoft
Visual J++ 6.0.
Visual Age for Javaª
provides a good IDE for
object oriented
development. One of the
strong points of Visual
Age for Java is its
support for JavaBeans. As
everyone in the world
knows by now JavaBeans
are components, or
software parts, from
which applications can be
built. This has been the
holy grail of
object-oriented
development, and Visual
Age for Java supports it
well. It provides a
convenient,
connect-the-dots metaphor
for assembling an
application from parts.
Object-oriented software
development using Sun
Microsystems' Java
language has become an
industry standard for
building scalable
enterprise client/server
applications.
Additionally, most online
transaction processing
(OLTP) applications
developed today by
enterprises use
relational databases as a
standard DataStore,
forcing developers to be
proficient in the details
and intricacies of both
relational database
design and
object-oriented
programming. They also
must contend with mapping
objects to relational
schema, object management
and caching, object
navigation, transaction
and concurrency controls.
However, until recently
developing Java
applications with
relational databases has
been a time consuming
process for developers.
There is no doubt that
Java holds tremendous
potential in bringing
sophisticated behaviors
and networking to VRML 2
worlds. The debate is
over how to add the Java
and how much control the
Java should have over the
VRML. There are two
approaches to using Java
to extend VRML 2 worlds
which have been
popularized by VRML
technologists. A third
approach, which will
allow programmers to load
a VRML 2 file directly
into a Java 3D API and
manipulate worlds
completely in Java, is
just on the horizon. This
article looks at the
potential of the External
Authoring Interface
(EAI), reviews when best
to use the EAI, shows how
to use the EAI and
provides a complete
example of virtual
kaleidoscope application
which is appropriate for
the EAI.
The purpose of this
article is to explain how
to change the appearance
of some shapes as a
result of the user
clicking on one of them.
This article assumes that
you are a beginning VRML
developer. VRML and
JavaScript One is a
language used to describe
3D worlds while the other
is the most popular
scripting method for the
Internet. When you put
these two together you
get a way to change the
attributes of the virtual
world as the result of
outside events. The new
VRML 2.0 standard finally
offers the VRML developer
avenues to create
interactivity within the
VRML world as a result of
user activity. This
powerful and flexible
ability is made possible
by the new Script node
that basically allows the
programmer to use code
that does not exist
within the native VRML
syntax.
As it turns out,
designing and
implementing this wizard
framework exposes many of
the real-world design and
programming issues we
face when creating Java
applications. Overview
The first step in
designing our wizard
class is to come up with
an interface. An
interface is a prototype
for a class in which we
describe the class'
functionality without
getting into
implementation details.
When designing an
interface, think about
how someone would use the
class and jot down some
pseudo-code. Translate
these ideas into member
functions to create the
interface. One thing to
remember is that the
initial pass at an
interface will rarely be
the last. You will
probably end up modifying
and improving the
interface several times
during the course of
development.
Since a middle tier isn't
much good without
something for it to talk
to, we're going to use
the Pubs2 database, which
is an example database
provided with Sybase SQL
Server 1.1 Specifically,
we'll use the authors
table which is described
in Figure 1. Imports:All
of the example code is
written in one file. It
provides methods to do
select, insert, update
and delete on the authors
table. To work with
Jaguar, in addition to
whatever usual imports
you use, you must import
a number of packages
developed by Sybase. For
our example, we use what
is shown in Table 1.
I took the advice of a
friend of mine and
steered clear of the
'normal' movie theaters
and went a little out of
the way to go to a DLP
movie theater. The
experience
There are 8,909 books
listed on Amazon.com with
the word 'Investing' in
the title; there are(!)
27,146 books with the
word investment in the
title. Without having lo
This book is an update of
an earlier version that
was written for SQL
Server 2000. It employs
the Murach approach of
dual pages that repeat
and enhance the concepts
Reviewers overuse the
phrase 'required
reading,' but no other
description fits the new
book 'Ajax Security'
(2007, Addison Wesley,
470p). This exhaustive
tome from B
In my many years of
programming, almost 20
years now, I have used
countless integrated
development environments
(IDEs). I have used
everything from a simple
text edi