XMLBeans in Ruby

the real fun stuff is Ruby metaprogramming
January 2006 - The transition from Ruby to Java isn't all that big a leap. But the ability to perform metaprogramming operations is vastly superior to Java's reflection API. This is, of course, mainly a feature of Ruby's ability to evaluate code at runtime vs. Java's compile-type mode.
Article    

Beyond Java Buzz

who isn't talking about Ruby?
January 2006 - Ruby on Rails is hot and Bruce Tate has written a noteworthy tome around it. In this presentation, I take his major topics and tell my own story about what works and what doesn't in Java.
Presentation    

Report Writer for Struts

too many Actions in your reporting app?
December 2004 - Struts is a major player in the Java web application space. Just about every project I've run into lately is sporting a fierce collection of Struts Action and ActionForms. When it comes to trying to use Struts to represent a large collection of read-only data, you need to go into design mode.
Article    

Use SWT for Data Entry

a SWT version of a classic...
June 2004 - I've just published an article for Javaworld.com on putting together the classic data entry screen using the Standard Widget Toolkit. One topic that might be of interest is the read-only Table that allows you to select a row and move to an Edit screen.
Article     source code

Presentation
Also, here's a presentation called "Getting Started with SWT" for the Central Iowa Java User's Group". It's all HTML, so have a look....
Article     source code

SqlView goes SWT

delving into a more complex SWT GUI...
May 2004 - Recently, I have become enamored with SWT, the open-source toolkit that drives Eclipse. It is fast, lightweight, flexible and -- sad to say, but I will say it nonetheless -- much more visually appealing that either AWT or Swing. I wanted a more complex application to see if it really worked. SqlView is a database query tool that I use every day and it seemed like a good candidate for a makeover.
Article     source code

Getting Started with SWT

A great library for building GUIs using Java...
April 2004 - Unlike AWT or Swing, SWT is a much more direct implementation of Java calls to native windowing APIs. The result is Java GUI applications that have the appearance of native window applications on Windows, Linux, Solaris, AIX and other operating systems. These apps are fast and relatively easy to put together.
Article     source code

Query Java objects with Jython

Tired of typing braces? Think about scripting...
March 2004 - Jython has the feel of a very powerful, fully-featured language. It is an implementation of Python written in Java -- one that lets you access Java objects. You can start being productive within a few short hours, because it shares that Python trait of doing the simple things very simply!
Article     source code

Intelligent code with Hexapawn

first steps in adding computer learning to your programs...
February 2004 - This article delves into a style of program design that starts up without pre-ordained strategy-type knowledge. It features a program -- in this case a chess-type game -- that can train itself using simple, straightforward techniques. If you haven't yet taken the AI plunge, you might think this is a good place to start... Perhaps you can beat the robot!
Article     source code

Function-Oriented Java

some initial chapters in a new book...
January 2004 - Recently, I've been working on some new projects. One of them is a book on approaching Java code as "services". Function-Oriented Java addresses the old question: why does it take so many lines of code to open a file in Java? Sometimes the criticism is justified. Just when you are becoming really productive, you have to stop and research something that should really be just there, ready to drop in your application. Here, I present a series of common functions -- everything from opening files to sending e-mail to finding files in zips.
Introduction and TOC     source code

JDBC Database Metadata

viewing database structure through a simple API...
October 2003 - I've recently been using the SqlView JDBC GUI to read and update a DB2 database at work. This Swing utility is great for issuing SQL and displaying resultsets, but doesn't provide much help in viewing the stucture of the database.
The Database Metadata viewer provides 4 text boxes that allows you to obtain the entire structure of a database in a simple resultset that is displayed in a JTable. The JDBC interface is simple enough -- there are only 4 inputs. It's the Swing JTable that confounds and confuses!
Database Metadata source and binaries     An updated SqlView zip archive

Object Relational Mapping with Toplink

fun and games with an Object Relational Layer...
Sept 2003 - Object relational mapping tools are designed to encapsulate database access within a layer that maps database tables and columns to objects and attributes. Along the way, you get some nifty optimizations like data caching and automagic updating.This is the text of a presentation I gave at the Central Iowa Java Users' Group. It features a brief overview of creating Sockets in both the old and new packages.
Article     Presentation zip archive

Sockets in the IO and NIO packages

a presentation on the NIO packages in JDK 1.4...
May 2003 - This is the text of a presentation I gave at the Central Iowa Java Users' Group. It features a brief overview of creating Sockets in both the old and new packages. As always, there are sample code snippets.
Article     Presentation zip archive

HttpProxy server revisited

debugging your http requests and responses...
Feb 2003 - To really understand HTTP POST and GET requests, it is helpful to inspect the streams that pass between web client and server. A proxy server capability like this one gives a developer a direct view.
Article     Source Code

FindClassInJar utility

finding that missing class file...
Dec 2002 - Sometimes a simple utility can be very useful. FindClassInJar is a prime example, particularly if you are trying to piece together a classpath and keeping getting "ClassNotFoundException" errors in your appplication. FindClassInJar will use the java.util.zip package to rummage through a lib directory for zip or jar files containing the file you are missing. When it locates the first entry, it tells you to look in that file. The utility is aimed at Java developers looking for class files, but could be used to search for any file name in a directory of zips or jars.
Source Code

PDF Report writer

an xml config file is the GUI for this report writer...
Oct 2002 - After a lot of experimentation with iText, an open source PDF writer package, I wrote an XML-reading layer to allow users' to set up data and formatting configuration, specifying everything from JDBC parameters to the font size of a particular column.
Article     Source Code

Optimizing SqlView

some new features affected performance...
July 2002 - I built SQL View to resemble the query features of Toad, DB2 Command Center and SQL Server’s Enterprise Manager. However, one new feature -- my attempt to line up columns in the results pane -- seriously slowed down the display. So I tried a couple of approaches to speed things up...
Article     Source Code

Coding...a writer's art

or how a coder feels about his prose
April 2002 - Although you read a lot about programming as an engineering activity, writing code is a lot like writing prose. This article talks about how coding and writing are similar. As well, you get to see how both the code author and the prose author ensure they produce a quality product.
Article

Report Writer JSP Tag

format database reports by example
January 2002 - Use the functionality of Java Server Pages 1.1 tag libraries to put together attractive reports using HTML tables.
Unlike other JSP tags making the rounds these days, this one promises quick functionality. You format an example table using a product like Dreamweaver or WebSphere Studio and the tag takes the example and applies it to the report.
Article     Source Code

Proxy

a socket sniffer...
November 2001 - This code snippet is a minimally functional proxy server. It grew out of a desire to sniff/debug traffic going between MS SQL Server and a JDBC driver. The idea is simple: set the URL string of the JDBC connection to the Proxy server. You can pick any port and point the Proxy's target server and port parameters to the SQL Server.
What you get is the ability to take mainly character-based traffic out of the socket streams for observation. The JDBC driver in question didn't get much beyond the initial handshaking stage since the input socket from the driver lists its target server URL. When SQL Server discovers the traffic is being re-directed, it closes the socket...
This implementation logs the character traffic to System.out, but you can re-direct to a File or any PrintWriter.
I have also tried this Proxy going against HTTP traffic and - once again - it works well for initial traffic. Of course, this version doesn't look in the stream to read the HTTP header, but this could be easily implemented.
Here's how it works. Run the proxy with the following parameters :

ie, java -classpath "proxy.zip" Proxy 8088 mySqlServerBox 1433
sets the proxy listening on 8088 and redirecting to the Sql Server on its default port (1433). Source Code

SqlView

a JDBC client
October 2001 - When working with a number of JDBC data sources, using a variety of clients, it is often convenient to have a single JDBC client to allow you to verify a query against a particular data source. This utility will let you specify different data sources by altering properties. To use it, set up a java command line with your JDBC driver in the classpath and pass in four properties using the "-D" parameter: driver, url, username and password. I have tested this against SQL Server, but it should work against any data source. An added bonus is that you can pass in any Transact-SQL command and it seems to work... Source Code

Object Cache

building a simple object cache...
Sept 2001 - Someone I work with suggested that implementing an object cache would be a difficult and bug-prone endeavor. I thought it should be straightforward... Article  NEW...Source Code

HttpFileServer

a Java web server... for files
December 2000 - My recent adventures with web servers and IO streams got started with a book called Java Network Programming by Hughes, Shoffner and Hammer. The book spends its first 200 pages discussing every type of IO stream you might image -- all before it opens its first socket.... However, the extra work was definitely worth it all, as I discovered with this experiment. Article   Source Code

Date Chooser

adventures with java.util.Calendar...
March 2000
This type of Date selection GUI widget is an almost classic exercise for user interface developers. There are several approaches to the development of the interface, which shed a lot of insight into user interface design techniques. Perhaps the most intriguing is a design developed by Alan Cooper, which featured a rolling Calendar instead of a month-by-month display.
This Date Chooser is closer to standard, featuring a single-month display with a "rolling" feature, i.e., last month, next month, last year, next year. Article  Source Code

French Roast

java ide...
January 2000
In Feb 2000, my Java IDE FrenchRoast won honorable mention in the 2nd JavaWorld CodeMasters series. This was written in a two week period in December 1999. The judges didn't like the fact that it didn't meet all their reuqirements, but liked the design. Article  Source


Articles from 1999

WordFind applet An educational applet now residing mostly at Zeeks Zeeks.coma few other places, but you can get the source here.
Wizard... A template for creating a generic Java Swing wizard dialog class.
IO,IO... This is about the File class, not my credit history.