CHAPTER 7

image

Behavioral Patterns

Each object used in a adds a specialized behavior. It may be computational or managerial, but regardless of the specifics, the objects aim to facilitate specific goals in a system.

Code that should be encapsulated is too often hard-coded in a class, due to the ease of maintaining scope. Time constraints, lack of practice, and unfamiliarity with better techniques are all reasons a developer may allow non-encapsulated behaviors to add unnecessary lines of code to classes. Doing so can make a class more difficult to maintain and adjust, and decreases the code’s reusability.

Behavioral patterns abstract the objects that ...

Get Advanced ActionScript 3, Second Edition 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.