OT2004 : Mock Objects: Driving Top-Down Development

Nat and I were first up with our talk on Mock Objects. Yes, we are still harping on about them :).

Here’s what we covered:

* OO concepts: an application is a web of collaborating objects, each providing a distinct responsibility and taking on multiple roles to provide services to other objects.
* How the process of using mock objects complements TDD to drive out the design of these responsibilities and roles.
* How our original usage of mocks for testing system boundaries such as databases, web-apps, GUIs, external libraries turned out to be a bad approach and the success we started achieving when inverting this to only mock types we can change.
* The process of using mocks very quickly points out key abstractions in your system, difference in responsibilities between objects and services objects require.
* Clearing up misconceptions about mocks, including: not using them at system boundaries and what they actually are (not stubs, not recorders, no behaviour).
* Our first public demonstration of the new JMock API to walk through a single iteration of the process.
* Usage patterns.

Feedback from: James Robertson @ Cincom Smalltalk and Mike Platt @ Microsoft.

  • Trackback are closed
  • Comments (4)
    • Dan Hatfield
    • March 31st, 2004

    Sounds like a very interesting presentation…sorry I missed it.
    I’m wondering about “lesson learned” with regards to NOT using mock’s for mocking out system boundaries.
    In EAI and in particular with legacy systems, this is sometimes the only choice I seem to have (for one reason or another).
    So I’m wondering what are the downsides that you have experienced?

    Dan

  1. Joe,

    I would of loved to be there.
    Is there any chance you could post your notes / pics / examples / etc from that session ?

    Thanks.

    • Alan
    • October 17th, 2004

    What is TOPDOWN Development? I suppose to write a paragraph about it??

  2. top down development is used in program design.
    it consists of a four main boxes, each representing a differnet functtion in the program. all programs that are designed, even game programs, use some form of top down development or TDD. modules are added when they are required to the program, and these then make up the complete patern of the design.

    they are a reletivly simple subject to grasp, as i haver done a few on my programming course.

Comments are closed.
%d bloggers like this: