Category Archives: Development

How to implement the splitter and aggregator patterns with Apache Camel

I have found that Apache Camel is a good way to load data from log files into a database. Read on to see how I did this using the splitter and aggregator patterns with Apache Camel.

Continue reading

SphinxSearch | Full Text Searching

This article explains how to use SphinxSE, Sphinx real time indexing, and set up Sphinx in order to improve search query performance.   First some background about issues surrounding full-text search.

Stephen Dunn
Stephen Dunn

Latest posts by Stephen Dunn (see all)

Continue reading

My Top 4 Takeaways from NFJS 2013

**Android Development**
Google is working on Android Studio, which is built on the community edition of Intellij IDEA.  You can learn more and download the early access preview at
A great book for Android development is “The Busy Coders Guide to Android Development” by Mark Murphy.  He uses an annual subscription model for the book and updates it regularly. He adds new material each month.  This way your book is never out of date. You can learn more at
It is possible to seed up the Android emulator!  Intel has developed the Hardware Accelerated Execution Manager (HAXM).  Selecting this as the emulator will drastically reduce the amount of time it takes to start the emulator.  You can learn more and download the HAXM at
Would you like to view your physical Android device on your computer?  Well now you can using a program called Droid@Screen by Jens Riboe.  You can learn more at
**HTML5 Offline Applications**
The HTML5 specification supports client side storage so that applications can work in an offline mode.  All of the latest desktop and mobile browsers support HTML5 client side storage. To tell the browser that you application supports client side storage you have to add the “manifest” attribute to the html tag at the top of the document.  You can learn more at
After seeing CoffeeScript, I don’t think I will ever write JavaScript again.  CoffeeScript is to JavaScript what Groovy is to Java.  It provides a much simpler syntax than JavaScript by incorporating language features from Ruby and Python.  CoffeeScript compiles into pure JavaScript and is compatible with all JavaScript engines.  You can learn more at
**Server Side JavaScript**
There is a JavaScript runtime engine called Node.js.  The authors designed it for building fast, scalable network applications.  Node.js allows you to try JavaScript without needing a browser, by running the Read-Evaluate-Print-Loop (REPL).
Node.js has a large ecosystem.  For example, there is NodeUnit and Buster.js for testing, Jade for tempting, Express for web applications, and Connect for middleware.  Even CoffeeScript will run inside Node.js.  This ecosystem is managed using the Node Packaged Modules (NPM) registry.
NodeUnit and Buster.js provide new ways to test JavaScript, either within a browser or Node.js.  This is important since jsUnit is not longer actively maintained.

One of the best software development conferences you can attend is the No Fluff Just Stuff (NFJS) conference. The conference  is small and the speakers are mostly consultants working in the field.  I attended my 9th NFJS conference this year, and as always, came away with some great information that I can use right away.  So here are my top 4 takeaways from NFJS 2013:

Continue reading

Code Quality Metrics with Sonar, Part II: Overview of Sonar features

What we covered so far ?

In my previous post I covered the reasons why software quality metrics should be collected and why improvements to the code should be made based on those metrics. In this post I’ll be illustrating how Sonar can fulfill the job of collecting metrics and driving decisions.

Sonar goes beyond just collecting and displaying metrics:

  • Sonar can answer the following questions:
    • What are our most critical code quality issues?
    • Where is the highest concentration of code issues?
    • How many working hours will it take to fix the issues?
    • What does the metrics trend look like over the past year?
    • etc.
  • Sonar can be used to track work tickets assigned to team members.

In short, Sonar helps us analyze the situation, take actions, and quantify the improvement.

Continue reading

Using Git with Subversion

If you haven’t heard of Git or don’t understand why you should use it, checkout the talk given by the author to Google (Torvalds, 2007).  Git is an excellent version control tool for agile software development.  But many of us may not have the luxury of using Git because our company has deemed that we shall use Subversion.  Now Subversion is not a bad tool and has added some nice features in version 1.7.  But my preference is to use Git. Continue reading

A Basic Canvas

Over the weekend I decided to play around with the new html5 element canvas.  The canvas allows you to paint images in the browser that previously was done with flash.  Canvas is fairly straight forward and only requires a basic knowledge of html and javascript.

I decided a good start would be to try and make a thunderstorm in order to show the animation bit of canvas.  In this article I will describe what I did and the issues that I had along the way.  Finally at the end I will provide a working example with all of the code.
Continue reading

Automated Testing Strategy for Legacy Systems

Once you catch the automated testing itch you want to write test for everything. But should we use the same strategy for every piece of software? The conclusion that I’ve come to is no. While I’m completely committed to the practice of TDD and aggressive test coverage, I’ve found that legacy software needs to be approached strategically.
Continue reading

Code Quality Metrics with Sonar, Part I

What is Sonar and Why it’s Needed?

I was fortunate to be able to attend the 2011 edition of No Fluff Just Stuff . One of my favorite presentations was by Matthew McCullough on Sonar . Hence, when the issue of code metrics was raised at a client, Sonar seemed like the right tool to use.

Our client wanted to explore ways to measure and enforce software and code quality metrics. Their goals were to have quantitative measurements of their code quality and analyze those metrics to come up with a set of benchmark measurements. They wanted to utilize Sonar to discourage bad practices.

Continue reading

Portlet Development using JSF, PrimeFaces and Spring

About the Post:

This article presents techniques on how to develop Java Portlets using JavaServer Faces, PrimeFaces and Spring. This hands-on example will integrate all of these technologies into a single application.


This post assumes that you have a basic understanding of Portlet, JSF, PrimeFaces and Spring. And a good understanding of Java 5 and annotations.


Before getting started, please have the following downloaded and setup in your environment.

Continue reading

Injecting Spring Beans into Java Servlets

If you are working in a Java Web Application and you are using Spring IoC Container in your application, there is a chance that you might have to inject Spring Beans into a Java Servlet.

Since there is not a direct way to inject Spring Beans into a Java Servlet, you might try to lookup the Spring Beans from the Spring Context within your servlet and assign the dependencies which means that part of injection would no more be IoC and you would be looking for some concise way of doing this.
Continue reading