Slide 1

Slide 1 text

Test Your Robotlegs Project photo by frogDNA ৷ԈᎲ

Slide 2

Slide 2 text

9th Flash/AS Study Group

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

Previous on Robotlegs...

Slide 5

Slide 5 text

Where we sart..

Slide 6

Slide 6 text

Every Robotlegs project begins with a Conext.

Slide 7

Slide 7 text

Use sartup() o provide your injection rules, map your mediaors o views and commands o events.

Slide 8

Slide 8 text

Dependency

Slide 9

Slide 9 text

A dependency is just a requirement o use another object

Slide 10

Slide 10 text

Injection

Slide 11

Slide 11 text

Injection is cool, but it isn’t magic!

Slide 12

Slide 12 text

Don’t inject base types.

Slide 13

Slide 13 text

The injecor must be declared as public.

Slide 14

Slide 14 text

or they will be silently ignored.

Slide 15

Slide 15 text

Mediaor

Slide 16

Slide 16 text

Robotlegs mediaors are bridges, not view controllers.

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

Mediaor just do translation jobs!

Slide 20

Slide 20 text

Command

Slide 21

Slide 21 text

A Command is a concise single- purpose controller object.

Slide 22

Slide 22 text

A command is just a class which has a public execue() method.

Slide 23

Slide 23 text

The advanage o exending the Command class is that many handy injections are already made for you.

Slide 24

Slide 24 text

Commands should do their thing and then die.

Slide 25

Slide 25 text

Model and Service

Slide 26

Slide 26 text

A service doesn’t sore daa. A model doesn’t communicae with the outside world o retrieve daa.

Slide 27

Slide 27 text

If they don’t dispach events o the shared event dispacher , you don’t need o exend Acor.

Slide 28

Slide 28 text

Archiecture

Slide 29

Slide 29 text

you should always let your model design drive your service design, and never the other way around.

Slide 30

Slide 30 text

if only the view classes care about this logic, it belongs in your view layer.

Slide 31

Slide 31 text

if other parts of the application might need o be checked or informed, it’s controller code.

Slide 32

Slide 32 text

if you’ve already forgoten these things I just mentioned.. you can visit: www.eddie.com.tw/slides

Slide 33

Slide 33 text

TONIGHT!

Slide 34

Slide 34 text

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

Slide 35

Slide 35 text

Before we sart..

Slide 36

Slide 36 text

In your company, who does these ests?

Slide 37

Slide 37 text

and, how do they do ests?

Slide 38

Slide 38 text

How can codes are esable?

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

You might heard about the “DDD”

Slide 41

Slide 41 text

“Deadline-Driven Development”

Slide 42

Slide 42 text

or “SCDD”

Slide 43

Slide 43 text

“Stupid-Client-Driven Development”

Slide 44

Slide 44 text

TDD

Slide 45

Slide 45 text

Twiter-Driven Development

Slide 46

Slide 46 text

Test-Driven Development

Slide 47

Slide 47 text

Test != Debug

Slide 48

Slide 48 text

Live Coding Time!

Slide 49

Slide 49 text

and it’s REALLY Live Coding!

Slide 50

Slide 50 text

Any Question? photo by jamuraa

Slide 51

Slide 51 text

৷ԈᎲ 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 [email protected] +886-928-617-687