Abstract Factory

Maharajan Shunmuga Sundaram
3 min readOct 31, 2020

Problem

For example, every application needs to log messages which is useful to understand what is going on in the system. Functionality of logging is to trace messages with supplied context. We may need more than one type of logging for various reasons. We may need to log the messages in console while debugging or trace the messages in file in real world or change format to OC4J logging format etc. These are family or product of objects which do same thing in different manner. Application using the logging should not change when new product is added. Abstract factory solves this problem.

--

--