Ehsan Ghanbari

Experience, DotNet, Solutions

Intruducing Aspect Oriented Programming

Aspect Oriented Programing(AOP) is a way of thinking about the program structure. AOP complements the Object oriented programming but instead of classes in object oriented programming you deal with aspects in AOP. So what's an aspect? There is a great example here on defining the aspect. Imagine that we have a base class named Dog and we inherit another class named Poodledog from this base class. Poodle is a kind of dog and that's why we can create an object for it. A dog is anyhow Poodle or not but what do you think about Obedientdog? Obedient is a feature or an aspect that not every dog has it, right? So we can look to obedient as an aspect. It is behavior that should have structure, but there is no any way to express this structure in code with traditional object-oriented.

AOP has been for a long time but recently it gets more attention. AOP is all about encapsulating the crosscutting concerns, So what's the  crosscutting concerns? you can imagine a cross cutting concerns something like amount or metric. because it doesn't represent a specific thing, and it doesn't have a business rule. AOP is just a programming paradigm for increasing the modularity. So what's the Modularity? Modularity is class in OOP and aspect in AOP. It provides to abstract the cross-cutting code into a separate aspects and support the modularization of concerns. AOP can be used with object-oriented programming and it complements object-oriented programming.

 



About Me

Ehsan Ghanbari

Hi! my name is Ehsan. I'm a developer, passionate technologist, and fan of clean code. I'm interested in enterprise and large-scale applications architecture and design patterns. I spend a lot of time on software architecture. Since 2008, I've been as a developer for different companies and organizations and I've been focusing on Microsoft ecosystem all the time. During the past years, Read More

Post Tags
Pending Blog Posts
using Elmah in asp.net MVC4
Using FluentSecurity in MVC
Strategic design
Factory Pattern
time out pattern in ajax
Redis as a cache server
How to use PagedList In asp.net MVC
Multiple submit buttons in asp.net MVC
Domain driven design VS model driven architecture
What's the DDD-lite?