Trifork Blog

Posts by Rob van Maris

Easier mocking with Mockito

August 13th, 2009 by
(https://blog.trifork.com/2009/08/13/easier-mocking-with-mockito/)

If you have been happily using Easymock for the past years, this blog post is for you. Because you need to upgrade to Mockito, the new kid on the block in the mocking universe. Why bother about what mocking framework you’re using to create your unittests? Because it will improve you tests, make them more expressive, and help you write better code. Read on if you want to know more.  Read the rest of this entry »

Project: Paazl, offers choice in shipment

July 9th, 2009 by
(https://blog.trifork.com/2009/07/09/project-paazl-offers-choice-in-shipment/)

JTeam is proud to announce the release of Paazl, one of the projects that we have been working on recently.

Paazl offers a solution to the growing demand for choice when it comes to shipping. The platform JTeam developed allows Paazl customers (mostly webshop owners) to offer a range of options in shipment to their customers in a very easy way. Basically distributors offer a number of shipping options, like the time of day to deliver and whether to deliver to the door or to a service center where you then can collect your shipment. Of course all of these options come at a price. But right now, almost no webshop offers the full flexibility in shipping that they could offer to their customer. This is where Paazl comes in…

Read the rest of this entry »

Test driven development for GWT UI code with asynchronous RPC

April 22nd, 2008 by
(https://blog.trifork.com/2008/04/22/test-driven-development-for-gwt-ui-code-with-asynchronous-rpc/)

In my previous blog post I we saw a test-driven approach to GWT UI code. This was based on moving logic to a Supervising Controller.
In this follow-up post we’ll turn our attention to interacting with RPC, and see how this can be tested using EasyMock. This involves some tricks and non-trivial boilerplate code, but fortunately most of this can be hidden by introducing convenience methods, and we end up with tests that are expressive and easy to read.
This article continuous on the sample code in my previous blog post, but if you’re just interested in the RPC part you can probably skip that and start from here. Familiarity with EasyMock basics is assumed.

Read the rest of this entry »

Test driven development for GWT UI code

March 9th, 2008 by
(https://blog.trifork.com/2008/03/09/test-driven-development-for-gwt-ui-code/)

Is a test driven development (TDD) approach possible when creating a GUI using GWT? This post is about how to apply MVC (Model-View-Controller) to organize GWT UI code, with these objectives:

  1. a clear separation of the controller logic from presentation and model
  2. full testability of the controller logic independent of the (browser or hosted mode) GWT environment.

We will see how this can be realized by adding a few simple classes to the standard set of GWT widgets, and applying an MVC flavor described by Martin Fowler as Supervising Controller.
The sample code shows how tests can provide a programmatic alternative for tests you would otherwise have to perform manually by interacting with the UI of the deployed application.

Read the rest of this entry »

Optimizing startup time for GWT hosted mode

November 30th, 2007 by
(https://blog.trifork.com/2007/11/30/optimizing-startup-time-for-gwt-hosted-mode/)

When developing GWT (Google Web Toolkit) applications, the GWT hosted mode is an invaluable tool, as it allows for short development cycles. Whenever you change something in the GWT client code and hit the “Refresh” button it will compile the change, reload the application and show the result of my change almost immediately. In theory, that is…
As soon as the GWT client code grows in size, it takes longer and longer to refresh, to the point that it becomes unacceptable.
In this blog I’ll explore this issue, discuss its causes and what you can do about it.

Read the rest of this entry »