tcf{tc}

Solutions for modern developers

A Field Guide to Java Direct Web Remoting (DWR)

In this article, I will discuss the Direct Web Remoting (DWR) technology developed by Joe Walker and maintained by the small IT consultancy Getahead in UK. This technology is a unique way of Ajax-enabling existing Java server-side code by exposing it in JavaScript. This sounds complicated but, in reality, the technology is relatively straightforward. It has some limitations, such as exposing overloaded Java methods or marshaling of very complex Java Objects to JavaScript and will work only in a web application server. But overall, DWR is a very powerful concept that works with any existing Java web application and makes the process of web remoting easier.

Read the rest of this entry »

Spring 2.1 Grows New Features and Evolutionary Enhancements

In this article, I will look at the latest and upcoming releases of the Spring Java framework. In one of my previous articles, "Spring: the Eclectic Framework," I discussed the Spring application framework. But since then, Interface21, the company responsible for development and support of the framework, implemented many new features and has released version 2.0 of Spring. The upcoming preview edition 2.1 is already underway, and I will discuss what has changed and improved in this new version over the previous one. Because the Spring framework is an aggregation of various components and modules, its parts have evolved differently, but overall version 2.1 is a major improvement over version 1.x and a sizable improvement over 2.0.

Read the rest of this entry »

A Field Guide to Java Direct Web Remoting (DWR)

In this article, I will discuss the Direct Web Remoting (DWR) technology developed by Joe Walker and maintained by the small IT consultancy Getahead in UK. This technology is a unique way of Ajax-enabling existing Java server-side code by exposing it in JavaScript. This sounds complicated but, in reality, the technology is relatively straightforward. It has some limitations, such as exposing overloaded Java methods or marshaling of very complex Java Objects to JavaScript and will work only in a web application server. But overall, DWR is a very powerful concept that works with any existing Java web application and makes the process of web remoting easier.

Read the rest of this entry »

BEA WebLogic 9.x new features and configuration gems

In this article I will talk about the BEA WebLogic 9.x server platform. In particular, I will focus on the new features, configuration tips for cluster enabled applications, tips on starting multiple instances of the WebLogic servers from within the development environment, and other configuration and maintenance gems, which I found very useful to know. In addition, I will cover some of the differences between WebLogic 9.x and 8.x servers.

Read the rest of this entry »

Chronological Photo Album Algorithm in Java with EXIF JPEG metadata

With the proliferation of the online picture sharing sites, such as flickr.com, snapfish.com, or kodakgallery.com, many developers are wondering how to achieve the same on their own. With the right, generally free, tools and a few clever Java algorithms, you can be hosting your own photo album in no time, without paying any subscription fees. In this article, I will teach you how to create a personal photo album that will be automatically sorted and ordered in correct chronological order, and independent from the file system names and locations. With the sample code, you will be able to drop the new folder of pictures into some directory and have them correctly show up in relation to the other picture folders you are sharing.

Read the rest of this entry »

Evolution of the J2EE Business Delegate Design Pattern

In this article, I will focus on the Business Delegate enterprise design pattern. This pattern describes a relatively new application of an old concept that facilitates decoupling between application tiers and various business services. I will describe the pattern in detail with an example of real enterprise usage. In addition, I will talk about key concepts and the evolution of this pattern. The idea of hiding complex implementations from different software clients or tiers is not new, GoF* book describes several patterns that make it possible. For example, a Façade [GoF] pattern provides a single high-level interface for a set of interfaces in a system and therefore hides the original implementation from the client subsystems. An Adapter [GoF] pattern or Broker pattern provide coupling for disparate systems, thereby also concealing the implementation of the parent system from the subsystems that use it.

Read the rest of this entry »

Implementing the Intercepting Filter Pattern in Enterprise Java Applications

Since the publication of the renowned book Design Patterns: Elements of Reusable Object-Oriented Software by Gamma, Helm, Johnson, and Vlissides, also known as the Gang of Four (GoF) book in 1995, the wave of design patterns in an enterprise world has gained enough momentum to reach the mainstream developers and IT managers. Something that once was only invented to be used and shared by uber-developers to simplify reusability and maintenance of their projects was now accepted as a de facto way to do software engineering. The "epidemic" of design patterns has reached its tipping point and spread like wildfire. The book served as a catalyst for the most famous and original patterns, which were at that time mostly in C++. The patterns focused on the object-oriented aspects of software development. They were categorized into three main categories: creational, structural, and behavioral.

In this article, I will discuss the enterprise Intercepting Filter pattern. The Intercepting Filter pattern can be classified as a presentation tier pattern because it deals with requests from the presentation tier. This pattern is Web-application specific, and generally cannot be applied in other types of applications, but its concepts are generic and it is related to the structural Decorator (Wrapper) pattern, which I will discuss in this article as well. The Servlet specification 2.3, which is now finalized, incorporates this pattern, and I will focus on the differences between the Servlet and custom implementation methods. I also will describe the reasoning behind this pattern and how can it be reused throughout Web applications.

Read the rest of this entry »

Spring: the eclectic Java Framework

Originally, I intended to discuss the Spring framework from the development perspective, but given the fact that there are numerous articles and publications about the topic, including the well documented reference manual, I decided to switch my focus to the usability of this technology. In this article, I will play the role of the devil’s advocate and will concentrate on the framework as a whole, its usefulness, and the problem space it is trying to address. I will still discuss the concepts and components of the framework in detail, and will assume the readers are familiar with Java Web development.

Read the rest of this entry »