Simple Factory Pattern

From JholJhapata
Revision as of 15:32, 18 February 2020 by Admin (talk | contribs) (Created page with "Simple Factory Pattern returns an instance of one of several possible classes depending on the type of data provided. It is quite common to return a common parent class and co...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Simple Factory Pattern returns an instance of one of several possible classes depending on the type of data provided. It is quite common to return a common parent class and common methods, but each may perform a task differently or optimize for different data or behaviors.