Feature Toggle and Branch by Abstraction

August 16th, 2011 by turnerj 2 comments »

Over the past couple of days, I have spent quite a bit of time reading around code branching strategies and the consequences of choosing one strategy over another. I found that ‘Advanced SCM Branching Strategies‘ by Stephen Vance gives a good overview of the practice and some of the considerations to be made when choosing a branching strategy.

Or course more recently, and perhaps as a consequence of SCM tools becoming more adept at textual merging, feature branching has risen to prominence. As he is inclined to do, Martin Fowler articulately expresses his views on why feature branching should be avoided when possible and the inherent conflict between feature branching and continuous integration. I must say that I find it hard to disagree with his reasoning (see also a short Q & A with Jez Humble).

So what alternative does he propose? Martin suggests applying Feature Toggle and Branch by Abstraction. I’ll leave it to you to read the background, but the removal of branching and merging from a teams development activity is certainly a big carrot.

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Reddit
  • Slashdot
  • Technorati

Paging Hibernate Query Results

July 11th, 2011 by turnerj 2 comments »

When developing applications that provide create, read, update and delete (CRUD) functionality, it is often a requirement to search on and present large data sets. This requirement is usually fulfilled by providing the ability to page through the result set, presenting a single page at a time.

For example, consider a very simple data set containing 10 integers.

{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}

If I want to view the second page of this data set and the page size is 3, I will expect the page to contain the following data:

{4, 5, 6}

Typically, we will also want to present the total number of results in the result set (i.e. 10) so that we can establish the total number of pages available (assuming a static result set). We will often present shortcuts to specific pages and a next\previous page link.

Now if we imagine that we scale this example, it is generally more acceptable to retrieve this data from the data store in pages, rather than retrieving the entire data set and presenting it in pages. This approach is made more compelling as the consumption of the data moves further away from the data itself (as in n-tier architectures).

I present below one way that this functionality can be supported using Hibernate Named Queries. You can download the complete source code here.

» Read more: Paging Hibernate Query Results

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Reddit
  • Slashdot
  • Technorati

Automated Testing of RichFaces Components with Selenium

June 21st, 2011 by turnerj 1 comment »

It is pretty much accepted that Continuous Integration is an essential practice of any Agile software development. An essential part of Continuous Integration is automated testing.

When considering automated testing in a Continuous Integration environment one must consider the level of testing, the frequency and the degree of isolation.

Generally speaking, and from the perspective of a development team, I categorise testing as Unit testing, Integration testing and Acceptance testing. Acceptance testing takes the form of simulating the user interaction with the system and validating its behaviour.

In order to simulate the user interaction on a web interface, I often use Selenium. For the most part, I have found Selenium to provide the functionality I require from an automated testing framework. I use Maven to drive the acceptance tests and have found this works well.

The following maven pom will start a local instance of Tomcat, deploy the test subject (war), start an instance of the Selenium server, execute the Selenium tests, stop the Selenium server and stop the local instance of Tomcat.

» Read more: Automated Testing of RichFaces Components with Selenium

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Reddit
  • Slashdot
  • Technorati

Agile Retrospectives : Making Good Teams Great

June 20th, 2011 by turnerj 1 comment »

The principle purpose of an Agile retrospective is to reflect on the recently completed Sprint in order to adapt the teams practices and improve the way in which they deliver software. Most teams will begin by asking three simple questions:

  • What went well?
  • What did not go so well?
  • What changes can we make to improve?

Early on, I took this rather simplistic approach and to be quite honest very little insight was generated. There were still benefits in that the team were sharing their experiences and learning from one another but this became stale very quickly. I needed to learn more about facilitating Agile retrospectives and so invested in a copy of Agile Retrospectives by Esther Derby and Diana Larsen.

» Read more: Agile Retrospectives : Making Good Teams Great

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Reddit
  • Slashdot
  • Technorati

Agile Estimating and Planning

June 13th, 2011 by turnerj No comments »

Estimating and planning are inherently difficult and the mechanisms that Agile apply to these efforts differ significantly in approach and execution. In this book, Mike describes what makes planning so difficult and how an alternative approach can help alleviate the issues that arise with traditional approaches.

Again the quotes that Mike has scattered throughout the book capture the essence of the subject matter and so I have replicated them throughout this review.

» Read more: Agile Estimating and Planning

  • Print
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Yahoo! Buzz
  • Twitter
  • Google Bookmarks
  • DZone
  • LinkedIn
  • Reddit
  • Slashdot
  • Technorati