DIP
• Code should depend on
things that are at the same
or higher level of
abstraction
• High level policy should not
depend on low level details
Slide 6
Slide 6 text
Object instantiation / usage separation
• Don’t mix (compile / runtime )
• One time object construction
DPNQJMF
SVOUJNF
Slide 7
Slide 7 text
Application object graph by context
• Application is single big one valuable
• Change structure, not behavior
$app
Object
i/f
i/f
Object
i/f i/f
Object
Router
Response
JSON
XM
L
Slide 8
Slide 8 text
Application class
Slide 9
Slide 9 text
ʁ
#FUUFS
DPNQJMF
SVOUJNF
Slide 10
Slide 10 text
Ray.Di
• Annotation based DI framework
• Binding DSL
• True DI
Slide 11
Slide 11 text
AOP
• Cross cutting concern as framework function
• Multi layered architecture
Cache
Log
Auth
Slide 12
Slide 12 text
Aspects
• log / cache / validation ... are aspects.
• Core concern is your domain model, not aspects.
Slide 13
Slide 13 text
Binding by context
• Annotate, then bind interpretation
• @Api is intention. “JSON” is implement.