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 »

The Twelve Days of AJAX

I originally published this article on the Developer.com in December of 2006, hence the holiday twist in the name and the content. AJAX is the one of the latest buzz acronyms. It stands for "Asynchronous JavaScript and XML" and actually does not define a single new technology, but a group of mature technologies used in conjunction with one another. In this article, I will look at AJAX and the most popular frameworks for AJAX currently on the market, from the ten-thousand foot view.

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 »

Implementing custom modal Dialog with Smoke Glass effect in JavaScript and CSS

Have you ever wondered how does Netflix.com, Yahoo Photos or DealOgre.com popup an interactive dialog and make the main window appear dark, transparent and inactive behind it?

In this article I will show how to implement a custom modal dialog in a web browser, also known as a "smoke glass" effect. This effect makes the entire page appear behind a transparent dark shade, except for the custom dialog, simulating a modal behavior in which the user must use the dialog and not the main window. This is a very cool effect which is not using window.showModalDialog but its own solution. The solution is simpler then you think so read on.

Read the rest of this entry »