31. Robotlegs 2 - Modularity
Lean Core
A Toolkit around an Injector
32. Robotlegs 2 - Modularity
Lean Core
A Toolkit around an Injector
Contains nearly no user-facing functionality
33. Robotlegs 2 - Modularity
Lean Core
A Toolkit around an Injector
Contains nearly no user-facing functionality
Makes no assumptions about how you work
56. Robotlegs 2 - The Port
Phase IV: De-Cruft
Migrate to new Injector API
57. Robotlegs 2 - The Port
Phase IV: De-Cruft
Migrate to new Injector API
CommandMap API
58. Robotlegs 2 - The Port
Phase IV: De-Cruft
Migrate to new Injector API
CommandMap API
MediatorMap API
59. Robotlegs 2 - The Port
Phase IV: De-Cruft
Migrate to new Injector API
CommandMap API
MediatorMap API
Add [PostConstruct] to your Mediators
60. Robotlegs 2 - The Port
Phase IV: De-Cruft
Migrate to new Injector API
CommandMap API
MediatorMap API
Add [PostConstruct] to your Mediators
Remove Actor and Command
62. Robotlegs 2 - An Example
Porting Jon Toland’s
CafeTownsend Implementation
Editor's Notes
\n
\n\n
\n
\n
\n
\n
\n
\n
\n
Wanted: Better Name!\n
\n
\n
But you might often be better off with a Null Implementation\n
\n
Write Your Own, and extend [Inject], if you like!\n
Wrap the global Singleton interface of the Flex logger (and most others)\n
- soft prefers mappings in ancestor injectors, strong is default\n- Modules can work in isolation and in bigger contexts\n
- local prevents sharing with child injectors, shared is default\n
Allows setting a provider that will get called as a last-ditch effort if no mapped provider is found for a type\nNot yet implemented\n
PRE_INSTANTIATE | PRE_INSTANTIATE: Before and after creating a new instance\nPRE_CONSTRUCT | POST_CONSTRUCT: Before and after injecting into an instance\n
Removes all mappings and invokes [PreDestroy] methods on all singletons\nNot yet implemented\n
Prevents any changes to the mapping at all\nAllows usage of untrusted modules\nCan only be reverted with the unique key returned by seal()\n
\n
getInstance instantiates concrete types even without mapping\n
Enables instance-pooling\n
With Flash Player 10.1 and above\n
Work in Progress\n
\n
makes decoupling through an IoC Container easy\nenables integration of actual functionality\nnot built around the Display List or an EventDispatcher\n
makes decoupling through an IoC Container easy\nenables integration of actual functionality\nnot built around the Display List or an EventDispatcher\n
makes decoupling through an IoC Container easy\nenables integration of actual functionality\nnot built around the Display List or an EventDispatcher\n
Child Contexts get Child Injectors\nMultiple contextViews enable lower and upper GUIs for Games\n
Child Contexts get Child Injectors\nMultiple contextViews enable lower and upper GUIs for Games\n
\n
Contains all the functionality of RL1 and much more\n
Case in point: ClassicRobotlegsBundle contains 12 extensions\n
Just include the SWC and require the Extension during Context Building\nExample later\n
\n
\n
Example: the MediatorMap shouldn’t know specifics of the mapping\n
Terms that work in one place work the same in other, similar places\nExample: `map` in CommandMap, Injector, MediatorMap\n`map` takes something available, `toX` something to create or return\n
Use the classic Display List, Starling, 3D frameworks, Bitmap Rendering, Speakers/ Microphone, Camera\n(Lines between views and services blur, if you ask me. Think Chat Rooms)\n
AKA Covariant Mediation\nEnables complete decoupling from view implementation details\n
\n
Swiftsuspenders 2 should be fully compatible, but better Safe Than Sorry\nSpecial build of Robotlegs 1.5.2 with Swiftsuspenders 2 included\n
There’s an extension for that\nReplace RL1 SWC with RL2 and migration-extension\ntest\n
There’s still a Context, but you don’t extend it\nInstead, you install Extensions and Configurations into it\n
I’ll put Regexp’s on github\n\n
I’ll put Regexp’s on github\n\n
I’ll put Regexp’s on github\n\n
I’ll put Regexp’s on github\n\n
I’ll put Regexp’s on github\n\n