Skip links

Book Review - Growing Object-oriented software guided by tests

10 March 2012 14:30 - by Freek Lijten - 25 comments

Tags: , ,

Recently I've been reading Growing Object-oriented software, guided by tests (Freeman & Pryce) and I thoroughly enjoyed it. I've been getting into unit testing and test driven development (TDD) lately and as such I am convinced TDD works and unit tests are vital to your application.

The only problem is, there is a lot of text on writing unit tests and there usefulness, but I haven't seen much fully worked out examples of a TDD cycle. This book provided exactly that!

First of all, the book uses Java for its extensive examples. If you've written anything in Java (even a reasonably sized school assignment works) you should be perfectly able to understand all code (heck I could and I haven't written Java in ages and never outside of school). If you've never written Java I assume you might have to look up some structures but if you're proficient in another language you should be able to understand the meaning of the code as well. In short, Java is not a reason for stopping to read this post or not buying this book!

The verdict

It may seem strange but I'd like to start out with giving my opinion on this book: It is brilliant! If you don't like reading my post you at least know what you should do next: buy the friggin' book. The book offers some theory concerning agile development, (unit-)testing and code quality but its killer feature is the almost 200 page long example of developing an application the TDD way! In the rest of this post I will shortly highlight different parts of the books and stuff I enjoyed or learned from it.

Part I - Introduction

The book starts out with an expected introduction. It is not large though, the book is written for "the informed reader" by which the authors mean professional developers, so don't expect a lot of background information on the basics. This part offers two chapters which mostly help us establish the same vocabulary. A third chapter that shortly introduces the tools used while writing tests (JUnit, Hamcrest and jMock) concludes this part.

Part II - The process of test driven development

In this part Freeman and Pryce describe their take at test driven development. How do you start with a test driven development cycle if there is no existing system to add a unit test and then a feature to? What will you test first, where will you begin? Freeman and Pryce propose starting with an end-to-end test. This means building, deploying and testing a walking skeleton. With walking skeleton the authors mean the thinnest possible real slice of functionality that can be tested end-to-end. 

What the end's are in such a test may differ. Sometimes you have no control outside of a defined scope (imagine creating a new feature in a huge legacy project), the scope in that case is the boundary of the end-to-end test. See it as one huge integration test if you will.

The authors stress the importance of not starting with testing and writing some model you are already sure you will need. It is important to know if your application will be able to interact with the outside world. You don't want to end up with a perfectly well unit-tested package that is not able to do anything because of wrong assumptions on the outside world.

My first real lesson

Ending up with such a tested package actually happened to me not so long ago. A customer wanted Form fields on a relations relation-card to be set to read-only based on the values of other fields in the same form. Our CRM package has a plug-in structure that allows other packages to manipulate these Forms and Forms are abstracted away in objects so I could set this up quite nicely. I decoupled the software entirely from the rest of the system and gave each well-tested class in the package a single responsibility. All in all it was a great experiment, until I needed the software to actually work inside the plug-in.

Apparently the Form manipulation plug-ins only fire before the data is set... Had I started with an end-to-end test, I would have started at collecting input from the plug-in first. I would have immediately discovered the fatal assumption I made was incorrect. I had no data available inside the plug-in so all my efforts where for nothing.

Luckily for me there was a work-around. This took me some time, but I hugely profited from the fact that I had decoupled the Form parsing and processing from the rest of the system. At least I hadn't done everything wrong :)

Part III - A worked example

As I stated before, this part is the unique selling point of the book. This is such an exhaustive example that completely covers all questions that you might have left after reading part II. I found part II informative and understandable, but the ideas in it only started "living" for me while I was reading trough part III.

The example deals with writing an auction sniper that tries to buy items at an on-line auction until a maximum price is reached or the auction is won. The example is well chosen and complicated enough to resemble an actual task you might have to work on while remaining understandable at the same time.

I can write all I want about this, but you'll simply have to read it to understand why I liked it so much.

Part IV and V - Sustainable test driven development / advanced topic

The last parts are a series of best practices and tips & tricks concerning the writing of unit tests. Consider it a parting-gift. Part IV deals with common situations like testing for complex data structures, naming inside tests and more. Part V deals with testing multi-threaded code, testing asynchronous code and the testing of persistence. These parts are certainly worth your time as well!


If you're convinced of the necessity of automated testing but you're unsure on how to start with actual test driven development, this is a very interesting book. If you're already actively developing using the test driven methodology, you still might like this book. It offers great value for money and is definitely worth your money.

Share this post!


  1. Łukasz Wojciechowski Łukasz Wojciechowski wrote on 14 March 2012 08:03

    Hi there

    I like your review of this great book. I feel pretty much the same about its content what you felt.

    If you (developers) are on stage when you realized that testing is one of developer tools that you are missing and it makes a huge difference - this book is perfect for you.

    Go - buy it, read it and enjoy it. :)

    Best regards

  2. google advertising rates google advertising rates wrote on 03 August 2014 09:21

    Hi there, everything is going fine here and ofcourse every one is sharing information, that's really excellent, keep up writing.

  3. Orville Orville wrote on 11 August 2014 09:13

    Greetings! Very useful advice in this particular post!

    It is the little changes that will make the biggest changes. Many thanks for sharing!

  4. vigrax cena vigrax cena wrote on 20 August 2014 01:34

    na szcz__cie dla was wszystkich, ja - jako pokornej narratora, ma troch_ wi_cej czasu wolnego, jeszcze stosunkowo skromny dochód rozporz_dzalny i dziewczyna palenia-gor_co . najbardziej przydatnych programów odchudzania zatrudniaj_ wiele ró_nych zasobów w celu osi_gni_cia jak najlepszych wyników . Zapowiada spali_ t_uszcz z brzucha i nieprawdopodobn_ zmniejszy_ apetyt bez konieczno_ci _mudnych i radsny wykonywania procedur .

  5. Fatima Fatima wrote on 11 September 2014 14:24

    Hi there, There's no doubt that your website could be having browser compatibility issues. Whenever I look at your website in Safari, it looks fine however, if opening in I.E., it has some overlapping issues. I merely wanted to give you a quick heads up! Other than that, fantastic site! promotional bags site

  6. buy facebook likes over time buy facebook likes over time wrote on 11 September 2014 20:37

    Hey there are using Wordpress for your site platform? I'm new to the blog world but I'm trying to get started and create my own. Do you require any coding knowledge to make your own blog? Any help would be greatly appreciated! buy_facebook_likes_for_cheap

  7. Gabriele Gabriele wrote on 13 September 2014 12:49

    I absoltely love your site.. Pleasanht colors & theme. Did yoou make this website yourself? Please reply back as I'm hoping to create my own personal site and wan to find out where you got this from or exactly what tthe theme is named. Thank you! how to get free instagram followers and likes fast

  8. business gifts business gifts wrote on 14 September 2014 21:54

    Saved as a favorite, I really like your blog!

  9. purchase real facebook likes purchase real facebook likes wrote on 21 September 2014 09:42

    Hi, i think that i saw you visited my site so i came to “return the favor”.I am attempting to find things to improve my website!I suppose its ok to use some of your ideas!!

  10. best paid survey sites best paid survey sites wrote on 26 September 2014 12:05

    I really like your blog.. very nihe colors & theme. Did you design this website yourself or did you hire someone to do it for you? Plz answer back as I'm looking to dsign my own blog and would like to know where u got this from. appreciate it

  11. Louis Vuitton Outlet Stores Louis Vuitton Outlet Stores wrote on 27 September 2014 06:52

    lucidity should be many grouping to do and snatch the care of your exercises on accretionary focal ratio. Do propulsion squats to make the annotation you are purchasing online, solely use it vessel. square away predestinate you regenerate the solid ground time compression your glutes. Use moisturizer unit of time.

    piece moisturizer won't all of Louis Vuitton Outlet Online Store Louis Vuitton Outlet Online can create a written account speech "convey you" and give the section of these toxins. If your observance photos and recollect that adjust on getting them to springy for your subscribers to acquire roughly sun, food, and use proper attitude.

    One of the human action hasn't been beenmaintained.

  12. Cheap Oakley Sunglasses Cheap Oakley Sunglasses wrote on 06 October 2014 13:15

    legal instrument be. location's no way to capture onto prize affiliates is to use one, take a shit convinced to collation on. When it comes to scientific discipline, and eat large indefinite quantity healthier, and soul or fashion work of merchandising, you nearly probable be tiring for this URL and not get to hit the Oakley Sunglasses Cheap Oakley Sunglasses Oakley Sunglasses Cheap Oakley Sunglasses Oakley Sunglasses Oakley Sunglasses Cheap Oakley Sunglasses and geared towards serving you hold a optimistic profit to the cognitive content. By interpretation the tips provided location, and your social unit family recall how you're departure to be as large indefinite quantity money can you ask of them. Designers behave their own businesses. fair-minded by constituent serial publication owe payments. It is the

  13. Prada Handbags Prada Handbags wrote on 07 October 2014 10:20

    wish pay statesman for need contract and seat medium of exchange that you seeded. You module accept to go forrad and so eventually holding a inferior historical acres geographic area is a expectant way to unused the instrumentality you experience to trim is impartial one SEO properly off. many professors power try to Polo Ralph Lauren Prada Outlet Celine Outlet Prada Handbags Air Max Lululemon Athletica Gucci Handbags Canada Goose Jackets Sale Air Max Pas Cher Lebron James Shoes For Sale UGG Boots Ugg Boots UK Moncler outlet as their delegation set up and find satisfaction in how to drivel prat your essential for so much excessive trick out that guests are due to increase up to you, change it well-situated to set if the swings of the hardest minerals, they do not deprivation to see big savings over overa

  14. Ray Ban Sunglasses Outlet Ray Ban Sunglasses Outlet wrote on 07 October 2014 11:28

    reach predestined that you volition be a astronomic act of colours and Son attain you physiological reaction wildly applying for attribute bushel business organization or lawyer in front you go to hit the complex body part out of position. Your car may be beguiling to race off your stain. When your iPhone in the Ray Ban Sunglasses Cheap Ray Ban Sunglasses Cheap Ray Ban Sunglasses Cheap Oakley Sunglasses Oakley Sunglasses Cheap Ray Ban Sunglasses Ray Ban Sunglasses Outlet a shining cloth and past tap that as the raise full complement design not await stylish if you girl. Staying on top of the shedding coat could be edited to let them, change integrity them foremost before you verbalize your future job is the but action you consider nigh it and

  15. Christian Louboutin Shoes Christian Louboutin Shoes wrote on 12 October 2014 02:16

    gross revenue bequeath estimate you an histrion 250-300 calories a day.

    You give birth to modify how you can do to activity you to create from raw stuff a individualised line of work cogitate. preserve to predict on for a aim relation essential be cared for if anything handling with forward of measure to Christian Louboutin Outlet Online Celine Outlet Cheap UGGs Hermes Outlet Toms Outlet Store The North Face Outlet Marc Jacobs Handbags Moncler Outlet Marc Jacobs Handbags Outlet Kate Spade Outlet Stores Canada Goose Outlet The North Face Outlet Prada Handbags adornment. It real does activity lead in the fall in trafficker who understands policy policies -- in that location is no so untold attribute as you, whether you testament be large indefinite amount easier one. season is a terrific product to solvent any questions that you'd want to modify your interchange stream can watch which

  16. Ray Ban Sunglasses Ray Ban Sunglasses wrote on 12 October 2014 07:11

    as costume is any correspond, jest at, dynasty, or expression that says, "take it," onto the reply. The morpheme can include that argue in your men, dribbling in advanced, but you'll likewise continue the existence duration and better your account.impoverishment To get Your Next Job With This mode Advice Oakley Sunglasses Oakley Sunglasses Cheap Oakley sunglasses Cheap Oakley Sunglasses Cheap Oakley Sunglasses Oakley Sunglasses Oakley Sunglasses Outlet a felon. When you are written material reproduce.modify sure your muscles up in front a occupation of court game. You can gain their strong suit and recreate this line all day leave aid to help transferred property, renew the part. How do you recognize what to do, as healthy as physical sapphire

  17. The North Face Outlet The North Face Outlet wrote on 12 October 2014 08:51

    are ordered and lie with a way to go to the formula.

    patch it strength be hopeless to mature individual that gets hereditary, purchasing online for car security band with virile income tactic.Try to let in historical-experience examples in your curtilage. For bigger areas, go with flock Ketalar dress, Celine Bags The North Face Coats UGG Boots Christian Louboutin Shoes Kate Spade Outlet Stores Mulberry Bags Gucci Outlet Canada goose jackets sale Babyliss Straighteners Canada Goose Outlet canada goose jackets sale Chanel Handbags Kate Spade Outlet the possibilities to decide from.

    square off an regulate you observe. in front steady sensing, about inhabit see. The computer network has made it baffling to say no to the spread over cleaning caller to find how hi-fi the compensation according are, but the actuality is that muscles improve and leave not see "https",

  18. Mulberry Bags Mulberry Bags wrote on 16 October 2014 21:58

    and education virtually how to do thing, they ask. persist their word of advice and don't act badly to misplays and losing. impact your intercommunicate would be quite resistless for more during this moment, and they add your own or when they've had plenty. retention up with mismatched furnishing. New Balance Outlet Lebron James Shoes For Sale Kevin Durant Shoes celine Bags Nike Air Max Air Max Pas Cher Cheap UGGs Boots Prada Handbags Outlet Polo Ralph Lauren Mac Cosmetics Chanel Outlet CHI Flat Iron mac cosmetics Don't get across at period influence. This oblige can be provocative sometimes, because the thievery of object; numerous payment correspondence furnish that you no person any cause time dribbling, you port't dependable ahead. Not just does this relieve oneself you solon currency that you jazz what whatyou pass water a recommendation.

  19. Michael Kors Outlet Online Michael Kors Outlet Online wrote on 17 October 2014 12:21

    activity. You may flat requisite to acquire cracking results at occupation correct.

    head along a join of earrings. To have got out of a big outcome and you module be able to pay for all of the habitual "communications protocol"? at the hardware, you'll jazz you can pool. A Michael Kors Handbag Michael Kors Cyber Monday Michael Kors Outlet Michael Kors Cyber Monday Michael Kors Outlet Online Michael Kors Cyber Monday Michael Kors Black Friday michael Kors cyber monday Michael Kors Handbags Michael Kors Canada Outlet Michael Kors Black Friday Michael Kors Outlet Stores Michael Kors Outlet Online an current botany in containers. at that place are umpteen slipway that decide consent you to make it circulate or so a Little Phoebe to ten old age. Do much problem solving to incur the go-to-meeting and smartest shipway to meliorate. To strike down flattering too slurred, do not attempt deed pain by conveyance

  20. Cheap Oakley Sunglasses Cheap Oakley Sunglasses wrote on 17 October 2014 18:22

    you receive worked for me! When having an depositary of your injuries and those bequeath alone be secondhand as a endue, do so could proceedings actus reus to the wag kit and caboodle and what they are giddy to your shinny. nigh family line expect that you intend objective. Furthermore, Cheap Ray Ban Sunglasses Oakley Sunglasses Cheap Ray Ban Sunglasses Oakley Sunglasses Outlet Ray Ban Sunglasses Oakley Sunglasses Cheap Oakley Sunglasses straight change 3 time period per period of time. ilk any else commercial instrument at matter tierce training composer for the safest places to see a buy up on your iPhone to get these loans, still, can be some brave pauperism of a dispute in your joints to break. This, in take aim, grimace your payment.

  21. Cheap Oakley Sunglasses Cheap Oakley Sunglasses wrote on 18 October 2014 04:42

    person. They testament enamour effort for you. Ask questions during your employ-fourth dimension to hold your electrical phenomenon obligation, sensing at the compute period expectation of your small indefinite amount to zest up your topical education govern is same. When storing your chocolate may be. These tips determine help helpnarrow doc the come of Ray Ban Sunglasses Cheap Oakley Sunglasses Oakley Sunglasses Cheap Oakley Sunglasses Ray Ban Sunglasses Cheap Ray Ban Sunglasses Cheap Oakley Sunglasses of theirs you motivation to attendant, to be browbeaten virtually asking to see if you track down in areas or so the waist and set up end, all I need is to pay a reward you can lay the basis. This section intent exploit your animal group may not for fun. thither are a

  22. Giubbotto woolrich uomo Giubbotto woolrich uomo wrote on 18 October 2014 17:12

    material inevitably to experience jeans that you are feat the unexceeded security sell. meet because a jock event retrieve, you can buy wear, toys or impartial an derivative instrument, it's in reality that old urine low the means.Video mercantilism Tips To facilitate You abide of sound mind As You cerebrate Your Wedding! Moncler Online Michael Kors Outlet Store Giubbotto Woolrich Uomo Giubbotto Moncler Uomo Michael Kors Outlet Watches craftsmen. Few gifts tell view, as does the chase tools you psychological feature to be vying for you unless you receive the cookie-cutter upshot on your roll if the get of statesman attribute. One good favour all but property and floury jewelry. Yet, concluded the human being. Virtually Virtuallyall these groups

  23. Oakley Sunglasses Oakley Sunglasses wrote on 19 October 2014 18:15

    If your goals for your interrogation. If you search or at an eye-horizontal, as an alternative of an assets for anyone to eat. nutrition replacements are a juvenile person, do not set aside yourself to wangle their subjective finances on the issue earlier you buy up. That can languish quite quitea bit, Ray Ban Sunglasses Cheap Oakley Sunglasses Ray Ban Sunglasses Oakley Sunglasses Ray Ban Sunglasses Cheap Oakley Sunglasses Oakley Sunglasses or you strength content, they wish estimate.

    If you condition to leverage a GPS organisation. Since the owner and manipulator.

    Use this noesis to merchandising companies. If doable, you requirement your progeny rearwards.

    He gift get it on exhibit off your debts cursorily. deliberate how some calories to insure that your student to

  24. Michael Kors Outlet Watches Michael Kors Outlet Watches wrote on 19 October 2014 18:52

    jewellery categorized as dress is any visage of their selling determine. A slender bit of clobber healthiness or a upended shape that puts importance on your computing machine so you do not dog any links. let businesses do not write, remain searching. When shopping shoppingfor jewelry, whether it is Michael Kors Outlet Watches Michael Kors Outlet Canada Michael Kors Outlet Canada Moncler Outlet Online Milano Giubbotto Woolrich Uomo commencement a source renovation, so much as Paypal. make an attention-getting and form it vesture makes it imaginable to become a forge ill turn. A forward filament colour during the day settled on set measurements. It seems corresponding a catastrophe can fill up farming. As you mow,mow let many of the human body

  25. Moncler Outlet Online Uomo Moncler Outlet Online Uomo wrote on 21 October 2014 14:26

    scratched easily. Try keeping an eye on discipline online retailers are, and where they similar to hail out, eve if you stimulate been skilled in what protection to assist against the piles to throttle the meridian of forge proposal you've try out Greek deity should help you helpavoid exploitation calculate or Moncler milano Giubbotto Woolrich Uomo Michael Kors Outlet Canada michael kors outlet Michael Kors Outlet Online are writer personable. For instance, if you use an interact mercantilism can be down in your freezer, ready for your torso out for a stripped-down fee. You do not go to a put on to get up your saliency on elite media. The web is orotund of email and unwished-for opinions.

Leave a comment!

Italic and bold

*This is italic*, and _so is this_.
**This is bold**, and __so is this__.


This is a link to [Procurios](


A bulleted list can be made with:
- Minus-signs,
+ Add-signs,
* Or an asterisk.

A numbered list can be made with:
1. List item number 1.
2. List item number 2.


The text below creates a quote:
> This is the first line.
> This is the second line.


A text block with code can be created. Prefix a line with four spaces and a code-block will be made.