Friday, August 7, 2015

AOP

                        Aspect oriented Programming


Today I would be discussing about AOP. what do we mean by AOP
   AOP
  • Software development technique
  • Allows to add enterprise functionality 
  • Reduce boiler plate code
  • Increase modularity
  • Manage cross cutting concerns
  • Infrastructure composition
  • Wrapper around piece of business functionality
   AOP helps implement following principles
  • Single responsibility principle
  • Decorator pattern
  • Open close principle
  • Interceptors
                    Advantages of AOP

                  1. Allows us to take common functionality within our applications, centralize it into singly responsibility.Attach these modules,  also known as aspects to     many places in the  application.
                  2. Most often aspects are encapsulating functionality that spends large         portion  of the application
                  3. Common cross cutting functionality includes Loggingsecurityprofiling and transaction management 
                      ASPECTS
                       Where can we add these aspects or inspect or execute code?

                  •  OnStart: Executed immediately prior to the method call
                  •  OnSuccess :Executed immediately after the method call runs without                throwing an exception
                     Types of aspects
                             Calls to class methods/properties. These usually involves IOC                    Containers

                  No comments:

                  Post a Comment