in Back to PHP

My Way to PHP: Day 15 of 75

Day 15, 2 weeks ago I started my way. I progress forward which is great. Today, I’m going to start a new book. I want to get a bit more exposure to architecture. I noticed when I designed my project that I changed a lot around. My goal is 50 pages again!

I decided to start Pattern-Oriented Software Architecture For Dummies. The reviews looked quite good and the pattern, reading from the ToC weren’t the standard ones you read everywhere. Let’s see!

The discussions of these patterns seemed to me, however, to focus on getting the structure of the object-oriented program’s header files and class definitions correct at the expense of the real application. In this book, I give you an understanding of the solutions to the problems, not the detailed header files. I want you to understand the principles involved rather than get caught up in the implementation details.

Sounds great!

  • Components Building blocks of the system
  • Services Things that components provide to actors and other components

I just finished the first part (of five) and it was a general introduction into patterns and architecture. Quite interesting and I think undervalued.

The second part was about the organization of patterns, creating your own collection and finding the right pattern. Still pretty general.


Component: Layers, communicate only with adjacent layers (request to below and answer above)

I really like how the author shows how versatile that pattern is.

Pipes and Filters

For streaming data.

Data source -> Pipe -> Filter -> …. -> Pipe -> Data sink

Pipes can be queues for example.


Combine knowledge of multiple sources and build upon them.

The idea is to implement a blackboard on which individual knowledge sources can write (on their own place) and read all. It’s a central collection of different sources.

Finally, there’s a blackboard system control which monitors the blackboard and invoking knowledge sources.

If the system control is missing then it’s called a repository.


A central hub for coordination services

Client Broker Server

  • Servers register with broker


  • Agents = autonomous components
  • Each agent consists of:
  • Abstraction: Data
  • Control: Behaviour
  • Presentation
  • There are three levels of agents:
  • Top-level
  • Intermediate level
  • Bottom level
  • Each agent can be accessed by the level above it

The idea is that each agent does everything for itself. This makes sense if there’s not a single user interface. One example could be an interface with multiple widgets which interact independently.


  • Policy layer: translates API calls to underlying OS
  • Servers: Services outside the core (Internal / External)
  • Adapter / Emulation: Wrapper around internal details
  • Clients: Talk to adapters and use the system


  • Base level: Doesn’t change
  • Meta level: Changes
  • Meta-object protocol (MOP): How are changes to the meta level made?

It doesn’t has to be implemented on a language level. Examples of reflection are: configuration files, loading plugins, etc.

Part 4.

Whole-Part Pattern

The whole is greater than the sum of its parts aka. modules and glue!


  • Slaves: all doing the same/very similar work
  • Master: Distributes work, may coordinate slaves, reduces work

I wanted to watch at least one talk today. I chose:

It Doesn’t Work That Way in Enterprise

You have to take that out. I client might see it and they might want it.

Jesus. :D

Solid advice! I did those things to a large part in my last job. I introduce new concepts, taught others, held internal workshops, etc. It made my work place a lot better!

So, I worked a bit more on the project. For once, I configured my server to host apache2 and php.

Also, I trying to automate my build. Somehow PHPDocumenator won’t want to render the output.

Boy, that took way too long. I finally fixed the problem.

The solution was to pass the include path to the target.

<includepath classpath="./vendor/phpdocumentor" />

I also included PHPUnit and SQL deployment. Yeah. Furthermore, I changed the grouping a bit and clean up.

Ok, enough for today. Working on the small project is really good. I can take enough time to try things out especially my tool chain. Instead of producing a product quickly I can slowly learn the tools. Pretty neat!

Updates Goals:

  • Get a bit more exposure to OOP and OOD
  • Learn a bit more about MySQL
  • Learn Symfony2
  • Write at least one web app using Symfony2 and its core components (templating, testing, forms, validation, security, caching, i18n)
  • Watch one video per day on average

Progress status


In Progress

  • Reading Pattern-Oriented Software Architecture For Dummies [285 of 384 pages]
  • Watch one video per day on average [41 of 75]

Write a Comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.