Monday, December 30, 2013

Hudson 3 Essentials eBook (and more) for $5 until January 3rd

You can get my Hudson 3 Essentials eBook and much for only $5 from Packt Publishing's eBook Bonanza.

There are quite a few interesting books to choose from and even some videos. So if you have been curious about some new technology, now would be a good time to stock up on a few good books.

Sunday, December 29, 2013

Grails and GWT

I've been working with the Grails framework and the Groovy language for the past three years. I've recently switched jobs and have begun working with GWT again for the first time since 2008. I've really enjoyed working with Groovy and Grails and it has been one of the most enjoyable and productive technologies I've worked with.

As I'm relearning and transitioning to a GWT project, I want to document the differences I find between the frameworks and each of their pros and cons. I understand that it's a little like comparing apples and orangutans since Grails is a full stack framework and GWT is primarily a web tier framework, but maybe there can be some benefit from the comparison anyway. I also know that I will be biased toward Groovy and Grails since I am more comfortable with that framework, but I'll try and be as impartial as possible.

I will implement the same application in both technologies. The application will be very simple, basically it is just a single page CRUD web application that will manage a book library. The database will have books and authors tables, so we'll have a simple many to many relationship. I would like to use an embedded database in development mode and PostgreSQL when deployed in production.

To try and make the comparison a little more equal, I will add spring (on the server side) and hibernate to the sample GWT project. I will add a JavaScript front-end to the sample Grails project. I'm not sure which JavaScript front-end to add to Grails, I'm thinking either AngularJS or EmberJS (I don't really know either one, just looking for something new to learn).

After this is done and I'm more comfortable with GWT, I would like to look at the Google Web Toolkit for Grails plugin and evaluate the possibility of having a Grails server side and a GWT front end.

Sunday, December 22, 2013

Hudson 3 Essentials Book

I recently finished my first book, "Hudson 3 Essentials" for Packt Publishing. The book description is available here.

The purpose of this post is to describe the book from my perspective.

The book is written as a quick and hands on introduction to Hudson 3 for readers who are new to Hudson or who have very little experience working with Hudson. After finishing the book, readers should understand the basics of Hudson and have the foundation to extend their knowledge with online resources and/or experimentation.

Chapter 1 is a brief introduction to Hudson, Continuous Integration and how using Hudson can help software development teams. This will hopefully give the reader a reason to continue on with the rest of the book.

Chapter 2 shows how to easily run and configure Hudson using common open source application servers as well as in stand-alone mode. I give detailed installation instructions for tomcat, glassfish and JBoss AS. I would have liked to include jetty but I haven't worked with it enough and was running short on time. The reader should have a working Hudson 3 instance by the end of this chapter.

Chapter 3 covers the basics of Hudson usage and configuration including security options. This isn't a very exciting chapter, but necessary. There are a lot of nice options for integrating Hudson with existing infrastructure (LDAP or application server security) or using Hudson itself.

Chapter 4 is about Hudson plugins. We explain the different categories of Hudson plugins and install a couple of the more common plugins. We then introduce writing your own plugin. Writing Hudson plugins could probably take a couple of chapters on their own but this is hopefully enough to get the reader started. It was a pleasant surprise how easy it was to get started with a new plugin. The sample plugin that was created in this chapter is on my github page.

Chapter 5 is where we start creating Hudson jobs. I wasn't too sure how to handle this chapter, then I realized how easy it would be to take an existing open source project and build it in Hudson. I wanted to demo as many technologies as possible (especially projects I like) and create a sample job for each of them. So we create three jobs to demonstrate three technologies:

  1. maven is used to build the Spring Petclinic application
  2. gradle is used to build the gradle project (cute!)
  3. grails is used to build the spring-security-core grails plugin

Finally, we show how you can use groovy to perform tasks that aren't supported by plugins. It's amazing how easy and powerful combining groovy and Hudson in this way is.

Chapter 6 is about how we can use Hudson to run tests on the projects and create reports based on the test results. Hudson leans very heavily on the tests run by the build too (ant, maven or gradle) that is being used and then collecting those results into a central location. We demonstrate creating javadoc from existing code, running and publishing JUnit tests, and running and publishing PMD, FindBugs and Checkstyle tasks. I think this could be very useful for a manager to be able to easily keep tabs on project status without status meetings. A testing team could also have a baseline of tests that could be automated and insist that no build be promoted to the testing environment that didn't pass these automated tests. The sample project that was created for this chapter available on my githup page.

Chapter 7 covers the important topic of backing up your Hudson configuration and also upgrading. I had a bit of fun describing the team feature that was added in Hudson 3.1 by using the Avengers and X-Men as example teams.

That's it. I hope people find the book useful.