2004.06.02

Todd recently posted about OORam. It is a sophisticated modeling technique that deals well with separation of concerns. The process was originally documented in a book that is out of print, but you can obtain an online copy of it directly from the author's website. Note to the downloader: It is a large pdf (400+ pages).

Early in the book, the author discusses the distinction between class and role. There is an interesting excerpt from that section:

In an OOram role model, patterns of interacting objects are abstracted into a corresponding pattern of interacting roles.... The corresponding objects will belong to the same class if they have the same properties; they will belong to different classes if they have different properties. The role model abstraction belongs to the realm of modeling. The class abstraction belongs to the realm of implementation.

This is a distillation of the essence and motivation of Craig Larman'sInformation Expert Pattern. The information expert pattern states something along the lines of "assign the responsibility to the object that has the most information necessary to solve the problem at the point in time." I had the great fortune to work with Craig at ObjectSpace. We used to teach that the expert pattern was the responsibility assignment pattern of choice 90% of the time. This scales up well to architectural concerns, but that is another discussion.

What many people may not realize as being significant about the OORam is that the primary author, Trygve M. H. Reenskaug, not only contributed this great-but-often-overlooked process to the world of software, but he also invented the much referenced, much bastardized Model-View-Controller UI architecture in his early work as one of the designers of Smalltalk. MVC is arguably the most used architectural pattern in existence, the current, impressive real-and-hype wave of SOA notwithstanding.

2004.05.28

Brad Adams from Microsoft suggests appending "Core" the names of methods that are intended to be overridden by subclasses. Blech. That, IMHO, is what protected is for. If you want to be strict, go for protected abstract. Welcome to things that suck.