PostSharp Alternatives

PostSharp vs. Tools You Already Know


Benefit PostSharp Vanilla C# / VB Refactoring Tools Dependency Injection
Build automation for your own patterns with a comprehensive toolkit Yes
Implement standard design patterns readily Yes
Build thread-safe applications Yes
Detect errors and non-compliance before code reviews Yes
Extend the skills of your most experienced developers to the entire team. Yes
Compatibility with PostSharp Yes Yes Yes Yes

PostSharp vs. AOP and Meta-Programming


Benefit PostSharp
Pattern-aware compiler
Traditional AOP
AspectJ
Meta Programming Proxy-based AOP Dynamic Languages
Enhance programs with simple new behaviors. Yes Yes Yes Yes Yes
Enhance programs with advanced new behaviors. Yes Yes Yes Yes
Verify programs at build-time against simple rules. Yes Yes Yes
Verify programs at build-time against complex rules. Yes Yes
Excellent run-time performance. Yes Yes Yes
Guarantee to produce correct programs at build-time. Yes Yes Yes
Easy to use by average application developers. Yes Yes Yes Yes
Detect errors and non-compliance before code reviews Yes
Available for C# and VB Yes Yes
Visual Studio Tooling Yes
Ready-made pattern implementations Yes

Detailed Comparison Matrix

Features PostSharp
Pattern-aware compiler
Refactoring Tools
Resharper
MSIL Rewriters
Cecil, Fody
Niche Languages
F#, Erlang
Dependency Injection
Unity, Castle
Static Analysis Tools
FxCop, NDepend
Frameworks, Components
PreEmptive Analytics
Does not reformat your code Yes Yes Yes Yes Yes Yes Yes
Makes source code semantically simpler and more concise Yes Yes
Empowers every team member: architects, senior developers and application developers Yes Yes
Reduces the number of defects in your code Yes Yes Yes
Improves architecture and simplifies application maintenance, thereby reducing costs Yes Yes
Provides outstanding run-time performance Yes Yes Yes
Integrates with your code with minimal rewriting required Yes Yes Yes Yes
Get started in under 30 minutes Yes Yes Yes Yes Yes
Ready-Made Patterns
Basic automatic INotifyPropertyChanged implementation Yes Yes
Comprehensive automatic INotifyPropertyChanged implementation with support for nested objects Yes
Automatic Undo/Redo implementation Yes
Thread Safety for C# and VB Yes
Automatic Logging Addition Yes Yes
Automatic Implementation of Parent/Child Relationships Yes
Automatic Implementation of IDisposable Yes
Thread Safety
Immutable Model Yes Yes
Freezable Model Yes
Synchronized Model Yes
Reader-Writer Synchronized Model Yes
Thread-Unsafe Model Yes
Yes
Thread-affine model Yes
Actor model Yes Yes
Aspect-Oriented Programming
Automation creation for your own patterns Yes Yes
Behavior addition to interface or virtual methods Yes Yes
Adds behaviors to any method. Yes
Adds behaviors to any field or property. Yes
Adds behaviors to any event. Yes Yes
Introduces interfaces to the target class. Yes Yes
Introduces methods, events, properties, managed resources, and custom attributes. Yes
Initializes aspects at build time for fast runtime performance. Yes
Visual Studio Tooling Yes
Architecture Validation
Validates your code against pre-defined design rules. Yes Yes
Validates your code against custom rules. Yes Yes
Combines code validation with code generation Yes
Support
Commercially Supported Yes Yes Yes Yes Yes
Cross-platform Yes Yes Yes Yes Yes
Fully documented Yes Yes Yes Yes Yes Yes