Software Design

Factory Method: Extensible Document Importers

UML Class Diagrams · made in Skemio

UML class diagram showing an abstract DocumentImporter with subclasses CsvImporter and JsonImporter producing DocumentReader implementations.
UML class diagram showing an abstract DocumentImporter with subclasses CsvImporter and JsonImporter producing DocumentReader implementations.

What it shows

  • Delegates object creation to subclasses without touching client workflows.
  • Enforces unified parsing contracts across heterogeneous document formats.
  • Prevents hardcoded constructor calls across business pipelines.

The takeaway

Subclasses decide which concrete product to instantiate, keeping high-level workflows stable.

More uml class diagrams