Click here to Skip to main content
6,822,613 members and growing! (15,583 online)
Email Password   helpLost your password?
Languages » C# » Applications     Intermediate License: The Code Project Open License (CPOL)

Rating of Open Source AOP Frameworks in .Net

By V.GNANASEKARAN

This article provides a methodology to rate the available open source AOP frameworks in .Net
C# (C#1.0, C#2.0, C#3.0), WinMobile, .NETCF, .NET (.NET1.0, .NET1.1, .NET2.0, .NET3.0, .NET3.5), ASP.NET, Visual-Studio (VS2005, VS2008), Architect, Dev, Design
Posted:5 Aug 2008
Views:14,629
Bookmarked:27 times
Unedited contribution
printPrint   add Share
      Discuss Discuss   Broken Article?Report  
14 votes for this article.
Popularity: 4.81 Rating: 4.20 out of 5
1 vote, 7.1%
1

2
1 vote, 7.1%
3
6 votes, 42.9%
4
6 votes, 42.9%
5

Introduction


In the days where business agility is becoming the definite need of any business / IT infrastructure, quite frequently we are ending up with facing the scenarios, where we need to develop applications that are flexible and easily manageable.


The flexibility in an application’s architecture is demanded by the emerging business competitions, pressure to sustain the challenges created by the innovative business models, need to sustain the growing customer’s base of an established business etc. Say for example you are building an e-commerce system with an innovative business model, targeting a niche market. Soon, it is becoming hot in the market and your system is witnessing a rapidly growing user base, in a short span of time. The system starts crawling, failing to sustain the increased user load there by creating significant loss to your business and to the good will you have created with your hard work and innovation.

Situations that may pull your business down may be like:

  • Changes in the regulations / policies of the government because of which you may need to incorporate some more rules in to your system, while keeping it running
  • Need to switch from your payment gateway to an other one who is offering services at a discounted price , to increase the revenue
  • Need to shift from one packaging company to other (like say from FedEx to UPS) as there is a need to increase of the speed of the delivery
  • Demand to shift from a particular financial outsourcing services provider to another
  • Etc...


The architecture that could excel in such an agile environment can be called “Pluggable Architecture”. There are proven methodologies (Patterns) that can constitute the design to realize such architectures. AOP is one of such available patterns / methodologies widely adopted in the market.


Background

AOP – Aspect Oriented Programming is a methodology that helps in keeping the “cross-cutting concerns” separate from the code blocks that encapsulate business logic. “cross-cutting” here refers to the code blocks that are non-business specific and that are repeated across different classes spread across different layers. Examples of cross cutting concerns are: Logging, Exception Handling code blocks specific to instrumentation of the code etc. There may be many numbers of such concerns which need to be abstracted from the business logic specific code.

The basic thumb rule to identify a cross-cutting concern is: If a concern is repeated across classes spread over layers / tiers, then it is a cross-cutting concern.


AOP Benefits


The facility to separate the cross-cutting concerns helps in:

  1. Selectively applying the cross cutting concerns, as required. Say some logic related to profiling the code for performance monitoring would required only at the time of testing but not in the production environment so they can be enabled/disabled based on the environment as required

  1. Applying any changes / fixing bugs in the cross-cutting code logic, without affecting the business logic code in the production environment.

  1. Evolution of the different parts of the system in different paces.

  1. Arriving at a final solution where the code is easy to understand and maintain



Need for a Rating Methodology


Having realizing the benefits of AOP, the next step is to look for ways to implement it in our application development. In this case, instead of starting from scratch, the best way is to leverage the research and effort put by many of hardworking tech savvies around the world through the availability of open source frameworks / utilities.

When we are in the stage of looking for adopting an open source AOP framework, lots of open source AOP frameworks are available in the market and hence, we need to choose the best possible one for our development. Choosing the best possible one could be a difficult task as always there will be conflicts of thoughts and difference of opinions, especially when we are in a team. Especially when we are in a position to convince our customers for the adoption of a particular framework, we cannot choose a particular AOP framework, unless and otherwise we have some good justifications.

Will it not be good, if we have rating methodology where we can analyze and evaluate the available AOP frameworks qualitatively and quantitatively enabling us to rate the AOP frameworks in the market so that we can make an informed decision in a short span of time. Result of such a thought process is the following “Frameworks Rating Methodology”.

Open Source AOP Frameworks Rating Methodology

As a part of this effort, I had identified some of the attributes (which can be expanded / refined) and assigned points for each of the AOP framework (which is subjective – It is based on my research and information available to me. You can change it as per your observation and conviction)


The list of the open source AOP frameworks that are considered for this rating process are:

· Aspect#

· AspectDng

· NAspect

· PostSharp

· Policy Injection Application Block

· Sesar

· Spring.Net [Spring.AOP]

The Rating attributes identified and used for this rating process are:

Quality of the Methodology adopted

There are different approaches available to achieve AOP in .Net. Each of the available open source AOP frameworks adopted different approaches. Basically AOP can be achieved either at compile time or at runtime. According to me , runtime will be always a overhead when compared to compile time, as it is a one time process.

Details on the available approaches available at :

http://www.ayende.com/Blog/archive/2007/07/02/7-Approaches-for-AOP-in-.Net.aspx

When I was investigating on the details of approach adopted by these open source frameworks, information clarity is available only for some of the frameworks. I had assigned points based on my thought process and perception. It may differ from person to person based on the availability of the information and depth of the research.

Community support

When we choose a particular open source framework for our development projects, unless and otherwise there is a wider community support, we cannot go with it, as it may be a high risk during the course of deployment or in the later stage of production support.

Visibility of any Implementations / Industry-wide adoption

Again, as a part of finalizing architecture for a solution, our clients may be looking for proven case studies / industry wide adoptions of the products that we choose. Same thing is applicable here as well. Availability of proven case studies will provide us some confidence on that framework especially when we go for large scale, enterprise level solution development. In this investigation process, I could rarely see any proven case studies for any of these listed frameworks.

Ease of adoption by developers

This is again subjective and can vary from person to person.

Learning curve required

This is again subjective and can vary from person to person.

Memory Footprint / overhead

This could be a key attribute on rating a particular framework. Only some of the framework’s groups are explicit on memory foot print of their products. As this could be a significant factor affecting the performance and resource consumption especially on large scale deployments, I would suggest the respective framework providers to publish benchmark case studies / lab results, which would provide us good confidence on the framework.

Available version in the market (Is it a RC or still in alpha stage)/ Documentation

Some of the frameworks on its early stages development. Periodical releases of the subsequent versions of the frameworks are the indications of the aggressive development and enthusiasm of the community behind those frameworks. Also, availability of the documentation (API, Conceptual, and Architecture) is a definite need for any framework to understand them clearly.



I have assigned very low points if the information is not clear or if it is not available or if it is vague.

Guidance for Rating Attributes

  • 0 – bad , Not known, Not clear, sufficient information not available
  • 1 – To be improved , some info is available
  • 2 – Good , sufficient info is available
  • 3 – Very Good , no major overhead, no major memory footprint, Excellent info is available


Here is the resulting rating matrix:

Preliminary Rating Matrix

Available Open Source .Net AOP Frameworks / Utilities

NAspect – Puzzle.Net

Aspect#

Policy Injection Application Block

PostSharp

Seasar

AspectDng

Spring.Net

Quality of the Methodology adopted

2

2

2

3

2

2

2

Community support

2

2

3

3

1

1

3

Visibility of any Implementations / Industry-wide adoption

1

0

2

2

0

0

1

Ease of adoption by developers

2

1

2

3

2

1

2

Learning curve required

1

1

2

3

1

1

2

Memory Footprint / overhead

1

0

1

3

0

0

1

Available version in the market (Is it a RC or still in alpha stage)/ Documentation

2

2

3

3

2

1

3

Total

11

8

15

20

8

6

14


Conclusion


Whenever we go for implementing a particular methodology or concept like AOP, we will always leverage the existing open source frameworks. Since there is a no. of open source frameworks available in the market, it will be always good to have some concrete justifications as a base for selecting a particular framework for adoption.

Adopting a rating process some thing like explained in this article will ensure that the frameworks are subjected to both qualitative & quantitative evaluation process, resulting in a meaningful decision.

From the matrix, the frameworks that emerged in the ‘top 3 ‘list of are:

· PostSharp

· Policy Injection Application Block

· Spring.Net [Spring.AOP]

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

V.GNANASEKARAN


Member
Gnana (Gnanasekaran) is currently working as a Senior Architect at Collabera, Bangalore, India, having more than 10 years experience. His area of specialization includes SOA, BPM, Messaging, Integration and Enterprise Architecture. The emerging tech. trends like web 2.0 and Enterprise Mobility excites him a lot. Architectural consulting is his core expertise. He also possess experience in Data warehousing and business intelligence solutions consulting, based on the Microsoft technology stack like SSAS, SSIS and SQL Server. You can reach him via e-mails at gnana.sekaran@collabera.com & vgnanasekaran@yahoo.com or at www.gnanasekaran.com
Occupation: Architect
Company: Collabera
Location: India India

Other popular C# articles:

Article Top
You must Sign In to use this message board.
FAQ FAQ 
 
Noise Tolerance  Layout  Per page   
 Msgs 1 to 10 of 10 (Total in Forum: 10) (Refresh)FirstPrevNext
GeneralWhat about Aspect.NET ?! PinmemberAlireza Naghizadeh2:09 1 Oct '09  
GeneralCastle DynamicProxy PinmemberJohn Rayner12:23 17 Aug '08  
QuestionWhat about LOOM.NET? Pinmemberwolfgang232:41 12 Aug '08  
AnswerRe: What about LOOM.NET? PinmemberDewey18:50 14 Aug '08  
GeneralPostSharp is truely the best Pinmemberboo14:35 8 Aug '08  
GeneralReally ? PinmemberSebastien Ros20:13 6 Aug '08  
QuestionRe: Really ? Pinmemberfire_birdie8:35 10 Aug '08  
GeneralRe: Really ? PinmemberGael Fraiteur5:17 15 Aug '08  
GeneralRe: Really ? PinmemberSebastien Ros10:58 15 Aug '08  
GeneralRe: Really ? PinmemberGael Fraiteur21:35 15 Aug '08  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads.

PermaLink | Privacy | Terms of Use
Last Updated: 5 Aug 2008
Editor:
Copyright 2008 by V.GNANASEKARAN
Everything else Copyright © CodeProject, 1999-2010
Web17 | Advertise on the Code Project