As3 Code Gen From Uml

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

    Favorites, Groups & Events

    As3 Code Gen From Uml - Presentation Transcript

    1. GENERATING AS3 CODE Adam Breindel [email_address]
    2. Motivation
      • Porting a Large App
      • Multiple Object “Projections”
        • Infrastructure domain
        • Rendering domain
        • Conceptual (user-facing) problem domain
      • User facing domain leant to UML modeling
      • Made several tries to get it right -- rewriting
    3. Solution
      • We’re discussing with UML on a whiteboard
      • So…
      • Let’s use a UML tool and gen code
      • Quick Demo
    4. Lots of UML tools
      • Legacy of the process-based OO of the 90s
      • Cost cutting and move to agile processes results in many light, free tools
    5. Not a Lot of AS3
      • New langage
      • Owned by one vendor
      • Was 1 commercial tool (now 2 or so)
      • Not free: $300-$400 per seat
    6. Hack a UML Tool…
      • Picked Cay Horstmann’s Violet UML
        • Very lightweight!
        • Used in academia
        • All Java, appeared easy to hack
        • Not the only choice, but fine for our purpose
    7. … to Generate ActionScript 3
      • Super Hack Way
        • Write code to print strings out to files
        • Doesn’t leverage language structure to DRY
        • Has no hope of reverse engineering code – requires totally separate parser
      • Sophistimicated Way
        • Use a meta-language API built with a parser generator … kind of like using half the guts of a compiler
    8. Enter Metaas
      • By David Holroyd
      • Java API wrapping an ANTLR-generated AS3 processor
      • http://www.badgers-in-foil.co.uk/projects/metaas/
    9. Required Minimal Monkeying
      • Building Metaas from source to get latest fixes requires ANTLR
      • ANTLR was in between versions 2 and 3
      • But now Metaas has a new version (0.8)
      • And ANTLR is most definitely in v3
      • And anyway ANTLR is exceptionally cool!
    10. Grammar Tool (Eye Candy)
    11. Simple-ish Integration
      • Add a menu item for export to AS3
      • Find all the objects and relationships
      • Generate an object for each class, interface
      • Modify the class declaration based on
        • Packages in diagrams
        • Parent classes / interfaces in diagram
      • For each class or interface
        • Generate methods, fields, properties
        • Flush to file
    12. Upgrade
      • Updated to use re-skinned extended version of Violet
      • Can run via JNLP or possibly as Eclipse plug-in
    13. Feature List
      • Packages
      • Classes
      • Interfaces
      • Visibility modifiers (+, -, #, empty)
      • Arg types, return types
      • Field-wrapping properties (@)
      • Aggregation (as Array)
      • Inheritance (extends, implements)
    14. Let’s Play a Little More
      • This is open source
      • It is far from perfect
      • So add whatever you like!
      • Project page: http://selfmummy.com/vasgen/
    15. Questions?
      • My contact info:
        • Adam Breindel / Ind. Consultant
        • [email_address]
        • http://skipmeamadeus.blogspot.com

    + adbreindadbreind, 2 years ago

    custom

    1429 views, 0 favs, 1 embeds more stats

    Slides from an SF presentation on generating AS3 co more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1429
      • 1418 on SlideShare
      • 11 from embeds
    • Comments 0
    • Favorites 0
    • Downloads 11
    Most viewed embeds
    • 11 views on http://skipmeamadeus.blogspot.com

    more

    All embeds
    • 11 views on http://skipmeamadeus.blogspot.com

    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