J O H N R A . M E Posts

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

I’ve been planning to write some tutorials on design patterns. I just need to find some time and my day job at the corporate world has kept me busy. I plan to use this code base from a java tetris application I wrote a while back. I’ve done some clean ups – who’s not embarrassed by their old code. Don’t worry, I haven’t completely cleaned it up. After all, the plan is to write tutorials on design patterns that would help improve this code. My first topic, when I do get some time, will be Chain of Responsibility.

Java Open Source

It didn’t take long for me to fall in love with Gradle. Once I was introduced to it, I never looked back. It was the same with Ant as I transitioned from Make. But, Gradle is different. I always felt building was necessary evil. It was often done way after first code was ever written. This isn’t true with Gradle. Before any code is written, I start every project by setting up my Gradle build. I actually look forward to adding more features to my build. How crazy is that?! WSDL to JavaRecently, I published one of my old SharePoint…

Gradle Groovy Java 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

I’ve been meaning to contribute to open source for some time. I really didn’t have anything particularly in mind to what I wanted to publish. However, I’ve been dealing with varying degree of integration complexity to some of my application environments at the office. Inevitably, someone would scratch their head for several minutes trying to figure out why something failed only to realize that it was due to an external dependency. Needless to say, a simple tool that would provide a holistic view of the system could have saved them some pain. This could then be expanded to other environments: shared…

Java Open Source