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
write algorithm to perform the following operations on it create,insertion,deletion,for testing overflow and empty conditions.

A palindrome is a string that reads the same from both the ends. Given a string S convert it to a palindrome by doing character replacement. Your task is to convert S to palindrome

An online music store offers all songs for 3$ each. The store requires members to prepay any amount of money they wish, and then download as many songs accordingly. You are require

Liferay Especialist and Java Programmer Project Description: We require to make a full functional Portal with online tools. JSF, Java, Portlets, Skills required: CSS

Write a program that uses one of the Map classes to implement a contact list. Contact information should include first name, last name, a phone number and an email address. The lis

Each time an object is started in Java it goes into the area of memory named as heap. The primitive variables like double and int are allocated in the stack, if they are local inst

Describe the Superclass in Inheritance ? In this example you start through defining a more common MotorVehicle class. public class MotorVehicle { private String licensePlat

Write a AXIS2 SOAP Java Web Service that performs a bidirectional currency conversion for the following currencies- GBP, EUR and USD (American Dollar). You are allowed to hardco

Develop a Custom Android App Project Description: We want you to construct a custom Android app. Once user downloads the app and upon installation the user gets push notif

How to convert string value to number in java? While processing user input it is frequent essential to convert a String in which the user enters into an int . The syntax is