Chapter 18. Template Method
As in cooking, there are certain steps that can be generalized in common procedures, such as preparing ingredients, cooking the ingredients, and serving the dish. An actual recipe can vary within the scope of each of the steps. For a particular type of food, steps to take can be even further generalized. For example, there are common steps to make a sandwich, no matter what type it is. Each type of sandwich can vary by the type of bread that will be used, the type of meat that will be put in the bread, as well as condiments. Some sandwiches might be a little bit different from a generic sandwich, with some extra steps, but still basically follow the common steps to prepare.
A group of generalized steps (a recipe) to ...
Get Pro Objective-C Design Patterns for iOS now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.