Company

Author Archive

iPhone as the guide to Lowlands Paradise

July 24th, 2009 by
(http://blog.trifork.com/2009/07/24/iphone-as-the-guide-to-lowlands-paradise/)

Recently I have become interested in developing apps for the iPhone. I am about to finish my first app called “LLowGuide”, which is supposed to be a guide for a Dutch music festival called Lowlands. Lowlands will take place on the 21st, 22nd and 23rd of august 2009. As of the moment of writing, I submitted a very early version of the app into the iPhone's App Store. But it has been in review for 8 days now, with no indication of when the review will be finished. I am starting to doubt whether I am able to release the final version before the festival starts. But in any case, it was a great iPhone programming exercise.

While developing I gathered some good practices, which could be applied in other apps as well. I want to share with you a few practices which I found particularly useful while developing the app. I hope that this way you get excited about iPhone programming (if you weren't already) and get motivated to write your own app (if you didn't already).
Read the rest of this entry »

Testing with factories

July 10th, 2009 by
(http://blog.trifork.com/2009/07/10/testing-with-factories/)

On July 1st, Jelmer added a very useful blog post about testing the database layer in which he suggested to use "insert statement" and "fixture" classes to provide a good way to insert test data into your database. I am also using that technique as I'm writing unit tests for the database layer. I have to say this really makes unit tests less work to write, more focussed and therefore more fun to write!

Although this technique solves the challenges we have in database layer tests, we might encounter similar challenges when writing unit tests for other layers (such as the service or frontend layer). This is because such tests often also require "test data" you need to create. Only this time the test data is not in the form of database rows, but in the form of Java objects. Such objects need to be instantiated in a valid state and often depend on other objects. I find this quite similar to inserting rows into database tables having not null columns and/or foreign key constraints.
Read the rest of this entry »

Simple forms with Spring MVC 2.5

May 14th, 2009 by
(http://blog.trifork.com/2009/05/14/simple-forms-with-spring-mvc-2-5/)

Having used the Spring MVC 2.5 webframework for a while now, I felt the urge to blog about some of the experiences I had with it. Especially about the part concerning forms, validation, binding and property editors. That’s the part that was usually provided to you by the SimpleFormController (in the ‘old’ Spring MVC). But now, in Spring MVC 2.5, where do you start? You don’t have a convenient base class anymore that tells you what methods you can override. Instead you have a bunch of annotations and a lot of magic.

Read the rest of this entry »