-
Notifications
You must be signed in to change notification settings - Fork 268
TyphoonAssembly
Any magic, sufficiently analyzed is indistinguishable from technology.
Here will take a look at how Typhoon assemblies are implemented. This information is not necessary for normal use of Typhoon, but may be useful for contributors or the just plain curious.
#Assembly Instrumentation
Typhoon uses a programming paradigm called Aspect Oriented Programming (AOP) to instrument the methods of your assembly classes with additional behavior.
AOP is used to encapsulate "cross-cutting" concerns. These are the kind of requirements that "cut across" many modules in your system. In our case the requirement is:
Whenever a new definition is created it should be assigned
a unique key based on the method name that defined it.
AOP defines the following kinds of method interceptions:
|Interception | Description| |Before | Additional behavior is added before a method invocation.| |After | Additional behavior is added after a method invocation. | |After Throwing | Additional behavior is added after an exception occurs. | |Around | A flexible style that can be used to model any of the above. |
TyphoonAssembly
instrumentation uses the 'After' style - after a definition is returned it as allocated a unique key based on the method name that defined it.
#A Cat Dressed in a Duck Costume
(coming soon - check back in an hour or two)
Something still not clear? How about posting a question on StackOverflow.
Get started in two minutes.
Get familiar with Typhoon.
- Types of Injections
- What can be Injected
- Auto-injection (Objective-C)
- Scopes
- Storyboards
- TyphoonLoadedView
- Activating Assemblies
Become a Typhoon expert.
For contributors or curious folks.