A design pattern that provides an interface for creating objects without specifying their exact classes, allowing the factory to decide which class to instantiate based on given parameters. This promotes loose coupling by eliminating the need for client code to know specific class names.
Named after manufacturing factories that produce different products using the same production interface, first formalized in the Gang of Four book (1994). The pattern emerged from the need to create objects dynamically without hardcoding class dependencies.
The Factory pattern is like ordering a car from a dealership - you tell them 'I want a sedan with good gas mileage' and they give you the right car without you needing to know every model's internal part numbers! This makes your code flexible because adding new car types doesn't require changing the ordering process.
Complete word intelligence in one call. Free tier — 50 lookups/day.