concept design pattern in category groovy

appears as: design patterns, design patterns
Groovy in Action, Second Edition

This is an excerpt from Manning's book Groovy in Action, Second Edition.

If you’ve never seen design patterns, we suggest you look at the classic Design Patterns: Elements of Reusable Object-Oriented Software by Gamma et al. (Addison-Wesley, 1994), or one of the more recent ones such as Head First Design Patterns by Freeman et al. (O’Reilly Media, 2004) or Refactoring to Patterns by Joshua Kerievsky (Addison-Wesley, 2004). Or, search for “patterns repository” or “patterns catalog” using your favorite search engine.

Although many design patterns are broadly applicable and apply to any language, some are particularly well suited to solving issues that occur when using programming languages like C++ and Java. They most often involve implementing new abstractions and new classes to make the original programs more flexible or maintainable. With Groovy, some of the restrictions that face C++ and Java don’t apply, and the design patterns are either of less value or more directly supported using language features rather than introducing new classes. We pick two examples to show the difference: the Visitor and Builder patterns. As you’ll see, closures and dynamic typing are the key differentiators in Groovy that facilitate easier pattern usage.