Aspect oriented programming (aop), JAVA Programming

Assignment Help:

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.

 


Related Discussions:- Aspect oriented programming (aop)

Program, Write a program called Power that displays the positive powers of ...

Write a program called Power that displays the positive powers of 2. When the user enters the exponent at a prompt, the program displays 2 to that power. The program halts when the

Package inheritance hierarchy program, (Package Inheritance Hierarchy) Pack...

(Package Inheritance Hierarchy) Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping options, each with specific costs associated. Create

Java remote method invocation (RMI) architecture, Java Remote Method Invoca...

Java Remote Method Invocation (RMI): It gives a way for a Java program on one machine to interact with objects residing in different JVMs. The important blocks of the RMI arc

Array, how do you access a value of an array?

how do you access a value of an array?

Write a program in javascript that will read in an xml file, Write a progra...

Write a program in Javascript that will read in an XML file. This file will contain details of devices maintained by the IT department of an organisation including an ID number, de

What is a variable in java program, What is a variable in Java program? ...

What is a variable in Java program? It's a memory location. Memory location is given some name. Memory location is being assigned some value. Value may change o

Explain how java allows the constraints on a generic type, Consider the fol...

Consider the following C++ template class. #include using namespace std; template class SortedList { public: SortedList() {size = 0;} void insert(T item); friend ostrea

Packages and interfaces, what are the advantages of packages and interface?...

what are the advantages of packages and interface? why we use them? and what is the way of using packages and interfaces complete description with examples?

Develop a java application, Modules of software: 1 - Serial RS232 comm p...

Modules of software: 1 - Serial RS232 comm port comunication 2 - NanoHTTPD serving some processed pages 3 - System tray application to indicate status and access configura

Explain parentheses in java, Explain Parentheses in Java ? Sometimes th...

Explain Parentheses in Java ? Sometimes the default sequence of evaluation isn't what you want. For example, the formula to change a Fahrenheit temperature to a Celsius tempera

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd