Aspect oriented programming in .Net

879 views

Published on

AOP programming in .Net using PostSharp

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
879
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
9
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Aspect oriented programming in .Net

  1. 1. Aspect Oriented Programming in .Net with PostSharp Paul Fryer Software Architect, Fiserv
  2. 2. Agenda <ul><li>What is AOP? </li></ul><ul><li>What is PostSharp for .net? </li></ul><ul><li>What’s the value? </li></ul><ul><li>Common Aspects </li></ul><ul><li>Demo </li></ul>
  3. 3. What is AOP? <ul><li>Wikipedia says: In computing, aspect-oriented programming (AOP) is a programming paradigm which aims to increase modularity by allowing the separation of cross-cutting concerns. </li></ul>
  4. 4. What is PostSharp for .Net? <ul><li>PostSharp is a .net framework for aspect management. </li></ul><ul><li>PostSharp injects aspects in a post built step. </li></ul><ul><li>This method is known as “static weaving” or “IL weaving” because it literally rewrites your IL code after the compilation of source. </li></ul>
  5. 5. What’s the value? <ul><li>Cleaner source code </li></ul><ul><ul><li>Easier to understand </li></ul></ul><ul><ul><li>Easier to refactor/manage </li></ul></ul><ul><ul><li>Easier to onboard junior developers </li></ul></ul><ul><li>Less source code </li></ul><ul><ul><li>15% less code </li></ul></ul><ul><li>Less coupling </li></ul><ul><ul><li>20% less coupling </li></ul></ul>
  6. 6. Common Aspects <ul><li>These are all potential cross cutting concerns: </li></ul><ul><ul><li>Logging </li></ul></ul><ul><ul><li>Exception Handling </li></ul></ul><ul><ul><li>Validation </li></ul></ul><ul><ul><li>Caching </li></ul></ul><ul><ul><li>Multithreading </li></ul></ul><ul><ul><li>Transactions </li></ul></ul><ul><ul><li>Auditing </li></ul></ul>
  7. 7. DEMO TIME <ul><li>http://aopdemo.codeplex.com/ </li></ul>

×