Build an object database, Part 2: Object storage backend
In the second of this two-article series, we implement relational database storage for the object-storing framework we developed last time. We then specialize it to support the open source MySQL database. Next, we plug the MySQL relational storage implementation into the object-storing framework and let it do its thing. (1,600 words)
Michael Shoffner and Merlin Hughes, April 2000

Build an object database
In this first of two articles, we look at implementing an object database frontend -- that is to say, a database frontend that can automatically map between Java objects and records within a relational database. Using this frontend you can, for example, store Java User objects in a relational database, where they will be automatically and transparently mapped between the native Java object representation and, for example, name, age, and gender fields within the database backend. (5,400 words)
Merlin Hughes and Michael Shoffner, January 2000

Multicast the chatwaves
In this article, Merlin takes you through the process of implementing a simple, multicast-based, peer-to-peer chat system. To make things more interesting, he'll show you how to implement two custom stream classes that simplify the process of communicating messages with a multicast group. (4,000 words)
Merlin Hughes, October 1999

Java 2 introduces print capability to the Swing Forum
This installment of Java Step By Step focuses on adding print functionality to a Swing application. Michael begins by covering the fundamentals of the new Java 2 printing system and its mechanisms. He then steps through the addition of background print functionality to the Swing Forum. (2,300 words)
Michael Shoffner, June 1999

Reading textual data: Fun with streams
JDK 1.1 introduced character streams to Java quite a while ago, nicely addressing the basic need for Java to be able to properly read and write character-based data and to properly decode a wide variety of byte encodings of a large number of character sets. Character streams closely mirror byte streams, providing a similar API and a selection of character-stream filters that correspond to the existing byte-stream filters. One notable omission, however, is an equivalent to DataInputStream: a class that can read high-level datatypes from a stream. The logical character-stream equivalent would be a class to read textual data and one to parse the character sequence "123" into the integer 123. This month, Step by Step columnist Merlin Hughes addresses this omission by developing a comprehensive character-stream filter for reading textual data. (4,500 words)
Merlin Hughes, April 1999

Use a RandomAccessFile to build a low-level database
This month, Step by Step's newest contributor, Derek Hamner, shows you how to use Java's low-level file access to build a simple database. He uses a RandomAccessFile to store and retrieve arbitrary record data, allowing serializable objects to be persisted to a file and then later retrieved via their key. He wraps up with a demonstration of how his example can be used in real-world applications. (5,700 words)
Derek Hamner, January 1999

Making the Forum Swing, Part 2
This second article in a two-part series demonstrates how to add event handling and networking to the newly resurfaced Swing Forum client. Michael begins by examining the JTree component, which facilitates user interaction in the Swing Forum. He then focuses on how the 1.1 event model and anonymous classes allow you to efficiently handle events. Finally, he guides you through the code changes to network the Forum. (2,500 words)
Michael Shoffner, November 1998

Making the Forum Swing, Part 1
JDK 1.2 is already in its fourth beta release, gathering steam for its full release sometime this fall. One of its key features is the now fully integrated JFC, which, with its Swing GUI library, will revolutionize Java GUI design and implementation. But why wait until fall? With Michael Shoffner's help, you can start today. Using the Forum application of past columns, this article explores the fundamentals of the JFC and Swing and demonstrates how to develop and deploy your own applications with these cutting-edge technologies. (2,900 words)
Michael Shoffner, September 1998

3D Graphic Java: Render fractal landscapes
In this second look at 3D graphics programming in Java, Merlin takes you through rendering 3D terrains. He'll step through the problem from the ground up, working through lots of fun mathematics and algorithms along the way. You may be thinking that the new Java 3D API is quite capable of automating most of the techniques discussed here, and you'd be right. But isn't it better to have the ability to assemble pictures from raw bits and bytes rather than relying on a toolkit? Merlin thinks so. (6,000 words)
Merlin Hughes, August 1998

Write a session EJB
Enterprise JavaBeans gives us the perfect excuse to revisit our Forum application. EJB's ability to handle messy infrastructure issues will help us quickly replace the current RMI backend with a session bean that provides the same functionality. Because it will use the EJB container's communications, scalability, and transactions support, the ForumSessionServerBean will be surprisingly simple to write. (3,200 words)
Michael Shoffner, July 1998

Draw textured spheres
This month, Step by Step columnist Merlin Hughes takes a slight change of direction, with a look at computer graphics programming. Specifically, he'll step you through the process of drawing textured spheres. Along the way you'll encounter algorithmic textures, spherical coordinate systems, ray-sphere intersections, perspective, shading, and supersampling. Oh, and of course Java's support for a simple raytracer. (5,000 words)
Merlin Hughes, June 1998

Write your own MOM!
In honor of Mother's Day, we're devoting this entire column to MOM -- message-oriented middleware, that is. This article investigates what makes MOM systems tick and how they relate to RPC-oriented systems such as RMI. Step by Step columnist Michael Shoffner takes you through the construction of a simple MOM (built on top of the distributed whiteboard implemented in past Step by Step columns) that passes user-defined objects around on user-defined channels. When you're finished reading this article, you'll know when MOM is appropriate as a distributed systems infrastructure, and you'll have a basic channel-based message-passing system that you can use as-is or extend. (3,500 words)
Michael Shoffner, May 1998

Release your inner poet: Use servlets to create a collaborative poetry app
The Internet can be a lonely place: lots of people, surfing the same Web sites at the same time, without ever getting to know each other. In this month's installment of Step by Step, we'll work to inject some community into the Web. Our medium? Networked, collaborative, poetry. Our technology? Servlets. (3,400 words)
Merlin Hughes, April 1998

Add the power of CORBA to our distributed whiteboard
Our last tango with our shared whiteboard app illustrated how to use servlets to implement a communications layer. This month we're going to move the communications layer to CORBA. CORBA provides a lot of flexibility and power to distributed computing. This month we'll make use of CORBA to transport serialized Java objects to and from an applet whiteboard client and a Java server. Along the way we'll cover the general steps needed to use CORBA as an integration technology for distributed applications. (3,500 words)
Michael Shoffner, March 1998

Draw the world: Create networked whiteboards with Java 1.1
Graphical applications programming has been greatly simplified with the advent of JDK 1.1. Specifically, the lightweight component framework allows transparent tools to be overlaid on each other, and the delegation event framework provides a much simpler event model. In this first of a two-part series, we'll look at implementing a simple whiteboard using these new features. Next month, we'll actually network the whiteboard to allow for multi-user collaboration over the Internet. Of particular interest in this application is our use of transparent lightweight components to provide the whiteboard tools with simple access to GUI events and display. (3,000 words)
Merlin Hughes, November 1997

Find more >

Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld