Search

Ted Vinke's Blog

Java, Groovy and stuff

3 Steps For Analyzing a Gradle Project With SonarQube Using Docker

How hard can it be to get up and running with a Gradle project and getting it analyzed with SonarQube locally?

The ingredients are:

SonarQube (formerly Sonar) is an open source platform for continuous inspection of code quality.

sonarqube-logo

Gradle is an open source build automation system.

gradle-logo

Docker allows you to package an application with all of its dependencies into a standardized unit for software development.

docker-logo

“How easy is this?” was a question I had after I decided to reformat my company HP EliteBook with Windows into a full Linux Mint machine.

So, I’ve already played around with Docker and IMHO this works much more pleasant under Linux, so I thought it’s time to play around with it some more and may be get a project analyzed by SonarQube without too much hassle.

So, how easy is this? Continue reading “3 Steps For Analyzing a Gradle Project With SonarQube Using Docker”

Grails Design Consideration #2 – Throw In a View Model Once In a While

This is my take on how we could design our particular user interface in such a way that they’re re-usable, testable and the overall software is more maintainable. Yip, using a bit of View Models from the MVVM pattern.

Background

Recently we started working with two teams on a new Grails application.

As part of that I reviewed some code of the teams’ earlier applications to come to some general coding standards & conventions both teams would follow for the new application. In these code review sessions I’m also giving advice on some architectural choices and design style I would prefer.

Use Case: Tasks

The new application’s homepage displays the logged in user, a overview with tasks grouped by month and some unrelated sliders.

E.g. something like this:

grails-task-overview-main-screen-wireframe
Tasks and stuff

Continue reading “Grails Design Consideration #2 – Throw In a View Model Once In a While”

Grails Expert Tip #8 – There’s a Bean for That

grails-expert-tipRecently I code reviewed some of the Grails (2.4.5) code of another team (of course :-)) and here’s a snippet I came across.

In some “search helper service”:

 public int countListWithoutFetching(Collection collection) {
   def session = grails.util.Holders.grailsApplication.mainContext.sessionFactory.currentSession
   return ((Integer) session.createFilter(collection, "select count(*)" ).list().get(0)).intValue()
 }

This team somehow needed some ‘generic’ way of counting the amount of records in the database, I thought.

Continue reading “Grails Expert Tip #8 – There’s a Bean for That”

2015 in review

The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog.

Here’s an excerpt:

The Louvre Museum has 8.5 million visitors per year. This blog was viewed about 82,000 times in 2015. If it were an exhibit at the Louvre Museum, it would take about 4 days for that many people to see it.

Click here to see the complete report.

Blog at WordPress.com.

Up ↑