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
Why hub is used in networks? Hub is networking equipment and a device that connects various computers to form a network. In a network the NIC translates the message within elec

What is Color in AWT? Color is a class in the AWT. Individual colors such as red or mauve are examples of this class, java.awt.Color. Be sure to import it if you want to use ot

What Content Issues is happened in java language? Some people claim in which Java is insecure since it can show the user erotic pictures and play flatulent noises. By this stan

Why are JSP pages the preferred API for creating a web-based client program? Because no plug-ins or security policy files are required on the client systems (applet does). Also,

Write a brief note on each of the following. FTP Telnet Instant messaging VoIP FTP: File Transfer Protocol: This protocol is used to upload and download the

The IncludeAction class is useful when you require to integrate Struts into an application that uses Servlets. Use the IncludeAction class to contain another resource in the respon

Very frequently when you write code, you desire to perform distinct actions for different decisions. You can employ conditional statements in your code to do this. In JavaScript

A value, the data assigned to a variable, may contain any sort of data. Though, JavaScript considers data to fall into many possible types. Based on the type of data, certain opera

There are two different types of data in a JSP page. 1. Static part which occurs copied directly to the response by the JSP Engine. 2. Dynamic part, which have anything that

Question 4 Write a program that receives two integer inputs from a user, an ending value, lastvalue and column, column. The program will display all numbers from 1 to lastvalue