Lunch and learn as3_frameworks

  • 1,090 views
Uploaded on

A whirlwind introduction to PureMVC and Robotlegs, presented by Yuri Visser, TJ Gillis and Paul Ward from www.theredspace.com

A whirlwind introduction to PureMVC and Robotlegs, presented by Yuri Visser, TJ Gillis and Paul Ward from www.theredspace.com

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,090
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
0
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. & PureMVC sample project: http://code.google.com/p/as3frameworkspuremvc/source/checkout https://as3frameworkspuremvc.googlecode.com/svn/trunk/  (svn) Robotlegs sample project: https://github.com/bardic/Robotlegs-Example- (SVN is lame. Here it is on github)
  • 2.
    • Uncle Ben Parker of Spider-Man fame once said,  "With great power comes great responsibility."
    • We all want great power when developing software, but the question is: Can we accept the responsibility?
  • 3.
    • Or more specifically...
    • Should we use a framework for our Flash, Flex & AIR projects?
  • 4. Outline...
    •      1. Presentation Goals
    •      2. Framework - Why and when?
    •      3. Design Patterns rolled into Frameworks
    •      4. Frameworks out there
    •      5. PureMVC intro
    •      6. Robotlegs intro
  • 5. 1.) Presentation Goals
    • Skimming the surface...
    •      1. Introduction to two of the hottest AS3 frameworks
    •      2. A primer for getting started
    •      3. Pizza...hell yeah!
  • 6. 2.) Framework - Why?
      • Simplified code (simple code is reliable code)
      • Reduce confusion over class roles and responsibilities - separation of concerns (discrete layers)
      • Promote scalability
      • Promotes re-usability (loosely coupled)
      • Speed up development process
      • Built on proven design patterns (OOP, Gang of Four[GoF])
  • 7. ...Framework - When?
      • Collaborative / team development...personally I'd say if there's more than two developers on a team.
      • Project size and/or complexity...if your project is gonna get big and complex - lots of classes with lots of roles.
      • Uncertain scope...you need the flexibility to so that IF  your project grows, your codebase can accommodate.
      • You simply want to create a clean and well structured codebase.
  • 8. 3.) Design Patterns rolled into Frameworks
    • Design Patterns are general reusable solution to a commonly occurring problem in software design. Object-oriented design patterns typically show relationships and interactions between classes or objects.
      • Behavioral Patterns:
        • Command Pattern
        • Observer Pattern
        • Template Method Pattern
        • State Pattern
        • Strategy Pattern
      • Multiple Patterns:
        • Model-View-Controller
        • Symmetric Proxy Pattern
      • Creational Patterns:
        • Factory Method Pattern
        • Singleton Pattern
      • Structural Patterns:
        • Decorator Pattern
        • Adapter Pattern
        • Composite Pattern
  • 9. ...continued
    • Today we'll inadvertently be looking at design patterns that address concerns related to high-level structures of applications being developed; Behavioral Design Patters rolled into a Framework = a collaborating set of design patterns.
    • Frameworks (a.k.a. micro-architectures)  are a special case of software libraries in that they are reusable abstractions of code wrapped in a well-defined Application programming interface (API).
  • 10. 4.) Frameworks out there
      • PureMVC
      • Robotlegs
      • Mate (the drink, not your friend)
      • Swiz
      • Parsley
      • Cairngorm
      • FlexMVCS / MVCS
      • Spring Actionscript
      • ...
  • 11. 4.) Meet the mothership...a.k.a. PureMVC
  • 12. ...PureMVC strengths
      • Well established
      • Large and active community
      • Very very very well structured
      • Thus...Extremely well suited for team development
      • Once you know it...coding is super-fast
      • Small footprint
      • Support for multicore (multiple application cores)*
      • Language agnostic- Ports for:
      • AS3
      • AS2
      • ColdFusion
      • C#
      • Objective C
      • Ruby
      • PHP
      • Python
      • Haxe
      • Java
      • Javascript
  • 13. *...mulitcore (Pipe, TeeSlipt, TeeMerge)
  • 14. ...PureMVC weaknesses
    • - none
  • 15. ...PureMVC weaknesses (for real)
      • Not a Flex specific framework
        • does not take advantage of MXML features. (e.g. binding, metadata)
      • Has own event model
        • integrating with Flex Event Model takes time, patience & practice.
      • Complex~ish learning curve
        • lame excuse cuz the benefits outweigh
      • Boilerplate code
        • requires the creation of many classes (hint: use a reproducible skeleton structure on templates)
  • 16. PureMVC 'Event Flow'
  • 17. On to Robotlegs...why? Because "We view things not only from different sides, but with different eyes; we have no wish to find them alike."  - Blaise Pascal
  • 18. 4.) Meet Robotlegs video
  • 19. Robotlegs Class Diagram
    •  
  • 20. Strengths
      • Very simple
      • Active community
      • Focuses on code, not structure
      • MVC is simply a suggestion
      • Very easy to unit test (but who tests, really?)
      • Designed for Flash/Flex/AIR
      • Awesome name and logo 
      • Uses Automated Dependency Injection 
      • No Boilerplate
  • 21. Weaknesses
      • No multicore 
      • Young
      • Small-ish comminuty (but very very active)
      • Can be difficult to find documentation/example of more advanced features
      • Metadata is scary at first
      • Injection errors don't throw compiler errors
  • 22. Automated Dependency Injection (DI)
    • Robotlegs leverages SwiftSuspenders for it's DI which is based on metadata e.g. [Inject] public var foo:Bar;
    •  
    • The benefit of DI is that it takes the responsibility from the classes of creating new objects. (Inverse of control)
    •  
    • This in turn return makes your classes much cleaner to read and increase writing speed.
  • 23. It's all about community...
    • Robotlegs has a very active community on twitter (#robotlegs) and on github where all of the source for the main framework can be found. 
    • https://github.com/search?type=Repositories&language=&q=robotlegs&repo=&langOverride=&x=15&y=22&start_value=1
    •  
    • They also have a community driven  support site : http://knowledge.robotlegs.org/
  • 24. x.) Resources & References
    • Software framework
      • http://en.wikipedia.org/wiki/Software_framework)
    • Design Patterns:
      • http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29
      • http://sourcemaking.com/design_patterns
    • GoF
      • http://en.wikipedia.org/wiki/Design_Patterns_%28book%29
      • http://www.amazon.ca/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612
    • PureMVC:
      • http://www.adobe.com/newsletters/edge/december2008/articles/article6/index.html
      • http://en.wikipedia.org/wiki/PureMVC
      • http://www.puremvc.org
    • Choosing a framework:
      • http://www.adobe.com/devnet/flex/articles/flex_framework.html
    • Actionscript 3.0 Design Patterns (O'REILLY, ISBN-10: 0-596-52846-9):
      • http://www.amazon.ca/ActionScript-3-0-Design-Patterns-Programming/dp/0596528469
  • 25. Parting thought
    • In the words of marketing guru John Colanzi , "Sometimes you have to take a step back before you can move forward."
    • As developers mature and their skills increase on the long road to mastery, there are few opportunities to truly leap forward. These special moments are the result of taking calculated risks to step up their game.
    • While using this framework admittedly has a learning curve, can initially increase development time, and requires discipline, you may find it well worth the effort.
    • Evolving from creating custom, per-project frameworks to using a consistent, framework is one such opportunity to leap forward.