PHP Developer's Network : Network Member Forums

Class: Transparent PHP AOP



  Search   All class groups   Latest entries   Top 10 charts   Newsletter   Blog   Forums   Help FAQ  
  Login   Register  
Recommend this page to a friend! Trackback URL: http://www.phpclasses.org/trackback/browse/package/3215.html
      Classes of Guilherme Blanco  > 
Transparent PHP AOP
 >  Download  >  Support forum Support forum  >  RSS 1.0 feed RSS 2.0 feed Latest changes  >  Stumble It! Stumble It!  >  Bookmark in del.icio.us Bookmark in del.icio.us  
  Screenshots Screenshots   Video Videos   Supplied by   Group folder image Groups   Detailed description  
  Rate classes User ratings   Trackback   Applications   Related links   Files Files  
  • Screenshots:

  • Transparent AOP in action
    File Role Description
    Accessible without login Image file screen.jpg Screen
    Transparent AOP in action
  • Tutorial videos:

  • PHP Conference 2006 - Transparent PHP AOP: Trabalhando com Aspec
    Title Description Duration
    Video PHP Conference 2006 - Transparent PHP AOP: Trabalhando com Aspec Palestra sobre "Transparent PHP AOP: Trabalhando com Aspectos no PHP" por Guilherme Blanco, reali... 00:00:00
  • Supplied by:

  • Picture of Guilherme Blanco
    Name: Guilherme Blanco is available for providing paid consulting. Contact Guilherme Blanco .
    Published packages: 5
    Country: Brazil Brazil - PHP jobs in Brazil
    Home page: http://blog.bisna.com/
    Age: 24
    All time rank: 144
    Week rank: 312

    Browse this author's classes

  • Innovation Award:

  • PHP Programming Innovation award nominee
    June 2006
    Number 3
    Aspect Oriented Programming (AOP) is a recent topic with growing interest in the software development community.

    It allows adding and removing aspects to the main code of an application without changing its core code, making possible to adapt applications to the needs of different environments with little or no maintenance effort.

    This can be used for instance to add logging and debugging support to an application without changing the code to be debugged. The debugging aspect code is defined separately from the main code.

    This way the same application code can be used with debugging enabled on development environment, and debugging disabled on the production environment so it can run at maximum speed and with less memory usage.

    Currently, like most other popular language, PHP does not provide built-in AOP support. However, there have been several attempts to emulate AOP concepts in PHP.

    This package provides solution that achieves a great level of transparency. It can add new aspects to a PHP class without changing the original class code.

    This package uses a compilation approach that works by generating a new version of the class that gets the new aspects added. A smart caching technique is used to avoid recompilation overhead when the same class is used with the same aspects.

    When it is necessary to use the class without any aspects, the original class is used without the presence of any advice or callback code in the pointcuts, to not slow down the original class.

    Manuel Lemos
  • Groups:

  • Group folder image
    Constructs to assist in the language control
    View top rated classes
  • Detailed description:

  • This package can be used to implement Aspect Oriented Programming (AOP) in PHP in a transparent way. This means that you can add or remove aspects to a class without changing its code.

    The class provides an alternative for the PHP require() function that includes a PHP class and transparently modifies it to insert aspect advice code in the pointcuts defined in the class code that is going to have new orthogonal aspects added.
    Also, it can automatically include advice code in automatic pointcuts, like at the begin and end of each method.

    The pointcuts are marked in the class modify as simple PHP comments, so the class behavior is not affect when AOP support is not being used.
    The automatic pointcuts do not need to be marked. This approach follows exactly the AOP theory, without need to touch a single line of 3rd-party code, for example.

    The class is compiled and a new class file is generated with the code of the new aspects. The compiled class version is cached to avoid the recompilation overhead next time the same class is include using the same aspects.
    The technique checks for changes in one of each XML file, or in original class file or even if new XML files were added/removed.

    The aspects are defined in a separate XML file that includes the definition of the PHP advice code and the pointcuts where the code should inserted.

    Optionally, the advice code can be compacted into a single line before it is inserted in the pointcuts, so the original class line numbers are preserved.
    Another interesting option is to define the compiled files directory.

    This package requires PHP 4.3.0 as it uses the PHP tokenizer extension. It does not use any external PHP extension.
  • User ratings:

  • Ratings
    Utility
    Consistency
    Documentation
    Examples
    Tests
    Videos
    Overall
    Rank
    All time:
    Sufficient (75.0%)
    Good (91.7%)
    Sufficient (66.7%)
    Not sure (41.7%)
    -
    -
    Not sure (57.5%)
    730
    Month:
    Not yet rated by the users
  • Trackback links:

  • Link Description
    Transparent PHP AOP RC3
    A new version of Transparent PHP AOP is available...
    Transparent PHP AOP 1.0 RC 2
    I’m proud to announce you the new version of Transparent PHP AOP...
    Experts vs. Expat XML
    A month ago I released the Transparent PHP AOP version 1.0 RC1. Now, I’m preparing the RC2 with some improvements scheduled...
    register_superglobal( name );
    Some time ago I spoke with Derick Rethans about the possibility to create a function called “register_superglobal”...
    Robust Persistence Layer
    During the past two months, I worked in my graduation conclusion work (still not released - this version is not mine!). While programming the website, I had to deal with some kind of Object-Relational Mapping...
    Transparent PHP AOP
    Recently I have released a new version of my package Transparent PHP AOP. It adds Aspect Oriented Programming (AOP) support to PHP...
    Latest blog trackback links Latest blog trackback links
  • Applications that use this class:

  • No application links were specified for this class.
    Add link image If you know an application of this package, send a message to the author to add a link here.
  • Related links:

  • Link Description
    Transparent PHP AOP Online Manual
    Manual of usage available for consulting
    Presentation Video
    Video of Transparent PHP AOP seminar (Portuguese Brazilian) - December 1st, 2006
    Presentation Slides
    Slides of Transparent PHP AOP seminar (Portuguese Brazilian) - December 1st, 2006
    Aspect Oriented Programming Theory
    What is AOP?
  • Files:

  • File Role Description
    Plain text file aop.dtd Data
    DTD for XAD (Xml Aspect Definitions)
    Plain text file CHANGELOG.txt Doc.
    List of changes
    Plain text file class.Advice.php Class
    Advice
    Plain text file class.AOP.php Class
    Main class
    Plain text file class.AOP_CodeCompiler.php Class
    Class to compile AOP code
    Plain text file class.AOP_CodeCruncher.php Class
    Auxiliar class do crunch PHP code
    Plain text file class.AOP_CodeParser.php Class
    Class to retrieve PHP code as tokens
    Plain text file class.AOP_XMLElement.php Class
    XML Element for XML Parser class
    Plain text file class.AOP_XMLReader.php Class
    XML Parser class
    Plain text file class.Aspect.php Class
    Aspect loader
    Plain text file class.AutoPointcut.php Class
    AutoPointcut Class
    Plain text file class.CustomPointcut.php Class
    CustomPointcut Class
    Plain text file class.Pointcut.php Class
    Pointcut holder
    Plain text file class.Weave.php Class
    Weave
    Plain text file func.require_aop.php Aux.
    Function require_aop
    Accessible without login HTML file Manual.html Doc.
    Manual of usage
    Accessible without login Plain text file TODO.txt Data
    TODO List
    Files folder image tutorial
      Plain text file class.Test.php Class
    Tutorial Test class
      Plain text file debugger.xml Data
    Tutorial XML file
      Plain text file index.php Example
    Tutorial main script
    Download all files: aop.tar.gz aop.zip
    NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

 
  Advertise on this site   Site map   Statistics   Site tips   Privacy policy   Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2008 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products