Aspect oriented programming (aop), JAVA Programming

Aspect-Oriented  Programming  (AOP)  represents  OOP  (Object  Oriented  Programming)  by  giving  the developer to dynamically change the static OO model to make a system that can grow to meet new needs.

AOP allows you to dynamically change your static model consisting mainly of business logic to add the code needed  to  fulfill  the  secondary  requirements  or  in  AOP  terminology  called  cross-cutting  concerns  like security, logging, auditing, exception handling etc without having to change the original static model. Better still, we may often keep this additional code in a single location rather than having to scatter it across the existing model.

AOP nomenclature is distinct from OOP and can be defined as given below:

Join points: presents the point at which a cross-cutting concern like auditing, logging etc intersects with a main concern  like  the  core  business  rule.  Join  points  are  locations  in  programs'  operation  path  like  function  & constructor call, function & constructor execution, field access, exception handling execution, class & object initialization etc.

Pointcut: is a language construct that identifies specific join points within the code. A pointcut describes a collection of join points and also gives a context for the join point.

Advice: is an implementation of a cross-cutting concern which is a part of code that is executed upon reaching a pointcut within a code.

Aspect: encapsulates join points, pointcuts and send into a reusable module for the cross-cutting concerns which is similar to Java classes for the core concerns in OOP. Classes and aspects are not related to each another. Classes are unaware of the presence of aspects, which is an important AOP principle. Only pointcut declaration binds aspects and classes.

Weaving is the process for interleaving separate cross-cutting rules such as logging into core concerns such as business rules code to complete the system. AOP weaving composes distinct implementations of aspects into a cohesive system laid on weaving rules. The weaving process can occur at:

  • Compile-time: Weaving happens during compilation process.
  • Load-time: Weaving happens at the byte-code level at class loading time.
  • Runtime: Similar to load-time where weaving happens at byte-code level during runtime as join points are reached in the executing code.

 

Posted Date: 7/26/2012 5:30:38 AM | Location : United States







Related Discussions:- Aspect oriented programming (aop), Assignment Help, Ask Question on Aspect oriented programming (aop), Get Answer, Expert's Help, Aspect oriented programming (aop) Discussions

Write discussion on Aspect oriented programming (aop)
Your posts are moderated
Related Questions
How Trojan Horses or Worms affect a computer system? What guidelines should be adopted to troubleshoot along with malicious software? Trojan horses are stand-alone programs. Th

How does JVm do dynamic checking The JVM also does "dynamic" checking at runtime for certain operations, like pointer and array access, to make sure they are touching only memo

A Queue of Cards You are going to parallel the development done in the lesson on inheritance where we constructed some base classes, StackNode and Stack, and derived  Floa

Why Local variable is preferred over Global variable ? In my point of view Global variable has a few advantage along with Local variables is preferred because of the subsequent

what will be the logic? in C program #include float start_point, /* GLOBAL VARIABLES */ end_point, total_area; int numtraps; m

The statechart diagrams and activity diagram are related in a sense that statechart diagram refers on object undergoing a transition process and an activity diagram refers on the f

Implement a class  Book  (Book.java). A book will have three instance variables: a  title  (a String, for example: "Big Java" or "The Hitchhiker's Guide to the Galaxy"), an  author

can i have code on this assignment: The code in the main method should do the following: 1. Prompt the user for a string input value for the amount in dollars and store it in a va

Implement the Money class discussed in class. This class should represent a dollar and cents amount with 0-99 cents and the cents being the same sign as the dollars. The class shou

Prepare Android Antivirus with locate device capability Project Description: We need a developer that can develop an Android Antivirus similar to lookout Developer need to prov