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.