Next chapter is quite complex. Literally complex. And I treat it as a last chapter of the book since it is a last chapter when you learn a new design pattern in a detailed way. And the last one of them is quite popular in many PHP frameworks. It is called MVC (Model-View-Controller). Maybe this …
Category Archive: PHP
Permanent link to this article: https://blog.lukaszewski.it/2014/12/07/design-patterns-compound-patterns/
Hi! I’ve been very busy since the beginning of the year. Hopefully I’ll write here something longer soon but today I only found few minutes to update the Design patterns: adapter post after reading an interesting article on Sitepoint.
Permanent link to this article: https://blog.lukaszewski.it/2014/04/09/small-update-in-the-adapter-post/
Jan 31
Design patterns: proxy
New 2014 year did not start easy for me in terms of describing new design pattern I have learnt by reading the book. The cause of it is next chapter I have read more than a month ago. It describes new proxy pattern but it describes it mostly in Java environment. However, it does not …
Permanent link to this article: https://blog.lukaszewski.it/2014/01/31/design-patterns-proxy/
Dec 29
Design patterns: state
It’s about the time to put another design pattern post on my blog. This time I’ll write about state design pattern about which I read in the book. State pattern helps objects to control their behavior by changing their internal state. I also learnt it’s really similar to the first pattern in the book which …
Permanent link to this article: https://blog.lukaszewski.it/2013/12/29/design-patterns-state/
Nov 19
Design patterns: composite
While describing iterator pattern on previous post I mentioned it was a part of a bigger chapter in the Head First: Design Patterns book. The second design pattern described in the chapter is called composite. The composite pattern helps us create tree structures in our code. The book example this time is pretty straight-forward but …
Permanent link to this article: https://blog.lukaszewski.it/2013/11/19/design-patterns-composite/
Oct 14
Design patterns: iterator
Next chapter in the book is the longest one. But I will split it into two posts because it’s about two design patterns. The first one’s name is: iterator and it was mentioned at least once before. I recall it while describing examples of adapter pattern usage. The iterator pattern, unlike other design patterns, helps …
Permanent link to this article: https://blog.lukaszewski.it/2013/10/14/design-patterns-iterator/
Sep 22
Design patterns: template method
Chapter eight of the book is about template method pattern. It’s another way of encapsulation. The examples shows how to encapsulate piece of algorithms so the sub-classes can hook themselves right into computation any time they want. We learn a new design principle too! Book example First example is a real one from real life! …
Permanent link to this article: https://blog.lukaszewski.it/2013/09/22/design-patterns-template-method/
Aug 31
Design patterns: facade
The adapter pattern mentioned in previous post was only one of two design patterns mentioned in seventh chapter in the book. When you continue the reading you’ll find interesting discussion between a decorator and an adapter. It leads to the conclusion that both of these two design patterns seem to look similar on a paper …
Permanent link to this article: https://blog.lukaszewski.it/2013/08/31/design-patterns-facade/
Jul 27
Design patterns: adapter
This time I’m writing about adapter pattern. This is an easy one to understand. Why? Because our world is full of real-life adapters. The authors of the book gives just this simple example about AC power adapter. We use it while traveling from Europe to United States because we want our laptops work there. So, …
Permanent link to this article: https://blog.lukaszewski.it/2013/07/27/design-patterns-adapter/
Jun 30
Design patterns: command
This month I’m writting about command pattern. This is another design pattern which helps us decoupling some actions in similar way to strategy pattern. To be more specific it makes us able to encapsulate method invocation. The last word made me thinking of PHP unit tests while reading — but I’ll get back to it …
Permanent link to this article: https://blog.lukaszewski.it/2013/06/30/design-patterns-command/