Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Test Your Robotlegs Project

Dbfa12cd7e1ff8b06a588609369d6e49?s=47 高見龍
December 13, 2011

Test Your Robotlegs Project

Some quick tips about Robotlegs, and show how to test your robotlegs project in the Flash/AS party. Sorry the video of live coding is currently not available.

Dbfa12cd7e1ff8b06a588609369d6e49?s=128

高見龍

December 13, 2011
Tweet

Transcript

  1. Test Your Robotlegs Project photo by frogDNA ৷ԈᎲ

  2. 9th Flash/AS Study Group

  3. a.k.a Eddie or Aquarianboy Live and work in Taipei, Taiwan.

    Serving in my own little tiny company. Flash / AS3 / Ruby / Rails / Python programming for living. A little bit Objective-C for personal inerests. Technical Education and Consulant. PTT Flash BM (since 2007/4). Adobe Certificaed Flash Developer (Since 2006/7). Linux Professional Institue Certification (Since 2005/3). ৷ԈᎲ photo by Eddie
  4. Previous on Robotlegs...

  5. Where we sart..

  6. Every Robotlegs project begins with a Conext.

  7. Use sartup() o provide your injection rules, map your mediaors

    o views and commands o events.
  8. Dependency

  9. A dependency is just a requirement o use another object

  10. Injection

  11. Injection is cool, but it isn’t magic!

  12. Don’t inject base types.

  13. The injecor must be declared as public.

  14. or they will be silently ignored.

  15. Mediaor

  16. Robotlegs mediaors are bridges, not view controllers.

  17. Don’t imagine it as part of your view layer.

  18. Adding view logic o mediaors gets messy very quickly.

  19. Mediaor just do translation jobs!

  20. Command

  21. A Command is a concise single- purpose controller object.

  22. A command is just a class which has a public

    execue() method.
  23. The advanage o exending the Command class is that many

    handy injections are already made for you.
  24. Commands should do their thing and then die.

  25. Model and Service

  26. A service doesn’t sore daa. A model doesn’t communicae with

    the outside world o retrieve daa.
  27. If they don’t dispach events o the shared event dispacher

    , you don’t need o exend Acor.
  28. Archiecture

  29. you should always let your model design drive your service

    design, and never the other way around.
  30. if only the view classes care about this logic, it

    belongs in your view layer.
  31. if other parts of the application might need o be

    checked or informed, it’s controller code.
  32. if you’ve already forgoten these things I just mentioned.. you

    can visit: www.eddie.com.tw/slides
  33. TONIGHT!

  34. Tonight, we’re going o alk about Testing.

  35. Before we sart..

  36. In your company, who does these ests?

  37. and, how do they do ests?

  38. How can codes are esable?

  39. Test-first development is hard — it’s hard because it forward-shifts

    your confusion.
  40. You might heard about the “DDD”

  41. “Deadline-Driven Development”

  42. or “SCDD”

  43. “Stupid-Client-Driven Development”

  44. TDD

  45. Twiter-Driven Development

  46. Test-Driven Development

  47. Test != Debug

  48. Live Coding Time!

  49. and it’s REALLY Live Coding!

  50. Any Question? photo by jamuraa

  51. ৷ԈᎲ Conacts photo by Eddie Websie Blog Plurk Facebook Google

    Plus Twiter Email Mobile http://www.eddie.com.tw http://blog.eddie.com.tw http://www.plurk.com/aquarianboy http://www.facebook.com/eddiekao http://www.eddie.com.tw/+ https://twiter.com/#!/eddiekao eddie@digik.com.tw +886-928-617-687