 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
NetTuts.com: Aspect-Oriented Programming in PHP
by Chris Cornutt May 11, 2012 @ 09:34:18
On the NetTuts.com (Plus) site there's a new tutorial focusing on aspect-oriented programming in PHP, a shift from the usual methods of development with the goal of "crosscutting" your classes/objects by weaving in extra functionality. Their examples of this method use the FLOW3 framework.
All modern frameworks (including FLOW3) push a lot of patterns into the software stack that do a great job at separating the concerns of your business logic; among them the famous MVC that is separating your logic into different layers. However, an application is not only built on business logic alone. As it grows, you may want to implement additional services, features, plugins or plugins of plugins. You surely don't want this stuff in your business logic! But what are your options?
For their example, they show how to implement a logger across your classes, taking it out of the actual code and implementing it in an aspect (at the "pointcut") by "weaving" it into a DocBlock comment with special annotations. They help you get the FLOW3 framework set up and show you how to "kickstart" a new project and work with its controllers and resources. They show you how to implement the Logging aspect and how to define it in your code (and where it caches the requests).
voice your opinion now!
aspect oriented programming tutorial typo3 flow3
Matthew Weier O'Phinney's Blog: Aspects, Filters, and Signals, Oh, My!
by Chris Cornutt January 11, 2011 @ 10:24:08
Matthew Weier O'Phinney has a new in-depth post to his blog that looks at a few features of Aspect Oriented Programming and what technologies are out there that help support it right now. He mainly focuses on the features of the Lithium framework because of its filtering techniques.
Last month, during PHP Advent, gwoo wrote an interesting post on Aspect-Oriented Design, or Aspect Oriented Programming (AOP) as it is more commonly known. The article got me to thinking, and revisiting what I know about AOP, Intercepting Filters, and Signal Slots -- in particular, what use cases I see for them, what the state of current PHP offerings are, and where the future may lie.
He gives a base class to help make things a bit clearer for the rest of the post - a simple Foo instance that uses a Listener interface to "doSomething". Matthew also talks about intercepting filters (extracting things like logging/debugging out of the code and put on its own) and signal slots. For both, he gives examples of how Lithium handles them and some of his opinions on the methods. He points out a few concerns that he has for the current state of AOP in PHP (frameworks) and suggests that, if you haven't looked at these ideas, you do so sooner rather than later.
voice your opinion now!
aspectoriented programming aop aspect filter lithium
phpAspect: New release of APDT
by Chris Cornutt May 25, 2009 @ 12:37:54
As mentioned in this new post to the phpAspect blog, there's a new version of the Aspect PHP Development Toolkit that's been released.
The Aspect PHP Development Tools (APDT) project provides Eclipse platform based tool support for AOSD with PHP. Our goal is to deliver a user experience that is consistent with the PHP Development Tools (PDT) when working with PHPAspect projects and resources. This plugin provides an integration layer between the PHPAspect weaver, runtime and Eclipse/PDT extension points.
The Google Code page for the project has links to more information on the project and, of course, links to the latest downloads.
voice your opinion now!
release tool development aspect apdt
Guilherme Blanco's Blog: Transparent PHP AOP
by Chris Cornutt August 02, 2006 @ 06:27:49
Guilherme Blanco has submitted a note about a project he's been working on, especially pertinent due to some of the discussion flying around on the subject - his Transparent PHP AOP project.
My AOP package implements this magic with PHP code in a transparent way. This means that the original code does not need to be altered in a special way to add or remove the aspects. It is only necessary to add a comment line to define the location of the pointcuts.
This package is actually a smart caching compiler. It preprocesses the original code to locate the pointcuts. Then it generates a new version that may include the code that implements the aspects that I want to enable.
In his blog entry, there are links to the package downloads and the official manual to help get you started as well as more details on some of the functionality behind the magic.
voice your opinion now!
transparent aspect oriented transparent aspect oriented
Sebastian Bergmann's Blog: AspectPHP
by Chris Cornutt March 20, 2006 @ 06:54:17
As was mentioned in one of his previous blog posts, Sebastian Bergmann has been working up his own PHP version of an aspect-oriented framework. According to this new post, he's already done some work on the project and has created a page with more information.
As I wrote earlier, I am not satisfied with the Current State of AOP for PHP and started to work on AspectPHP a while ago. Today I am going to share my ideas on the subject.
What sets AspectPHP apart from other implementations of Aspect-Oriented Programming is its simplicity: aspects are plain PHP classes that declare pointcuts using annotations.
He gives an example of this kind of functionality, including a bit of code to illustrate. The example logs all method calls and, in this case, simply outputs them to the browser.
Unfortunately, he also mentions that, at this time, he doesn't have any code for the framework that he can release, but you can check out the site he's created for more information.
voice your opinion now!
aspect oriented programming aspectphp framework logging example aspect oriented programming aspectphp framework logging example
|
Community Events
Don't see your event here? Let us know!
|