Skip to content

Misleading example [Factory Pattern] #52

Open
@kshirish

Description

@kshirish

The example of factory pattern is misleading. Although the definition says,

Define an interface for creating an object, but let subclasses decide which class to instantiate. Factory Method lets a class defer instantiation to subclasses.

But the example doesn't use any subclasses at all. Whereas, Addy Osmani's example explains it pretty well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions