PostSharp AOP Framework Updated
PostSharp, the popular Aspect Oriented Programming framework for .NET, has a new release: Version 1.5 CTP 3. This release includes the bug fixes of 1.0 SP1, improves upon some design issues in 1.5 CTP 2, and most important, has dramatic performance enhancements. PostSharp 1.5 CTP 3 is now twice as fast as PostSharp 1.0, according to release notes. 1.5 CTP 3 is available for download on the PostSharp site.
Unlike Inversion of Control containers that provide AOP functionality through design-time specification of method invocation interceptors, PostSharp integrates through the application of attributes. PostSharp inserts itself in the build process and post-processes the compiled assembly. Since PostSharp works at MSIL level, it supports virtually all static languages targeting the .NET Framework.
Improving on version 1.0, version 1.5 contains the following improvements:
- Reading assemblies without loading them in the CLR
- Lazy loading of assemblies
- Performance optimizations
- Support for Novell Mono
- Support for Silverlight 2.0 and the Compact Framework
- Pluggable Aspect Serializer & Partial Trust
In version 1.0, PostSharp required assemblies to be loaded in the CLR (i.e. in the application domain) to be able to read them. When PostSharp processes a Silverlight or a Compact Framework assembly, it is never loaded by the CLR.
When PostSharp has to load a dependency assembly, it now reads only the metadata objects it really needs, resulting in a "huge performance improvement and much lower memory consumption.
The code has been carefully profiled and optimized for maximal performance.
PostSharp is now truly cross-platform. Binaries compiled on the Microsoft platform can be executed under Novell Mono. Both Windows and Linux are tested and supported. A NAnt task makes it easier to use PostSharp in these environments.
You can add aspects to your projects targeting Silverlight 2.0 or the Compact Framework 2.0.
Previously, all aspects were serializer using the standard .NET binary formatter. It is now possible to choose another serializer or implement your own, and enhance assemblies that be executed with partial trust.
CTP 3 is expected to be the final 1.5 CTP, with the first Release Candidate expected within 1-2 months, depending on bug reports.
Brandon Holt, Preston Briggs, Luis Ceze, Mark Oskin May 21, 2015
Kai Kreuzer, Olaf Weinmann May 21, 2015