Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Aspect Oriented Programming in Java

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 13-03-2010
Member
 
Join Date: Dec 2009
Posts: 62
Aspect Oriented Programming in Java
  

Hello, I am working on java and currently searching for the introduction to AOP (Aspect Oriented Programming) with the Spring framework. If you are having any kind of information about it, then please help me to achieve it. I will be thankful to you. I have search this related to it, but on internet I have got some information, but it is not useful for me. So, please provide some details about it.

Reply With Quote
  #2  
Old 13-03-2010
Member
 
Join Date: May 2008
Posts: 2,382
Re: Aspect Oriented Programming in Java

The aspect-oriented programming because it provides a programming paradigm and new concepts, developed a very specific jargon which makes no understanding of its concepts are ultimately simple but powerful.
  • aspect : A module defining the grafts and their activation points,
  • graft : A program to be activated at a certain point of execution of the system, specified by a junction point,
  • action point, Breaking, court : Place where the software is inserted a graft by the aspect weaver,
  • junction, Implementation : Location in the flow of execution of the system, where it is valid to insert a graft. To clarify the connection it is not possible, for example, to insert a graft in the middle of a function code. By cons we can do before, around, instead of or after the function call.
Reply With Quote
  #3  
Old 13-03-2010
Member
 
Join Date: Apr 2008
Posts: 1,947
Re: Aspect Oriented Programming in Java

Take the example of a simple business class "test" which contains the method "hello ()" and returns a String. So we will see how to change the Spring configuration in order to track each call and each output of the method hello (). The idea is to intercept input / output method "hello ()" and the logger with an external class "MonLogger".

Code:
public class test 
{
public String hello (String msg) 
{
String s = "Hello" + msg;
System.out.println (s);
return s;
}
}
Reply With Quote
  #4  
Old 13-03-2010
Member
 
Join Date: Feb 2008
Posts: 1,845
Re: Aspect Oriented Programming in Java

Aspect Oriented Programming (AOP) has been around for a long time but recently has begun to get more attention from the Microsoft .NET development community. As with any new adoption of technology, there tends to be many misconceptions of the technology and how to use it. AOP is no exception to this. To bring light to AOP, this article and the following code sample will demonstrate a practical application of AOP and some common problems that AOP can address. Taking an application that consumes a Web service, we will be extending functionality of the objects that the Web service returns by applying new aspects to them using an AOP framework. These aspects will provide for this functionality independent of the object model generated off the WSDL.
Reply With Quote
  #5  
Old 13-03-2010
Member
 
Join Date: May 2008
Posts: 2,007
Re: Aspect Oriented Programming in Java

Different types of advice are present in the AOP as below:
  • Before advice: Executed before the join point.
  • After returning advice: Executed after the join point (If the intercepted method is executed normally - no return exception).
  • After throwing advice: Executed if the intercepted method returns an exception.
  • After (finally) advice: Executed output of the join point (normal execution of the method or output exception).
  • Around advice: It includes the execution of the intercepted method. This is the most powerful advices. It allows to configure the behavior before and after method execution.
Reply With Quote
  #6  
Old 13-03-2010
Member
 
Join Date: Apr 2008
Posts: 2,000
Re: Aspect Oriented Programming in Java

If you are using the AOP then it is having the benefits below:
  • Increased Maintenance : The technical modules in the form of appearance can be maintained more easily because of its detachment from its use,
  • Improved reuse : Any module can be reused without worrying about its environment and independently the business or application domain. Each module implements functionality specific technique, we need not worry about future developments: new features can be implemented in new modules interact with the system through aspects.
  • Productivity gain : The programmer is concerned only the aspect of implementation is concerned, This simplifies work and increases the parallelism of development.
  • Improved code quality : Simplifying code entails the programming aspect allows make it more readable and thus better quality.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Aspect Oriented Programming in Java"
Thread Thread Starter Forum Replies Last Post
Object oriented programming with java cloud101 Software Development 2 22-02-2012 12:11 AM
What are the different types of Object Oriented Programming Languages? fLUTE Software Development 4 11-07-2011 02:39 PM
static methods in object oriented programming Satchel Software Development 5 07-01-2011 08:58 PM
What is Procedure Oriented Programming Language? sRIPRIYA Software Development 4 03-01-2011 09:40 PM
The OOP Object Oriented programming Concept & its principle? Bhavya Software Development 3 25-02-2009 08:16 PM


All times are GMT +5.5. The time now is 12:40 AM.