Decorator Patterns in PHP

When we want to add additional features to our existing classes we generally use decorator pattern.
Do you find this definition useful?
I believe the answer will be NO.
It says about only adding new features. It doesn’t say about how you will use that. Will you add the features by simply hard coding or you’ll add them in the run time.
That’s a pretty big difference.
Let us consider a simple example where we are talking about a hosting company. A typical hosting company sells hosting services and sometimes they also provide template designing.
Let’s design a pretty basic scenario.

Continue reading “Decorator Patterns in PHP”

A Humble approach to my books…

First, it was a mail from Pramila Balan, the acquisition editor of Apress. They wanted to publish my book on ethical hacking.
After a few more conversations they finally decided to publish two books – another one about Laravel that has been in the market nearly for a year or more.
My Books in Apress
I saw the whole development as a warning from my creator, probably the last warning; that simply says: grow up, life is too short and there are so many things to do.