Skip to content

TyphoonAssembly

Jasper Blues edited this page Apr 4, 2015 · 27 revisions
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. 

Assembly AOP

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)