Aspect Oriented Programming

AOP – Enforce initialization with PostSharp

Oh, the Pain! Now and again we all come across an object which requires initialization before it can be used but with nothing there to stop us from trying to use it before it’s initialized. In most cases you will get a seemingly unrelated exception (e.g. null reference when the object tries to use some …

AOP – Enforce initialization with PostSharp Read More »

.Net Tips – Restricting attribute usage to specific type

Before you get your hopes up, sorry, there’s no built-in support to allow you to restrict the usage of your attribute to a type easily. That’s not to say that it’s impossible though! If you’re reading this, I assume that you’ve tried to write a custom attribute yourself and realised that the options available in …

.Net Tips – Restricting attribute usage to specific type Read More »

AOP – FIFO Memoizer with PostSharp

Back in my first post on AOP, I mentioned the Memoizer on D. Patrick Caldwell’s blog, well, today I came across a situation where I was able to use it but first I needed to make a few modifications because the original implementation didn’t satisfy some of my requirements: There is no cap on the …

AOP – FIFO Memoizer with PostSharp Read More »

Buzzword Buster – AOP

Definition: Aspect Oriented Programming (AOP) is a programming paradigm where each application can focus on its primary functions and core concerns by encouraging greater modularity and increasing separation of cross-cutting concerns (such as logging and authentication). Purpose: In any real-world applications, when you’re writing code to address the problem domain (say, booking an order) you …

Buzzword Buster – AOP Read More »

Less is MORE

Just finished watching an interesting seminar video by the guys from Object Mentor (a consultant company founded by Robert C Martin, the father of agile development) at: The video is about an hour long and covered a large number of topics around using different languages (polyglot) and different programming paradigms (poly-paradigm) to simplify and …

Less is MORE Read More »

Buzzword Buster – Cross-Cutting Concern

Definition: A Cross-Cutting Concern is a concern your application needs to address that is unrelated to your application’s problem domain, and ‘cuts across’ other concerns. Typical examples include: logging persistence security error handling They are usually difficult to decompose from the rest of the system and result in tangled code. Addressing these cross-cutting concerns will …

Buzzword Buster – Cross-Cutting Concern Read More »

Aspect Oriented Programming in .Net using PostSharp

I saw this article on D. Patrick Caldwell’s blog a little while back: It was this article that got me interested in PostSharp and the possibilities that it can bring. PostSharp, in short, is a lightweight framework which introduces some Aspect-Oriented Programming into .Net. Some of the common usages I have seen include tracing …

Aspect Oriented Programming in .Net using PostSharp Read More »

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.