I think I now have a handle on what makes Naked Objects interesting. I had
previously perused the site and came to the preliminary conclusion that
it’s just a generic UI framework. Last night at the DFWPP
(Dallas-Ft.Worth Pragmatic Practitioners) meeting I got to hear Dave Thomas talk about Naked
Objects (and believe me, it is a topic rich with double entendres). It
helps me to think of Naked Objects in a parallel manner to TDD (Test
Driven Development).
On the surface TDD looks like it is primarily a means of testing. The
‘aha’ moment happens when you invert your thinking. TDD is primarily a
design tool, and secondarily a testing method. It ends up that testable
code is more cohesive and loosely coupled, and that’s the major benefit.
My ‘aha’ moment with Naked Objects happened when I began to see it as
primarily a design and requirements gathering tool, and secondarily a UI
framework. Coding in Naked Objects style promotes minimal temporal
coupling (the GUI is modeless), complete business rules in the business
objects (none of it hanging in the GUI layer), and explicit relationships
between business objects (so the GUI knows what can be dragged and dropped
onto what).
So, just as TDD taught us that testable code is well designed
code, so now Naked Objects are teaching us that naked (or maybe
strippable?) code is well designed code. Also in a parallel vein,
we know that the unit tests from TDD are rarely going to be a sufficient
amount of testing, so also the GUI of Naked Objects is rarely going to be
a sufficient GUI. Just as the more traditional functional, system, and
user acceptance tests can be added to a TDD-built system, so too can a
more traditional menued, or script-driven GUI be added to a Naked
Objects-built system.
Dave will be giving that Naked Objects talk (and also one on Coupling!
I warned you about the double entendres) at the Atlanta
Java Software Symposium this coming weekend. Come if you can!
<shameless-plug>You can even hear me speak on JMX, IO Performance
Tuning, and Expressive Code there too.</shameless-plug>