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 Poodle dog 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 the Obedient dog? 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're 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 aspect and supports 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 and I'm spending a lot of my time on architecture subject. Since 2008, I've been as a developer for companies and organizations and I've been focusing on Microsoft ecosystem all the time. During the&nb Read More

Post Tags
Pending Blog Posts
Strategic design
Factory Pattern
time out pattern in ajax
Selectors in Jquery
Peridic pattern
How to use PagedList In MVC
How to query over Icollection<> of a type with linq
Domain driven design VS model driven architecture
Redis as a cache server
What's the DDD-lite?