Announcement Announcement Module
Collapse
No announcement yet.
Spring Advice Vs Introductions Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Advice Vs Introductions

    Hi

    Spring provides AOP Support Through Advices and Introduction.
    I know How They Work but what i am confused is what is the exact difference between them? and how to decide which to use when?

    Thanks
    Raja

  • #2
    advices: http://static.springsource.org/sprin...tml#aop-advice

    introductions: http://static.springsource.org/sprin...-introductions

    Comment


    • #3
      Hi
      I know how to use them. What i wanted to know was

      What is the exact difference between them and how to decide which one to use when?

      Thanks
      Raja
      Last edited by raja@spring; Feb 5th, 2010, 01:03 AM. Reason: formatting

      Comment


      • #4
        Originally posted by raja@spring View Post
        Hi
        I know how to use them. What i wanted to know was
        What is the exact difference between them and how to decide which one to use when?
        Thanks
        Raja
        Advices are basically your Proxy Pattern, the call to a resource is being intercepted (before, after returning, after throwing, around...) and allows you to add additional functionality (auditing, transactions, security...). They are usually there to implement your crosscutting concerns so that for instance you don't have to add code to each entity in your system that you want to audit and run performance testing (measure execution times and things like that).

        The introductions or mixins allow you to mixin or add new functionality to an existing object usually by making your object implement and interface and providing an implementation for that interface.

        There are ton of documentations and blogs online on this so you should be able to find examples and explanations for both without much trouble.

        Comment


        • #5
          Thanks for the replies

          Comment

          Working...
          X