Key Points

  • Code can be made much more efficient if it's built with the four principles of OOP in mind: encapsulation, data hiding, polymorphism, and inheritance.
  • Generalizing common behavior allows for interchangeability.
  • The goal of OOP is to build an architecture that allows flexibility and easier maintenance.
  • Class names should be specific to the behavior they define and should always begin with an uppercase letter.
  • The keyword implements lets you add into your class the methods required by other defined types.
  • The point of creating a class isn't only to use it to build objects, but also to separate behaviors and/or data. Instantiating an object means you expect the behaviors and/or state to change.
  • Don't resort to mimicry or memorization ...

Get AdvancED ActionScript 3.0: Design Patterns 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.