Work towards #56: Splitting up the README
I did the job and splitted up the readme, hopefully everything was splitted correctly...
This commit is contained in:
19
factory-method/index.md
Normal file
19
factory-method/index.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
layout: pattern
|
||||
title: Factory Method
|
||||
folder: factory-method
|
||||
categories: creational
|
||||
tags: pattern_tag
|
||||
---
|
||||
|
||||
**Intent:** Define an interface for creating an object, but let subclasses
|
||||
decide which class to instantiate. Factory Method lets a class defer
|
||||
instantiation to subclasses.
|
||||
|
||||

|
||||
|
||||
**Applicability:** Use the Factory Method pattern when
|
||||
|
||||
* a class can't anticipate the class of objects it must create
|
||||
* a class wants its subclasses to specify the objects it creates
|
||||
* classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate
|
Reference in New Issue
Block a user