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.

Simplifying inheritance hierarchies using powertypes and Java 5 enums

Having seen how to teach Naked Objects to support Java 5 enums directly, let’s use this new capability to avoid inheritance hierarchies in entities using powertypes.
Continue reading Simplifying inheritance hierarchies using powertypes and Java 5 enums

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

Adding support for Java 5 enums to Naked Objects – part 2

In the previous post we saw how to write a FacetFactory so that Naked Objects treats enums as value types. Let’s now complete the story by also showing how to provide drop-down lists for any properties or action parameters of that type.
Continue reading Adding support for Java 5 enums to Naked Objects – part 2

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

Adding support for Java 5 enums to Naked Objects

In the previous posts we’ve seen how to simulate enums in Naked Objects 4.0. But it’d be nice if Naked Objects supported enums natively. So let’s see how, half in this post and half in the one that follows.

What we’re going to do here is to extend the Naked Objects programming model, which we do by writing FacetFactorys. Continue reading Adding support for Java 5 enums to Naked Objects

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

Simulated Enums – supporting choices

In my last post I showed how to simulate enums, and then Giorgio asked in the comments as to how this fits in with the choices() method, used to provide a drop-down list of values.

To start with, let’s add an all() method to StockType:
Continue reading Simulated Enums – supporting choices

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

Simulating Enums in Naked Objects

One thing that Naked Objects 4.0 doesn’t yet support is Java 5-style enums. We think we know what we need to do to support it (I guess that will be 4.1), but for now let me offer you a way to get the same general effect.

Let’s make this concrete by considering (hackneyed example, I know) a library. Suppose that this library can loan out both Books and CDs, and that we wanted to have a StockType to enumerate these different types of stock.

First, let’s start with an Enumerated interface:
Continue reading Simulating Enums in Naked Objects

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

E-petition for better UK government procurement of IT

Here in the UK we have the ability to petition our prime minister. So Rob Bowley has set up an e-petition asking the government to review how IT systems are procured. In essence: please stop wasting money using waterfall development processes; use agile instead.

So, if you are a UK citizen, please consider signing. And pass on the message. Eventually it might save us all some tax.

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

What’s the deal with FitNesse’s pom.xml?

I’ve started work on moving Tested Objects’ FitNesse support onto the latest version of FitNesse, using the new SLIM protocol.

Now for the previous version I manually installed the fitnesse.jar into my local Maven repository and also scp’ed it up to the release repository on StarObjects. This time round I looked a little more closely and was delighted to discover a Maven pom.xml. “Great”, thought I, “all I need to do is a quick ‘mvn clean install’ and I’ll be good”.

Er, no.
Continue reading What’s the deal with FitNesse’s pom.xml?

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

DDD article @ Methods and Tools

If you’ve just stumbled across this blog and are wondering what “domain driven design” is all about, you might like to check out an article I wrote for the Methods and Tools journal. It’s downloadable in their (free) PDF magazine, and is also available online in HTML form.

Thanks to Vaughn Vernon for his time reviewing it… but any mistakes and errors are mine alone!

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