Kode Log

Change is now. Learn, unlearn & relearn.


Design Patterns

All the stuff related to design patterns go here.

So, Singleton or Monostate?

Continuing with the design pattern fun, lets talk about one of the most commonly used pattern, Singleton and an alternative called Monostate. I too wrote about singleton pattern relative to Joshua Bloch’s Effective Java a few days back. The Basic… Continue Reading →

Factory Design Pattern

People have been appreciating the effort I am putting in each post these days. Feels good. Moving on with another design pattern, we have the ‘Factory Design Pattern’. It is also known as the Simple Factory Design Pattern. There exists… Continue Reading →

Observer Design Pattern

As I mentioned in my previous example for Strategy Design Pattern, that the design patterns are best understood with examples. Without wasting any more time, I’ll just define our simple problem. Problem: We have a newspaper say, “GlobalTimes” (fictitious name)…. Continue Reading →

Strategy Design Pattern

Design patterns are better understood when we try learning them with an example. Lets take up a problem here. Problem: Lets say there are Animals which can fly and those which cannot. Since, the world is constantly evolving, any animal… Continue Reading →

Builder Pattern For Complex Validations

So, here is an extensible API for complex validations. I’ve written a small piece of code for common validations. The code can be extended to introduce more complex validations. Highlights – Builder Pattern Extensible code Non-instantiable Validation class Used a… Continue Reading →

© 2018 Kode Log — Powered by WordPress

Theme by Anders NorenUp ↑