PostSharp Alternatives

PostSharp is the best-suited tool for pattern automation.

PostSharp vs. tools you already know

Benefit PostSharp Vanilla C# / VB Refactoring Tools Dependency Injection
Build automation for your own patterns with comprehensive toolkit Yes
Ready-made standard design patterns implementations Yes
Build thread-safe applications Yes
Detect errors and non-compliance before code reviews Yes
Leverage the skills of your most experienced developers to the whole team Yes
Compatible with PostSharp Yes Yes Yes Yes

PostSharp vs. AOP and meta-programming

Benefit PostSharp
Pattern-aware compiler
Old-school 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 number of defects in your code Yes Yes Yes
Improves architecture and makes application maintenance easier and less expensive Yes Yes
Outstanding run-time performance Yes Yes Yes
Works with your code – with minimal rewriting Yes Yes Yes Yes
Get started 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
Automatically add logging Yes Yes
Automatically implement parent/child relationships Yes
Automatically implement 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
Creates automation for your own patterns Yes Yes
Adds behaviors 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 target class Yes Yes
Introduces methods, events, properties, managed resources, 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

download