CATEGORY1

Category Archives: Design Pattern

Swing and Design Patterns – Part 4. Mediator Pattern

Assume we have a component hierarchy that looks like the following diagram. Some component on one branch (say a button), wants to update something on another branch (say text in a text field). This scenario occurs very often in complex … Continue reading


Posted in Design Pattern, Swing, Swing Design Pattern | Tagged , , , | Leave a comment

MVC pattern in Javascript. An example..

If you are unfortunate enough to be a Java developer who has to develop in Javascript, you will want to start using design patterns, or your javascript code is quickly going to resemble a train wreck. One of the most … Continue reading


Posted in Design Pattern, RIA | Tagged , , , | 2 Comments

Selenium tests over Multiple Browsers

The Selenium API is great for writing Java tests for web applications. An important aspect of it is the ability to quickly regression test over multiple browsers. A common pattern I ise is shown in the following code snippet. A … Continue reading


Posted in Design Pattern | Tagged , , , , | Leave a comment

Database Performance Tip, using a delete table to improve network performance.

Sometimes you want to display a large amount of data from a database table in your client application. One example from my past was a trading system built in Swing. The center piece of which contained a huge scrollable table … Continue reading


Posted in Design Pattern | Tagged , , , , | Leave a comment

Swing and Design Patterns – Part 3. Command Pattern

  Command Pattern The command pattern is a commonly used pattern which encapsulates a method call or action-like code into a single class. The advantages of being able to package a method (or methods) into a class become evident when … Continue reading


Posted in Design Pattern, Swing Design Pattern | Tagged , , | 1 Comment

Swing and Design Patterns – Part 2. Delegate Pattern

Lets look at our diagram again and examine another pattern. Delegate Pattern (aka Facade) The delegate or facade pattern should be the backbone of all java Swing application (for that matter, not just Swing, but any desktop application that needs … Continue reading


Posted in Design Pattern, Swing Design Pattern | Tagged , , , , , , | Leave a comment

Swing and Design Patterns – Part 1. Decorator Pattern

I am going to talk a little about my experiences with design patterns, specifically when building a Swing application. Being the visual guy that I am, I decided to put together a little visual schematic showing the four most important … Continue reading


Posted in Design Pattern, Swing Design Pattern | Tagged , , , | 6 Comments