Assembling an application from key collaborators and configuraiton. More...
Classes | |
class | TyphoonAssembly |
Provides a concise way to declare and encapsulate the architecture of an application in one or more classes that describe how components collaborate together. More... | |
class | TyphoonComponentFactory |
This is the base class for all component factories. More... | |
protocol | <TyphoonComponentFactory> |
Defines a protocol for resolving built instances, injecting a pre-obtained instance using a factory containing definitions from one or more TyphoonAssembly classes. More... | |
protocol | <TyphoonDefinitionPostProcessor> |
Allows for custom modification of a component factory's definitions. More... | |
Functions | |
(void) | - NSObject(FactoryHooks)::typhoonSetFactory: |
Implementation of method typhoonSetFactory indicates that a component wishes to be aware of the TyphoonComponentFactory in order to resolve another component. More... | |
(void) | - NSObject(FactoryHooks)::typhoonWillInject |
Typhoon components can implement this methods to participate in property-injection life-cycle events. More... | |
Assembling an application from key collaborators and configuraiton.
- (void) typhoonSetFactory: | (id) | theFactory |
Implementation of method typhoonSetFactory indicates that a component wishes to be aware of the TyphoonComponentFactory in order to resolve another component.
Typically we'd want to inject all the dependencies, however there are some cases where its desirable to load a component from the factory at runtime. One example is view controller transitions where a given view controller has:
- (void) typhoonWillInject |
Typhoon components can implement this methods to participate in property-injection life-cycle events.
This gives some of the benefits of initializer-injection - the ability to provide before / after validation - while still allowing the flexibility of property injection.