ActionScript 3.0 Design Patterns

(Chris Devlin) #1

60 | Chapter 1: Object-Oriented Programming, Design Patterns, and ActionScript 3.0


Figure 1-10 shows some possible future extensions to the application (those with


dashed lines). The value of granularity is that the new classes can use some or all of


the more granular functions. That would be impossible with the single Big Function


from the previous section. Likewise, new functions can be added and used with the


old ones.


Your Application Plan: It Ain’t You Babe


Jennifer Tidwell, in talking about interface design, reminds the designer that what-


ever else is true, the designer/developer isnotthe audience (or the client for that


manner). Before pulling out your program development tools, you really need to get


together with the client and find out what the client wants. The image of the pro-


grammer as the guy in the basement with a ponytail (whom we don’t let talk to our


clients) simply isn’t a workable model, especially when you’re planning for the Web.


Because the Web and Web-related technology are always changing, as clearly evi-


denced by the changes in Flash and ActionScript over recent years, what can and


cannot be accomplished by any software tool is always changing. Because the devel-


oper is responsible for knowing the limits and possibilities of software better than


anyone, she needs to be part of the process. In larger firms, this role is part of a


graphic design, interface design, human computer interaction (HCI) designers, and


information design team. In smaller firms, the developer may have to fill several


roles, but whatever the arrangement, developers need to be part of the process inter-


acting with the client whose business or organization depends on accomplishing a


goal. The better the developer understands what the client wants and the better he


can communicate the opportunities and limitations of the software to accomplish the


goals, the more likely the software produced will accomplish what the client needs


for success.


Using OOP and Design Patterns to Meet Client Goals


The role of object-oriented programming and design patterns is to help the software


developer plan for creating a site that keeps the client’s site healthy. Keeping a site in


good shape depends on the capacity to regularly update it, and to expand it when


needed. Too often developers think of a web site as static, but sites are dynamic, liv-


ing entities—or at least need to be conceived that way. Design patterns constitute a


set of plans—architectural designs if you will—that provide the tools to keep web


sites alive.


Flexibility is inherent in software reusability. Both OOP and design patterns were


developed with the goal of both reusability and flexibility, and if an application is


approached in the most practical manner imaginable, then design patterns make a


great deal of sense. So rather than being a set of strict rules for creating great soft-


ware, design patterns represent flexible tools for creating exactly the kind of site your


client needs.

Free download pdf