Loading ...
Sorry, an error occurred while loading the content.

Aspect Oreinted Programming

Expand Messages
  • cplus_developer
    Hello All ,would you please tell me how aspect oriented programming roles in design and refractory?
    Message 1 of 3 , Apr 4, 2008
    • 0 Attachment
      Hello All ,would you please tell me how aspect oriented programming
      roles in design and refractory?
    • Dean Wampler
      AOP is analogous and complementary to OOP, in many ways. AOP is a modularity approach that addresses cross-cutting concerns. Here s what that fancy sentence
      Message 2 of 3 , Apr 4, 2008
      • 0 Attachment
        AOP is analogous and complementary to OOP, in many ways. AOP is a modularity
        approach that addresses "cross-cutting concerns."
        Here's what that fancy sentence means. "Cross-cutting concerns" are issues
        that don't fit well within the boundaries of your object model. For example,
        you probably have an application domain model (I don't just mean UML, etc.
        It could just be code...), such as for a banking app., cell phone software,
        etc., etc.

        Suppose you need to persist state, like account transactions for the bank,
        and you will use a common strategy for doing so for all those domain objects
        (same database, common naming conventions, etc., etc). It is difficult to
        isolate all the logic for the persistence "concern" in one place; you tend
        to scatter similar bits of code across all the objects that need persisting.
        This is a break down of modularity, both of the persistence "concern" and
        of the domain object model, with bits of the persistence domain
        scatteredall over the place.

        (Good OOD and some innovative tools can reduce this problem, but it never
        goes away completely in typical apps. these days.)

        AOP tries to restore modularity by making it possible to express how
        persistence should affect the other domain without manually inserting code
        in the other domain. AOP tools aim to give you a way to express which domain
        classes need persisting and how to invoke persistent logic in the correct
        times and places. This is often done with special syntax, language, or
        conventions for declaring the relationships between the domains. If you can
        express all this in one place in a reasonably succinct and maintainable way,
        then you've restored overall system modularity and improved maintainability,
        etc.

        So, AOP is used like OOP (and usually along with OOP...) in the design and
        implementation. Refactoring applies, too, but currently there are issues
        refactoring aspect code unless you follow some good design approaches. The
        best known AOP language is an extended form of Java called AspectJ. There
        are pros and cons to using AspectJ, where "development issues" are
        concerned. There are also aspect libraries or extensions for other
        languages, like C, C++, .NET, Ruby, Python, etc.

        Here are some sites to look at for more information:

        http://www.aosd.net Portal for the Aspect-Oriented Software Development
        community, including lists of AOP tools for various languages and
        environment.
        http://www.aspectprogramming.com My site on AOSD. See the "papers" link,
        for example.
        http://www.eclipse.org/aspectj/ AspectJ information

        Hope this helps.

        Dean

        On Fri, Apr 4, 2008 at 8:42 AM, cplus_developer <cplus_developer@...>
        wrote:

        > Hello All ,would you please tell me how aspect oriented programming
        > roles in design and refractory?
        >
        >
        >



        --
        Dean Wampler
        http://www.objectmentor.com
        http://www.aspectprogramming.com
        http://aquarium.rubyforge.org
        http://www.contract4j.org


        [Non-text portions of this message have been removed]
      • cplus_developer
        Hello and thank you very much for the clear and excellent explanation ,I appreciate you,would you please introduce me some resources or example that acutally
        Message 3 of 3 , Apr 4, 2008
        • 0 Attachment
          Hello and thank you very much for the clear and excellent explanation
          ,I appreciate you,would you please introduce me some resources or
          example that acutally show me how oop and Aop integrated in design
          ,and how actually we refractor aspect code with good design
          aproaches ? in other word ,would you please tell me how I actually
          do good design when I use oop and Aop together .
          I appreciate you .Sincerely Mohsena
        Your message has been successfully submitted and would be delivered to recipients shortly.