The Source for All Things Java

Joe Winchester

Subscribe to Joe Winchester: eMailAlertsEmail Alerts
Get Joe Winchester via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Top Stories by Joe Winchester

The key to building a distributed application successfully lies in a sensible partition of work across the different boundaries and devices. With a client/server program, one of the advantages it offers over a more traditional thin client is that for each task, instead of having to wait for the server to page the application back into memory, process the results of the display buffer, and prepare output, the PC is able to offload some of the validation and processing locally. Not only is this more responsive to the user, but it makes sense to have a physical division of responsibilities in which code logic is executed closest to where relevant resources lie. Field-level validation, defaulting, and completion of values can all be done on the client. Even where such processing requires trips to the server, an atomic call to the server on a text field's focus-change e... (more)

E-mail - Problem Solved or Created?

At the annual Alan Turing memorial lecture given by Grady Booch in London last month, he chose as his subject, The promise, the limits, and the beauty of software. It was an excellent address in which one of the themes was that for each of the incredible advances that software has brought to our lives, there is an almost Newtonian opposite effect that is negative and destructive. One such example given was e-mail: while making us able to communicate instantly with our peers, allowing effective and immediate information sharing, it brings its own set of problems. Issues with inf... (more)

Should Java Assert that Network I/O Can't Occur on the UI Thread?

Doing network I/O on the user interface (UI) thread is bad. Most developers know that and can tell you why; unfortunately, it's still done. At this year's JavaOne, one of the keynote JavaFX demos bombed because the network was slow, something that would be forgivable had the entire application's UI not frozen, which required it to be restarted, only to trip up again a few minutes later. A colleague of mine who was watching the demo suggested that the Java language should assert that network I/O cannot occur on the user interface thread. At first I thought this kind of extreme, b... (more)

SpringLayout: A Powerful & Extensible Layout Manager

The task of a layout manager is to position and size each component based on the size of its container. Each component has a preferred size that can be used to determine the real estate it wishes to occupy, as well as a minimum and maximum size. The preferred size is especially useful for components that contain user-visible strings whose size can change between development and deployment due to different fonts or different locale values, as the GUI is dynamically translated through resource bundles. Layout managers are powerful classes for dynamically recalculating the size and... (more)

XML Serialization of Java Objects

Java serialization was initially used to support remote method invocation (RMI), allowing argument objects to be passed between two virtual machines. RMI works best when the two VMs contain compatible versions of the class being transmitted, and can reliably transmit a binary representation of the object based on its internal state. When an object is serialized, it must also serialize the objects to which its fields refer - resulting in what is commonly called an object graph of connected components. Although the transient keyword can be used to control the extent to which the s... (more)