Hello world!

Not bad, but not exactly object oriented. Improve all the code!

That’s better. That string is nagging me, though. It should be declared as a constant. Improve all the code!

That’s better. However, there is still something wrong. I don’t like how my code expects an instance of Greeting, what if I need a different implementation of the greet method?. Improve all the code!

But wait! Now there is a hardcoded dependency in there. I expect an abstraction, but create an instance of a specific class. This clearly calls for a factory. Improve all the code!

Welcome to my blog.


Leave a Reply

Your email address will not be published. Required fields are marked *