Domain-driven design (DDD) focuses on what matters in enterprise applications: the core business domain. And Naked Objects lets you build DDD applications just by writing the core domain classes, the rest of the application is taken care of for you.

This blog supplements and expands on my book, Domain Driven Design using Naked Objects, describing how you can rapidly develop and test domain applications using Naked Objects.

FitNesse Integration


Tested Objects is a sister project that integrates FitNesse with domain applications written in Naked Objects.

You probably know about FitNesse. It allows the agile developer (or business analyst) to write out scenarios that describe the interactions with a “system under test”, from an external actors’ perspective. These scenarios can then be executed; the scenario is then annotated to indicate whether the test has succeeded or failed:

ClaimsAppSuite-TestResults

The “system under test” is often an application with a GUI on it, and the external actor is usually an end-user. More generally though the system under test is any standalone subsystem (or bounded context in DDD parlance), and the external actor might be an person or it could be another system (such as an adapter for enterprise service bus, say).

Normally with FitNesse the developer must write fixture code that integrates the scenario test with the system under test. We don’t want the scenario test to exercise the presentation layer code, instead it exercises the code underneath, the application or domain layer.

Tested Objects’ FitNesse integration for Naked Objects provides a set of fixtures that can drive the underlying domain model, in the same way that a Naked Objects viewer uses the model. That means that the scenario tests can be described in a very natural way, but there is no need for the developer to write any of this fixture code.

Tested Objects provides a Maven archetype to get you up and running quickly, which bundles FitNesse and provides a built-in user guide. The set of fixtures listed in the user guide are:

UserGuide

So, for example, here’s how we would use Tested Objects to invoke an action:

UsingNakedObjectsViewer.ExampleUsage

See the project website for more details.

Post to Twitter Post to Yahoo Buzz Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon