Action Script Design Patterns And Platforms

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    2 Favorites

    Action Script Design Patterns And Platforms - Presentation Transcript

    1.  
      • You’re going to learn about a number of design patterns.
      • You’re going to work out some of them in code.
      • You’re going to apply most of the patterns we learn today towards an example Model View Controller application
      Quick Overview
      • Are reusable solutions to common design problems
      • Improve the development workflow
      • Help teams to work together efficiently
      • Help you deal with change
      Design Patterns…
      • are not Algorithms
      • are not Architectural Patterns
      • are not finished designs
      • are not written in stone
      Design Patterns…
    2. Singleton Pattern
      • The one and only
      • has only ONE instance ever
      • is created only when needed
      • assures that every object in an application is using the same resource (global access point)
      The Singleton Pattern…
    3. Singleton Pattern Lab
      • Use this pattern when you need one and only one instance of a class
      • The package mx.managers are all singletons
        • DragManager
        • CursorManager
        • HistoryManager
        • FocusManager
        • etc…
      Singleton Pattern Tips
    4. Command Pattern
      • Execute Here 
      • encapsulates method invocation.
      • is used to carry out ‘orders’ like
        • authenticate user
        • process form
        • sit on cat
      • often encapsulates an algorithm.
      • often performs tricky operations.
      The Command Pattern…
    5. Command Pattern Lab
    6. Observer Pattern
      • defines a one to many relationship between objects so when one object changes, all the observers are notified.
      • is also known as Publish and Subscribe.
      • is used in event driven design.
      • reduces coupling between classes, but they can still interact.
      The Observer Pattern…
    7. Event Dispatcher Observer Observer Observer In this lab, we’re going to leverage the Observer Pattern implementation built into the Flash Player. Observer Pattern Lab
    8. Proxy Pattern
      • May I Help You?
      • stands in for and provides access to another object.
      • can control or guard access
      • can be used to manage instantiation
      A Proxy…
      • The Virtual Proxy stands in for an object that
      • is expensive to create
      • is not immediately available
      • The Loader class is a Virtual Proxy.
      The Virtual Proxy DisplayObjectContainer Loader Sprite Stage MovieClip
      • The Remote Proxy stands in for a remote object and,
      • delegates requests to a remote object
      • manages communication with remote object
      The Remote Proxy Image Search Flickr API Remote PhotoProxy Remote Service Your Application
      • In this lab, we’re going to implement a remote proxy and learn about a time saving technique.
      Proxy Pattern Lab Image Search Flickr API Remote PhotoProxy Remote Service Your Application
    9. Façade Pattern
      • Hiding Complexity
      • The Façade pattern simplifies access to a collection of objects.
      • Often implemented as a singleton (only need one)
      • Hides the complexity of underlying objects
      Façade Pattern… Application Facade Model View Controller
    10. Adapter Pattern
      • a.k.a. Wrapper
      • The Adapter pattern converts and translates the API of one object to the API of another object.
      • often applied when reusing legacy code
      • providing a common API to several 3 rd party libraries or algorithms
      Adapter Pattern… Music Player MP3 Adapter FLAC Adapter AC3 Adapter FLAC Decoder MP3 Decoder WAV Decoder
    11. Mediator Pattern
      • Central Communication
      • The Mediator Pattern is used to centralize complex communication and control between related objects.
      Mediator Pattern Application Username Textbox Password Textbox Submit Button New Account Form Account Form Mediator
    12. Model View Controller
      • A collection of patterns
      • The MVC Pattern is a collection of patterns used to address the challenges presented by rich user interfaces.
      Model View Controller (MVC)
      • MVC brings order to applications and application development by,
      • decoupling the user interface of an application from the data model and business logic.
      • allow each of the elements to be changed without impacting the other.
      • improve communication and understanding between developers so they can work independently and more efficiently.
      Model View Controller (MVC)
      • Model
      • View
      • Controller
      • Command
      • Façade
      • Proxy
      • Mediator
      • Observer
      • Notification
      • Model
      • View
      • Controller
      • Command
      • Delegate
      • Service
      • CairngormEvent
      Cairngorm Quick Comparison
      • Platform independent (AS2, AS3, Coldfusion, Java, C#, Perl, Python, PHP, Ruby)
      • Excellent Documentation and Active Development Community
      • Winner at SilvaFUG between 9 frameworks
      Cairngorm What I Like About PureMVC
    13. PureMVC Conceptual Diagram
      • Flash/Flex Development Services :
        • Yossi Cohen
        • [email_address]
        • 09-8850956, 054-5313092
      • Flash / Flex Courses & Seminars:
        • Alona Ashkenazi
        • [email_address]
        • 09-8651933
      www.dsp-ip.com Giborey Israel 20, POB 8323, Netanya Office Phone: 09-8850956, Fax: 050- 8962910 DSP-IP Contact information
    14. Thank You

    + Yossi CohenYossi Cohen, 11 months ago

    custom

    1213 views, 2 favs, 0 embeds more stats

    This course review design patterns in ActionScript3 more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1213
      • 1213 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 2
    • Downloads 0
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories