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
SudCell and Simple Sudoku Implementation We describe, fully, the SudCell class that will represent each of the 81 cells or boxes in a Sudoku puzzle.  Then we will

Need Java/JNLP Application - GUI and Backend Projects Project Description: I am looking for assistance in making changes to a complex java application. System launches fro

Project Description: You should give A Working, Sample Android .apk Project and Java source code Original Photoshop PSD that I can edit and customize to fit my needs All S

RMI is a set of APIs that permits to build distributed applications. RMI uses interfaces to describe remote objects to turn local method invocations into remote method invocations.

EJB 2.0 has the additional advantages over the EJB 1.1 given below 1. Local interfaces : These are beans that can be needed locally, that means by the same Java Virtual Machi

Modify both of the above clients (to write separate clients) to extract the exchange rate from a live web service that performs currency conversion. You can choose a Java or a .NET

I am having trouble with the code below because I am trying to call the text field input type so that whenever someone enters a number above 10 it responds with the alert shown bel

Ask1. Storing the Array: Write an application that uses an Array to store 10messages of type String. You will store this Array with 10 messages of your choosing. For example, a mes

Prepare an android keyboard Project Description: I want to prepare an android keyboard that have many features.( i will describe later) I want the full app and a trial ver

Viewing a User's Wall Where your project allows you to view a user's profile, your ZHTML must provide the following capabilities: 1. Provide a Wall for that user profile, dis