I was reviewing some old bookmarks in my browser the other day and I ran into a link to Naked objects. This time, I decided to read more about and I found myself unusually inspired. In the recent past, I have been disappointed with the pace and quality of software engineering. Certainly, there have been evolutionary improvements, but nothing that I would consider new or unique.

Naked objects is an architectural pattern for development of business applications. It was developed by Richard Pawson during the 1990s and culminated in a book published by Wiley in 2002, now available online, and Pawsons Ph. D. thesis in 2003. Richard Pawson was awarded a PhD by Trinity College, Dublin in June 2004 for his work on Naked Objects.

Pawsons thesis is an incredible read. If you have any interest in software and object-oriented systems, I strongly encourage you to read it. It traces the evolution of object oriented principles and suggests that somehow, somewhere, we went wrong. This view is supported by the creator of the venerable Model-View-Controller (MVC) design pattern, professer Trygve M. H. Reenskaug. Reenskaug was a visiting scientist at Xerox PARC in 1978-1979. Reenskaug believes that MVC has been perverted to the point of making the computer control the user, which was entirely not his intent.

In a forward contained in Pawsons thesis, Reenskaug retraces the purpose behind the MVC pattern. He laments that his original ideas were not published, which lead to the “C” or controller acting as a script controlling the user, rather than the other way around. This has lead to the belief that modern software systems are so complex that ordinary people cannot be expected to understand them. In the end, users do not develop a mental model that expresses the underlying software model. This disconnect can only serve to increase the cost of quality software, if it can be developed at all.

MVC is the staple of most user facing software systems today. It is widely heralded as the solution for user interfaces. Indeed, it is better than most other proposed solutions of the past. The real problem, as Pawson points out, is that most domain models built today are behaviorally weak. They are no more than value objects or glorifed structures found in Pascal and C programs of two decades ago. For this reason, many have argued that objects don’t work, and maybe functional programming is a better model.

Pawson promotes the use of behaviorally complete objects, objects that are more than simple containers for data. It follows that if objects do not encapsulate behavior, or related business logic, the logic will be expressed in some other place negating to whole purpose behind object orientation. Most often, the behavior is placed in a controller, which makes it difficult to reuse. Further, behaviorally weak object tend to be tightly coupled to the controller, which leads to inflexibility.

Pawson coined the term Naked Objects, which describe a pattern of usage where behaviorally complete objects are presented to user transparently. The users mental model is the domain model, there is no other logic or data to get in the way. Robert Matthews took the idea further by developing a Java framework which automatically generates an object oriented user interface by introspecting the domain model. This leads to impressive productivity gains during development. The 3.0 release of the Naked Object framework represents years of development on business systems. 3.0 automatically creates an object-oriented user interface, or viewing mechanism, along with automatic persistence using Hibernate.
Pawson and Matthews put their ideas to work in real world, large scale applications for the government of Ireland. Their framwork is available as open source. Still, some developers were not impressed with the user interface and considered it more of good start rather than a production solution. To address some of these concerns, Eitan Suez has developed a very impressive framework called jMatter. The user interface is entirely based on Swing and persistence is automatically supported through Hibernate. Following Pawson and Matthews lead, the developer need only prepare a behaviorally complete domain model, the view and persistence is automatically supported by the framework.

This is far from the end of the story. It appears that many developers have been inspired by Pawsons ideas and continue to develop their own frameworks. HTML viewing mechanisms are currently under development which has the potential to significantly affect the way in which Web applications are designed and built.