The Spock framework is a testing and specification framework built on top of JUnit and Groovy. It has many strengths, but its true power lies in its ability to write tests in a very readable, concise manner, which can dramatically cut your amount of testing code. I will show you some examples later.
Another big advantage is the orientation towards data driven testing. If you have a lot of unit tests where there are multiple input variables which can take different values and leading to different outputs, then definitely have a look at the “
where” clause of the Spock framework.
And… it is powered by Groovy !! This gives you a whole lot of power to expressively write your test code, as anyone that ever used Groovy can attest.
Recently I have been sweating to make annotated transactions work in Spring MVC with Hibernate ORM and want to share with you some “aha” moments that took me some time/blood/sweat/tears to find out. Hopefully you’ll find it useful.
The goal for me was to annotate Service methods with a @Transactional annotation so that Spring will automatically create a transaction around anything Hibernate-related that happens inside the method.
While a lot of companies still are adopting Java EE 7 the fundamentals of the next major Java enterprise edition are already finished. JSR 366 is to develop Java EE 8, the next release of the Java Platform Enterprise edition. Java EE 8 will bring us a new action based web framework. Will this be the last java web framework you’ll ever look at?
Passionate developers love to write clean code and make it more beautiful all the time. They call this Refactoring. In my experience refactoring is often misunderstood and is sometimes even used as an excuse to spend lots of time on improving the code structure. It is very tempting to learn more about how to make that particular piece of code even more readable, maintainable and elegantly. This then results in less developing of new features. How could we handle this?
Did you ever needed to have a group of option in which just one item could be selected, but the user did need to have the option to deselect any chosen option in HTML?
It can’t be done just by HTML checkboxes or radio buttons and the user experience of a select with options isn’t sufficient.
We did have to provide such a solution in a recent project.
Have you ever tried to change something? In (part of) an organisation, or maybe in yourself? How successful was it? How did you accomplish this feat?
According to this great little book called Switch, you most probably have addressed three significant areas: the rationale, the emotion, and the environment. The authors Dan and Chip Heath call these: the Rider, the Elephant, and the Path.
On the 8th of December I participated in the Global Day of Coderetreat 2012. I attended the one that was organized by two colleagues Bart Bakker and Marco Beelen at the iPROFS office in Haarlem. This event focuses on the fundamentals of software development and design by intense practicing.