So you want to build a
robot that walks around
and bumps into things.
But that's not enough for
you (this is the year
2000, after all); you
also want to control your
robot over the Internet.
What's more, you want to
use Java to control it.
It began sometime in late
'96 or early '97 JDK
1.0 still ruled and
Tandem was still called
Tandem, not Digital or
Compaq when people from
IBM, Tandem and Oracle
met and started to muse.
Before we start on the
technical front, let me
tell you about my latest
acquisition. I recently
went out to purchase a
watch. My wife wanted me
to buy one of the fancy
ones, but I'm more
excited by watches that
have all the features
stopwatch, backlight,
barometer, altimeter,
everymeter and the time
displayed in BOLD DIGITAL
NUMBERS. I usually end up
using maybe three out of
a hundred features, but
at least I have them.
One unfortunate aspect of
the many enterprise APIs
and specifications that
Sun has released over the
last few years has been
the lack of information
about how some of these
APIs interact with one
another. In particular,
two very useful
specifications the Java
Messaging Service (JMS)
and Enterprise JavaBeans
(EJB) have been
released and already
implemented individually
by many application
server vendors. What
wasn't considered in this
process, at least at this
stage, is how the two
would (or should) work
together. Enterprise
JavaBeans is a
server-side component
architecture, which
provides remote,
distributed, secure
objects with built-in
transaction support. JMS
is a portable messaging
service architecture and
API that provides for
persistent,
point-to-point or
publish/subscribe
messaging with
transaction support.
Developers at some point
in their careers will
find themselves standing
at the whiteboard, trying
their best to regurgitate
some complex development
design they've spent all
night working on. This is
usually done with a
series of strange
symbols, arrows and
scribblings in an attempt
to convey the clarity
that may lie in the head
of said developer (unless
of course he or she
doesn't know what exactly
the design is supposed to
look like). Either way,
you have the same
problem.
A common set of
programming problems
drove us to develop a
Java class we call
PropArgs. Consider the
following questions a
programmer may want
answered about a program:
Which RDBMS instance
should data come from?
Does this particular user
have any personal
preferences I should be
setting? Should debugging
code be executed during a
particular run of a
program? Are there
different execution paths
based on the current
operating system? Should
the programmer be
operating in batch or
interactive mode? What
directory should disk
output be written to?
Most Web-based
applications today
confine users to the
frame of their browser,
restricting them to
viewing only one Web page
at a time. Technologies
such as JavaScript make
additional browser
windows possible, but
this approach doesn't
enable the kind of
customized menus,
toolbars and windowing
features available in a
traditional client/server
application. Java Swing
provides additional
capabilities such as the
ability to create windows
outside the browser that
have the look and feel of
a traditional client
application. The
techniques described in
this article can be used
to migrate traditional
client/server
applications to a
Web-based environment.
Say you're writing an
Enterprise JavaBean that
represents a persistent
object, such as a
customer or a product.
You have two choices for
getting data (such as
customer name and product
number) from the bean to
the database and back:
Twenty years after it
first made waves,
rule-based technology is
making a comeback. Java
developers with an eye on
the e-commerce market are
becoming aware of how
integrating business
rules and objects in Java
can help expand Java into
new niches within
Web-based applications.
This article discusses
how rules fit with Java,
the types of rule engines
available and how a rule
engine is used to execute
rules for integration
into a Java applet or
application.
XML has become the
standard format for B2B
data exchange. To
actually implement such
exchanges, however, the
programmer must provide
data transport and
translation services.
Java-based messaging
provides an ideal
transport for XML. This
article explores how to
use a Java messaging
server as the
infrastructure for
exchanging XML data
between B2B participants.
If you know SQL and Java,
and you want to learn
SQLJ, this series of
articles is for you! I'm
going to introduce SQLJ,
the standard for
embedding database SQL
statements in Java
programs. You may be
familiar with JDBC, an
API for talking SQL with
the database. SQLJ takes
many ideas from JDBC
further by providing a
language interface for
SQL statements in Java.
This allows programmers
to concentrate on what to
say, not how to say it.
With the proliferation of
Java-based application
servers at the core of
today's Web applications,
the preferred Web
architecture that has
emerged places Java in
the middle tier,
gathering data from
myriad sources, and HTML
presenting that data
through a Web browser.
This article is Part 3 of
an interactive series
that discusses the many
languages that compile
and/or run on the Java
platform. Java
Developer's Journal
invites you to vote for
your favorite non-Java
programming language in
the JDJ forum. Your vote
will decide which
languages will be covered
by the series, and in
what order. A lot of
languages work in the
JVM, but this series will
cover only the most
popular, as determined by
your votes.
They're one of the most
commonly used computing
tools in business today,
regardless of a company's
revenues or number of
employees. Wall Street
money mavens use them,
and so does your hometown
accountant...spreadsheets
. Did you ever tweak
spreadsheet formulas to
play "what-if"
games with your stock
portfolio? Have you ever
received an e-mail with a
spreadsheet attachment
full of sales figures or
forecasts? And by the
way, how did your friend
send you the results of
this week's fantasy
football league?
EJB servers are
transactional servers
that allow developers to
concentrate on business
logic. The EJB model
implements two-phase
commits, transaction
context propagation and
distributed transaction,
although it's up to the
vendors to decide which
technique to use. A
transaction is formally
defined as an
"ACID" (atomic,
consistent, isolated,
durable) unit of work.
As a consultant,
developer and database
administrator, I've often
been asked to provide
coding guidelines and
tuning assistance for
Java code that utilizes
JDBC. Over time, I've
been introduced to or
developed standard coding
practices that make JDBC
code faster and less
error-prone, and easier
to read, understand and
use. This article
documents some of the
more important "best
practices" for using
JDBC libraries to perform
database access. As most
of my clients are using
Oracle database
technologies, I've
included several
practices that are
Oracle-specific.
In this article we're
going to describe a tool
that we've created to
help OO newcomers
understand the
class/instance
relationship, inheritance
between classes and
linking between
objects...by
automatically converting
an object graph into
HTML. The tool we've
created is based on the
"circlegram"
idea used by almost every
object-oriented teacher
during conventional
"chalk and
blackboard" lessons.
Several folks in the
computing industry think
of 1999 as having been
the "Year of the
Application Server."
But while the term
application server itself
may be a fairly recent
addition to the software
computing vocabulary, the
application server market
has already become one of
the fastest-growing
markets in n-tier
computing. Business
analysts estimate its
value as being likely to
reach the
multibillion-dollar level
in 2001.
Java programmers have
been anxiously awaiting
the release of the Java
Media Framework 2.0 for
more than a year. Not
only does JMF 2.0 finally
let you capture audio and
video content, but it
claims to solve the most
irritating limitations of
the JMF 1.x release. Does
JMF 2.0 live up to its
hype? This article
explores the new features
and reveals whether this
release was worth the
wait.
Exception chaining (also
known as 'nesting
exceptions'), is a
technique for handling
exceptions. A list is
built of all the
exceptions thrown as a
result of a single
originating exception as
it's converted from lower
to higher levels of
abstraction. It can be
used in both client and
server environments to
greatly simplify software
debugging without adding
undue complexity. This
article discusses good
exception-handling
techniques and shows how
to implement and use
exception chaining.
The use of Java in Web
browsers has had mixed
results. Applications
that run in browsers
rather than locally find
a host of different
hurdles. They're more
restricted, run slower at
times and take a long
time to load, thus making
complex applications more
difficult. Advances in
security and virtual
machine technology have
addressed the first two
items. The third item
remains somewhat
challenging. Faster
modems, increased
bandwidth and compressed
file formats alleviate
the problem somewhat but
their impact varies. When
fourth-generation
browsers appeared, they
included some new
technology with features
that allowed developers
to have their applets and
supporting classes
installed permanently.
What This Series Is
About. This article is
Part 2 of a series that
discusses the many
languages that compile
and/or run on the Java
platform. This is an
interactive series. Java
Developer's Journal
invites you to vote for
your favorite non-Java
programming language in
the JDJ Forum. Your vote
will decide which
languages will be covered
by the series, and in
what order. The last time
I checked, JPython and
NetRexx were neck and
neck. NetRexx, though not
mentioned previously,
will be covered in the
next article.
The Java servlet API
specifies a very
lightweight framework for
developing Web
applications. Although
servlet technology is
just one of the building
blocks in the J2EE
architecture, developers
often use servlets to
build full-fledged Web
applications. Today
several vendors and
organizations provide
servers and containers
that implement the
servlet API. For an
overview of the servlet
programming model, and
some of the advanced
features of Java
servlets, refer to Part 1
of this article (JDJ,
Vol. 5, issue 2).
Enterprise JavaBeans are
being promoted as the
component architecture
for the new decade. The
word Enterprise in the
name would imply that
EJBs are to the server
environments what
JavaBeans are to client
computing. Both are
component models, both
are for Java, both try to
deliver on the promise
"write once, run
anywhere." Beyond
that, however, there is
little commonality
between them. EJB is not
actually a software
product but rather a
specification of a
server-side component
architecture, to be
implemented by vendors of
server software. The
specification combines
object distribution with
transaction processing
and persistence. Its goal
is to provide a standard
architecture for building
scalable, portable and
distributed enterprise
systems.
RTP and RTSP: Protocols
that address the
transportation of
multimedia content over
IP. The Internet is
strewn with multimedia
minefields. Lost or
out-of-sequence packets
and transmission delays
can create havoc in your
applications.
Fortunately, you can
overcome these problems
by using protocols
optimized for multimedia
transportation. This
article explains why
these protocols are
necessary, and examines
how the JMF implements
them and how you can use
them to spice up your
programs.
With the release of the
Java 2 Platform,
Enterprise Edition,
Java-based Web
application servers are
gaining in popularity.
Although application
servers have been around
for a few years, they
forced programmers to be
tied to a proprietary
API. Support of J2EE by
application server
vendors standardizes the
API we write to, easing
training, staffing and
support costs. Perhaps
most important in our
dynamic Web vendor
environment, writing code
to an industry standard
reduces the huge risk a
customer takes in
choosing a particular
vendor should that vendor
disappear.
A tip window (also known
as a tool tip window) is
a small popup window that
displays a single line of
descriptive text. Tip
windows are usually
displayed over toolbar
buttons to provide
textual help about a
toolbar button's
functionality. The tip
window control is
available for Swing
components via the
JComponent class's
setToolTipText() method;
unfortunately, the AWT
doesn't have an
equivalent control at its
disposal. This article
details the classes that
constitute my
implementation of an AWT
tip window control.
The multimedia objects in
Sun's Java Development
Kits are so primitive
that they're worthless
for serious development.
Fortunately, Sun has
overhauled Java's
multimedia capabilities
with the release of the
Java Media Framework. In
this article I'll explain
why the JMF architecture
is a significant
improvement and show you
how to use these objects
in your applets or
applications.
Back before Java became
popular, I was a C++
bigot. I programmed in
nothing but C++. I lived,
ate and breathed C++. If
it wasn't C++, it was
rubbish. I thought C++
was the alpha and omega
of object-oriented
programming. I had
"operator
overloading" for
breakfast,
"templates" for
lunch and "multiple
inheritance" for
dinner, and I always went
back for seconds.
In the last couple of
years Sun has introduced
a number of APIs targeted
toward enterprise
application development.
One of the most exciting
of these is the Java
Message Service, or JMS.
The JMS API is designed
to do for messaging in
the enterprise what JNDI
does for naming and
directory services and
JDBC does for database
access. JMS is an API
that's designed to
provide a common facility
for enterprise messaging,
leaving the underlying
implementation of the
messaging to whatever
application server or
other enterprise
messaging software
technology you wish to
use. This is an exciting
advance for those
involved with the
creation or use of
message-oriented
middleware (MOM) and
especially for Java
developers who need to
utilize such facilities
within their own
products. With JMS you
should be able to write
one set of code for
messaging against the JMS
API and then use it
across any messaging
system provider that
offers JMS support.
Despite recent
high-profile attacks,
application developers
often consider security
something to tack on at
the end of a project, and
history encourages this
approach. It's unusual to
see security considered a
fundamental design
element in a programming
language.
This month the Java
platform segues into the
new millennium. These are
very exciting times; 1999
was a crucial year in the
acceptance of Java in the
enterprise as one of the
key drivers of
e-business. It's ironic
that applets the
components of Java that
helped propel it into the
mainstream of Internet
applications currently
occupy a backseat in the
vehicle that propels Java
into the 21st century.
During the year gone by,
the focus was on
server-side Java, as
predicted last year by
several industry pundits
more precisely, on Java
in the middle tiers of
distributed computing.
Java programs can use the
JDBC API to access
relational databases,
thereby cleanly
separating the database
system from the
application. This
approach holds the
promise of cross-database
portability, i.e.,
"write once, run on
any database." In
practice, several
stumbling blocks stand in
the way of fulfilling
this promise.
There are several books
and articles out there on
dynamic-content
generation technologies
such as CGI, NSAPI,
server-parsed HTML,
server-side JavaScript,
Active Server Pages and
ColdFusion. Recently,
Java Servlets and
JavaServer Pages (JSPs)
have emerged as a very
popular technology and a
lot of material has been
written about them. Most
of the articles focus on
programming model
features,
ease-of-development
issues and integration
with tools. However, an
increasing concern of Web
site developers is to
develop sites that can
scale to a large number
of hits. This is
especially true of
corporate software
developers and those
building the brand-name
dot.com sites of
tomorrow. This article
focuses on how Web
developers can design
their server-side
applications for
scalability and
performance using Java
Servlets and JSPs.
Rumor, they say, is a
great traveler if
developers were in any
doubt about this, they
need only monitor the
worldwide rumor-mill
surrounding the rivalry
between Sun and
Microsoft
Is the writing on the
wall for Open Source?
This is an i-technology
tale involving Sun's J2EE
specifications, a
well-respected
Californian software
company, and the inflamed
passions of the
international OSS (open
source software)
community.
Full text of JDJ'S
exclusive interview with
Lutris's foremost critic,
George C. Hawkins. 'Their
behavior is a complete
slap in the face to all
those in the user
community' says Hawkins.
One of the great things
about the JavaBeans
specification is the
flexibility it affords
component developers in
how they package their
beans. As a bean
developer, all you need
is a class with a
no-argument constructor
that supports
serialization and it's a
bean. If you follow some
simple naming
conventions, most
integrated development
environments (IDEs) can
tell enough about your
bean to be able to use it
for visual application
development. While this
is sufficient for some
simple beans, the beans
specification also
provides ways for bean
developers to explicitly
give information that the
IDE can use to assist the
application developer in
using the component. This
article explores some of
the ways that bean
developers can make their
components more usable by
application developers
through the use of custom
property editors and
customizers.
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