Wednesday, 16 September 2015

The magic of Aspect Oriented Programming with PostSharp

In this video tutorial, I explain what Aspect Oriented Programming (AOP) is all about, the issues it solves and the benefits of using it.
I demonstrate it with PostSharp, the best framework for implementing aspects and integrating them with your solution.

Quoting PostSharp, it allows developers to eradicate boilerplate by offloading repeating work from humans to machines. PostSharp contains ready-made implementations of the most common patterns and gives you the tools to build automation for your own patterns..

In my demo, I show how to use those ready-made implementations, as well as get started with your own custom ones (best viewed in full screen, for the code screencast).

Get the Powerpoint file here.
Get the demo project here.

Benefits of Aspect Oriented Programming

As I explain, in the video, the power of Aspect Oriented Programming, is mostly in:
  • Reusing repetitive boilerplate code across your project.
  • Avoiding errors and bugs.
  • Addressing cross-cutting concerns all over the place in an encapsulated way.
  • Keeping your code readable, maintainable, testable, well formatted, with less clutter, while still attending all the above.

Why  PostSharp

  • PostSharp is the most advanced AOP framework. 
  • It differs from other frameworks, by using the technique of IL-weaving.
  • It provides a wide, easy to use, infrastructure of components you can easily integrate into your code and get started building your own aspects,
  • It comes with a number of built-in customizable aspects for the most common cases, such as implementing INotifyPropertyChanged or logging. Those are extremely easy to apply across your entire solution.
  • It is well maintained, supported, documented, kept up-to-date.
  • Because it's transparent. sizeOf(Code).Matters();
See more on the PostSharp site, download it here (online documentation here).

Keep your spaghetti neat!

Additional resources

Check out this great AOP introduction by Donald Belcham

And check out this great tutorial about bacon weaving!

6 comments:

  1. I love this blog . This is one of the best blog i ever seen. It's all about what i'm searching for. I love to read this blog again and again . Every time i enter this blog i get something new. This blog inspire me to write new blog. I write a blog name http://tutorialabc.com. It's about sql,c#,net etc

    ReplyDelete
  2. Simply having the desire to perform magic and be a great magician is not enough - one should have the determination and the willingness to invest a lot of time and effort to practice performing tricks so that one can master the art of making people believe in illusions.magic tickets

    ReplyDelete
  3. Coffee is the starter of the day for more than half of the people. Many people buy a cup of coffee first from any coffee shop and then start their day at work. It costs them much if they calculate it. But now, there is an easy way to make coffee at home by buying the best coffee maker machine from market by checking the list of best coffee makers.

    ReplyDelete
  4. Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info. find out details

    ReplyDelete
  5. Many illusionists illusionist entertainers entertainment stage illusion prhb magicians magician illusions comedian stage illusion zxlm experience comedy laughter applause stage illusion qkdd cardistry mage miracle spectacle stage illusion ztlq bespoke conjurers mind-reading memories stage illusion kehm mentalist hypnosis magic houdini stage illusion gxzq genie theater variety show stage magic stage illusion eqew prediction audience wizardry conjuring stage illusion rnxv skeptic sorcery conjuror shuffle stage illusion psvk expert reel morale juggling stage illusion ljvf abracadabra sleight of hand christmas party one-man show stage illusion hrtp theaters card tricks showmanship mentalists stage illusion mkhv showreel magic show magic shows smile stage illusion iofq deception event planners happiness mentalism stage illusion ktos teambuilding trickery prestidigitator mindreading stage illusion qeld illusion birthday online meetings virtual meeting srvv rvoz virtual meetings card magic escapology legerdemain stage illusion hhhi stage hypnosis Improvisation stage illusion stage illusion krrx platform magic hocus-pocus close-up magic theatre stage illusion bnph illusionists illusionist entertainers entertainment stage illusion jsoy magicians magician illusions comedian stage illusion fpfs experience comedy laughter applause stage illusion vcwc cardistry mage miracle spectacle stage illusion uaoq bespoke conjurers mind-reading memories stage illusion cxig mentalist hypnosis magic houdini stage illusion vcqn genie theater variety show stage magic stage illusion wnxm prediction audience wizardry conjuring stage illusion fjns skeptic sorcery conjuror shuffle stage illusion llxb expert reel morale juggling stage illusion fhvi abracadabra sleight of hand christmas party one-man show stage illusion mdpj theaters card tricks showmanship mentalists stage illusion njyf showreel magic show magic shows smile stage illusion etwn deception event planners happiness mentalism stage illusion lfos teambuilding trickery prestidigitator mindreading stage illusion fgns illusion birthday online meetings virtual meeting gbrd qrwy virtual meetings card magic escapology legerdemain stage illusion jihm stage hypnosis Improvisation stage illusion stage illusion cmmm platform magic hocus-pocus close-up magic theatre stage illusion jvti illusionists illusionist entertainers entertainment stage illusion vxfe magicians magician illusions comedian stage illusion pgei experience comedy laughter applause stage illusion lsmz cardistry mage miracle spectacle stage illusion iwjt bespoke conjurers mind-reading memories stage illusion ddwj mentalist hypnosis magic houdini stage illusion yyet genie theater variety show stage magic stage illusion knsr prediction audience wizardry conjuring stage illusion fxxc skeptic sorcery conjuror shuffle stage illusion kapx expert reel morale juggling stage illusion jslo abracadabra sleight of hand christmas party one-man show stage illusion ujwp theaters card tricks showmanship mentalists stage illusion hsus showreel magic show magic shows smile stage illusion mzyd deception event planners happiness mentalism stage illusion vxjp teambuilding trickery prestidigitator mindreading stage illusion wyvw illusion birthday online meetings virtual meeting hrnv ztzq virtual meetings card magic escapology legerdemain stage illusion etbv stage hypnosis Improvisation stage illusion stage illusion ofbj platform magic hocus-pocus close-up magic theatre stage illusion gfrq illusionists illusionist entertainers entertainment stage illusion kdml magicians magician illusions comedian stage illusion etmz experience comedy laughter applause stage illusion isjv cardistry mage miracle spectacle stage illusion zhfb bespoke conjurers mind-reading memories stage illusion xokv mentalist hypnosis magic houdini stage illusion dsgy genie theater variety show stage magic stage illusion lebx prediction audience wizardry conjuring stage illusion.

    ReplyDelete
  6. I will be waiting for such type of content in the foreseeable future as it is particularly efficient and also informative.
    Custom Boxes Wholesale

    ReplyDelete