hexMachina
urban framework for hardcore developers
?
francis bourre / Docler Holding
author of @pixlib
pixLib adventures
in the web apps jungles
pixLib adventures
“Let’s grab knowledge from other Tech eco-systems”
in the web apps jungles
@tweenpix.net 2003
pixLib adventures
pixlib (as2)
pixioc (as2)
lowra (as3)
palmer (as3)
pixlib community version (as3)
pixlib closed source version (as3)
hexMachina (as3)
2003
2004
2007
2008
2008
2009
2015
@tweenpix.net 2003
Six Feet Under
2015
...
How can I target the browser now?
with a statically typed language
No interface @compile time
with extra benefits
hexMachina
Which kind of framework is it...
and what is the goal?
Monolith framework?
Monolith framework?
Many repositories available:
Core, Annotation, Inject, Service, MVC, IoC,State...
Golden Principles
for maintaining long lifecycle applications
Golden Principles
for maintaining long lifecycle applications
Golden Principles
for maintaining long lifecycle applications
Golden Principles
for maintaining long lifecycle applications
Secure collaboration
design by contract @compile time
INTERFACEs
define contracts
INTERFACEs
define contracts
INTERFACEs
define contracts
INTERFACEs
define contracts
Code reusability
modular system and configurable components
MODULE
Every module is a micro-application
...And proud to be.
DOMAIN
Every module belongs to an unique domain
.slides
.wwx
.live
.hx
.docler
.talk
.modular
MODULE
micro-application
(and/or Controller/s)
Low coupling
prefer runtime coupling - USE IoC
Jimmy!
Answer me!
Hollywood principle
" Don’t call us, we will call you "
Dependency Injection
Automate coupling
Use automatic dependency injection
INJECTION with ANNOTATIONS
hexAnnotation
Do dirty reflection job @compile time
LoadPhotosCommand.__meta__ = { obj : { 'hex.di.IInjectorContainer' : ["{\"ctor\":{\"args\":[],\"isPre\":false,\"name\":\"new\",\"isPost\":false,\"order\":0},\"props\":[{\"isOpt\":false,\"name\":\"photosService\",\"type\":\"IGetPhotosService\",\"key\":\"\"},{\"isOpt\":false,\"name\":\"galleryModel\",\"type\":\"IGalleryModel\",\"key\":\"\"}],\"name\":\"LoadPhotosCommand\",\"methods\":[]}"]}};
hexInject
hexInject
hexInject
hexInject
hexInject
hexInject
hexInject
Build configurable architecture
use Domain Specific Language
hexIoC
Injections with DSL
DSL PARSING/ASSEMBLING FLOW
Xml Parser
parses
DSL PARSING/ASSEMBLING FLOW
Xml Parser
Assembler
parses
translates
DSL PARSING/ASSEMBLING FLOW
Xml Parser
Assembler
Context Factory
parses
translates
Runtime @pplication
builds
DSL PARSING/COMPILING FLOW
Xml Parser
Assembler
CompileTime Factory
parses
translates
Generated Code
generates
HEXMACHINA DSL
hello world
HEXMACHINA DSL
String is default type
HEXMACHINA DSL
simple module creation
SERVICES
service locator / services mapping
HEXMACHINA DSL
constructor injection by DSL
After compilation
JavaScript is generated
INCLUDE
recursive files inclusion
DSL CHECKING
@compile time
Fail early, fail loudly
DSL CHECKING @compile time
type not found
DSL CHECKING @compile time
missing ID
DSL CHECKING @compile time
file missing
Low coupling
Use messaging
Observer pattern
with domain messaging
Publisher
type
observer
type
observer
observer
observer
observer
observer
Observable
named domain
Observable
hexState
states flow configurable with DSL
state machine
asleep
STATE
awake
STATE
wakeup
MESSAGE
STATE CONTROLLER
triggers
state machine
asleep
STATE
awake
STATE
wakeup
MESSAGE
STATE CONTROLLER
triggers
transition
triggers
state machine
asleep
STATE
awake
STATE
executes
wakeup
MESSAGE
STATE CONTROLLER
triggers
transition
triggers
commands
list
state machine
asleep
STATE
awake
STATE
executes
wakeup
MESSAGE
STATE CONTROLLER
triggers
transition
triggers
executes
commands
list
commands
list
Context state machine
dispatcher
external
MESSAGE
sent to
application Context
Context state machine
dispatcher
STATE MACHINE
triggers
external
MESSAGE
sent to
application Context
Context state machine
dispatcher
STATE MACHINE
triggers
external
MESSAGE
sent to
commands
list
commands
list
application Context
Context state machine
application Context
dispatcher
STATE MACHINE
triggers
external
MESSAGE
sent to
commands
list
commands
list
Module
Context states
state flow described with DSL
Context states
module scope for execution
hexUnit
UNIT TEST FRAMEWORK
TEST RESULTS NOTIFIERS
hexCore
Logging API
filter logs by:
web console
hexMachina
What’s next?
Recursive composition
context agregates contexts, that agregates contexts, that...
Contexts hierarchy
hierarchy is handled by DSL
Other planned additions
Questions...