Pattern-Oriented Software Architecture - A System of Patterns (PoSA I)

I’ve finally finished Pattern-Oriented Software Architecture - A System of Patterns and I want to say a few words about it.

First I don’t think, it’s a must-buy. It’s okay to read (but more about that in a minute) and certainly it can come in handy to look up patterns while developing, but if you have small budget, it’s better to get it from a library.

The book can be roughly divided into 4 parts: architectural patterns, design patterns, idioms, “trivia”.

The chapter about architectural patterns is the most interesting, where as the chapter about design patterns is okay, too, but also borrow or expands upon lots of concepts from the GoF book. The idioms chapter only contains one idiom (think small, language-specific “design pattern”, e.g. reference counting in C++).

The “trivia” part contains information what pattern are, who came up with the idea, influences, the community, yada yada. The most interesting topic being the community and links in there.

The book itself is quite boring to read and the patterns are described in endless detail, which is good, if you want to look things up and avoid common mistakes. On the other hand this makes it a book, you should not read front to back, because it doesn’t really make sense and you won’t get a lot out of it either. (I actually read it front to back, and from that experience I draw my advice :-|) Just skim over the patterns, until you find something you don’t know and then read the paragraphs that are interesting until you think you understand the pattern and then read some more to verify that you really understand it, but you can probably skip 40% (or more) of the text, if you just want to learn about new patterns and not go into all the details.

Next I’ll try to write a few words about each pattern, so I (and maybe you, too) can look up the pattern here instead of in the book.

Note: I just found an awesome page, http://vico.org/pages/PatronsDisseny.html, that contains information about all patterns in the book, so it doesn’t make sense for me to write about each and every one of them.

Architectural Patterns

  • Layers

To sum up 20 pages: it’s good to use a multi-layered architecture in your software.

  • Pipes and Filters

This is something Pragmatic Programmer mentioned, too: Use and support the usage of your tools through pipes and filters. This is mainly something that is common on Unix, but it’s incredibly useful and if you support some standard text I/O helps interoperability with little cost.

Finally an interesting pattern, it’s also described in Pragmatic Programmer, but you can read the description here, too, because it’s a quite interesting pattern.

This one is interesting and worth having heard of. It’s similar to MVC above, but more general.

  • Microkernel

  • Reflection

Design Patterns

  • Whole-Part

  • Master-Slave Anyone who has ever done parallel programming with MPI has used this pattern extensively

  • Proxy

  • Command Processor A more elaborate version of the Command patten in the GoF book

  • View Handler The pattern describes how to design a document/view manager

  • Forwarder-Receiver

  • Client-Dispatcher-Server

  • Publisher-Subscriber

Idioms

  • Counted Pointer

Now that I’m done with this, I want to share a few useful resources mentioned in the book:

Personally idioms are very interesting for me, too, because the day-to-day coding work is in a specific language and idioms are exactly about that.

A little googling already turns up lots of useful sources. For example:

There are a few more pattern books that I plan to read, so let’s see how that turns out..

A Manual for Writers of Research Papers, Theses, and Dissertations

This is an awesome book, that explains a lot about how to write research papers and also about all the little details you should pay attention, too. It’s a good read - I spent 1.5 hours a day for a bit more than a week to read through it - and I think it’s going to be quite useful, when I start writing my Bachelor Thesis in a few days.

I’m currently writing some ANTLR grammar and StringTemplate stuff and I might write something about that, too, on the weekend.

I’m not sure I’m really happy with ANTLR, but it’s probably the best thing out there at the moment, but I’m totally in love with StringTemplate, even though you might say it has some rough edges, too.

But more on that on another day.

Over and out,
 Andreas