Design patterns are existing solutions created over time by encountering the same kind of problems in different scenarios. By applying design patterns, you leverage the knowledge of past mistakes and apply standard solutions, making code easier to comprehend and change if necessary.

The factory pattern’s main concern is to solve the problem of creating a new object where the actual creation is relayed/taken care of by another class. This other class decides what object will be created and when during the entire runtime.

A basic introduction would be as follows: there are multiple products you’d like to create as objects…



Anthony Rodriguez

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store