Category: <span>Patterns</span>

In my original Tetris code base, I started out with a simple RotationController class. As I recall, this was a trivial class with a single shape. However, as more shapes were added, it quickly became unwieldy. Looking back at this code, I want to cringe at my lack of discipline in following proper design principles. On the bright side, I have something to blog about. Chain of Responsibility The chain of responsibility design pattern is known as a behavioral pattern consisting of client objects and a series of handler objects. It provides more than one object the opportunity to handle a request by…

Java Patterns Tutorial

Chances are you have seen Fluent Interface in action. I’ve seen it without realizing what they were until I stumbled across Martin Fowler’s blog. The aim is simple – to provide for a more readable code. SharePoint APISeveral years ago, I wrote a SharePoint API in Java to interact with its List Soap Service. This soap service had a feature to query the target list using Collaborative Application Markup Language (CAML). Here’s an example of CAML query to filter the task list where the TaskName is “Foo Bar” and the Status is “In Progress”. As part of this SharePoint API,…

Java Open Source Patterns Tutorial