Sebastian Bergmann: AOP in PHP 5
676141
While attending Gunter Kniesel's "Aspect-Oriented Software Development" lecture yesterday it occured to me that it might be possible to (ab)use PHP 5's __autoload(), __call(), __get(), and __set() interceptors to facilitate Aspect-Oriented Programming with PHP.
547846
In a new post to his blog, Jacob Santos talks about why object oriented programming just "isn't easy" - including a few of his dislikes about OOP in PHP.   Functional developers have it easy. Damn straight and I wonder why so many developers choose to write functions, when they can opt for more beautiful classes instead. [...] It is easy to get functions right, all you have to do is prefix them and name them properly and you're done.   He notes that most people get OOP up to a certain point - that being the "has-a" and "is-a" relationships - where things start flying over their heads. He expresses his dislike of the way that Singletons are used (or not used) and places some of the blame on the tutorial and book authors out there trying to teach novice programmers with analogies that don't make sense in a codign situation.
706448
Since it's always good to know where we've come from (to see where we're headed, right?), Sebastian Bergmann has posted an observeration he's had upon PHP Magazin's look back at the world of PHP.   In his editorial for the 5 Year Anniversary Edition of the German PHP Magazin Bj&ouml;rn Schotte posted a link to Kristian K&ouml;hntopp's wrapup of the world's first PHP conference which was held in October 2000 in Cologne, Germany.   The wrapup is of the PHP Congres Cologne that happened back at the beginning October of 2000. Topics disussed were PHPDocumentor, OpenTracker, using MySQL with PHP, web security, and much more. Check out the full posting for all of the details and a bit of a look back in PHP's history.   You can also check out some of Bj&ouml;rn's comments about the article over on the ThinkPHP Blog.
305676
Raphael Stolt has posted a book review of one of Manning Publishing's PHP-related books, "PHP in Action: Modern Software Practices for PHP".   Over the last few days I got the chance to skim through the upcoming Manning release "PHP in Action: Modern Software Practices for PHP" by Dagfinn ReiersÃ¸l et al. The reviewed book is seperated into four main parts, covering lots of interesting topics in a good and fluent writing style.   Raphael outlines the book, mentioning the four parts the book is divided up into:  Basic PHP tools and concepts Developing applications via Test Driven Development Web presentation and user interfaces Object-oriented development including things like database abstraction  Raphael gives the book a positive rating and recommends it for anyone that has the basics down and is looking to extend their knowledge that much more.
654364
On the Stubbles blog, Frank Kleine has pointed out a proposal from Stefan Marr to include functionality for traits in PHP.   As a language construct within PHP it would be very easy to do the same, but easier to learn and to use. Beside some keyword issues (the RFC uses "use" as keyword, but this will of course conflict with namespaces) I'm wondering what this will have an impact on reflection - the RFC stays unclear about this.    A trait is a free-floating chink of functionality that, instead of being confined to a class (or file) that has to be called on to use it, exists where the developer can use it from anywhere at any time. This helps solve some of the issues with single inheritance in PHP.
666422
The latest edition of php|architect magazine has been published - the November 2006 issue. Articles included in this month's edition include:  "Services made simple with PHP" - Caroline Maynard, Graham Charters, Matthew Peters, Megan Beynon, and Simon Laws "Tune Your Search Results With Ajax" - Will Fitch and Greg Black "Synchronizing the World" - Sherman Lilly "Learning from Ruby on Rails" - Chris Hartjes  as well as the latest installments the Security Corner and Test Pattern columns.   You can check out the full contents of the issue here and, if you just want to subscribe to this great PHP publication, you can check out their digital edition and print edition options.
245642
Adding to his popular Install PHP 5 on Windows workshop, Edward Tanguay has just posted two new steps, which teach you PHP 5 object-oriented programming in a very practical manner: In the first step you download and set up a PHP 5 page which reads an XML file and displays book reviews linked to the Amazon Associate program. In the next step, Edward goes line-by-line through the code and examines the classes, properties, constructors, public methods, private methods and static methods discussing how each works and why programming in this fashion is better than procedural programming. There are dozens of screen screenshots which make this tutorial easy to follow. If you get stuck or want to discuss an issue, you can instantly post questions and comments on each step without registering.
427744
The latest edition of PHP Magazine's PHPBarnstormer has been released - Issue #23.
703914
On his blog, Stuart Herbert has a quick tip showing how to mimic a feature of Ruby on Rails:   I'm still working on the next article in my series looking at PHP on servers, so in the mean time, check out this simple way to emulate Ruby's nice way of handling separate getter, setter and state query methods in PHP.   He admits his example isn't as elegant as the Ruby method, but it does get the job done. Code for the method is included in his post ready for cut and pasting.
91596
Padraic Brady has posted a manifesto of sorts about the work that he's been doing on his PHPSpec library and trying to work it into the approval process for the Zend Framework.   I'll be attempting to pound the Zend Framework into submission so I can apply Behaviour-Driven Development (BDD) using PHPSpec when I write a Controller. Why? Because I feel like it, and it gives me an excuse to promote one possible incarnation of PHPMock and the PHPSpec Zend Framework extension. See? Perfectly reasonable selfishness!   He hopes to move it past the typical test-driven development process that PHPUnit offers and "kick your ass into high-TDD gear" without having to have worked much with it before then (the key is simplicity).   He includes some code examples (how it should flow) and describes some of the challenges that he's coming across so far, specifically with the way that the Zend Framework works with the Controllers and what he wants to accomplish.
506696
On the Zend Developer Zone, Cal Evans has posted a quick look at one of the new offerings from the Manning Publishing group - "PHP in Action".   My buddy Olivia over at Manning Publications sent us a present recently. They are working on the title PHP in Action and they sent us a chapter to share with you. PHP in Action is scheduled to release in April of this year but it's available now in "Manning Early Release Program", or MEAP. MEAP is a cool program that allows you to buy the book long before it is released and have access to the chapters as they are released. Then, when the final dead-tree edition ships, they will send you one. The great thing is, there is no additional cost for MEAP.   He links to the book's description on the Manning site and gives some credit to the authors, Dagfinn Reiersol with Marcus Baker and Chris Shiflett. And, of course, the link to the sample chapter from the book - a look at Design Patterns.
322217
Sara Golemon brings us some news from the front about PHP6 in her latest blog entry today.   While everyone else has been busily gearing up for the release of PHP 5.2 and the new features that are going to come with it, Andrei and his small band of merry babelonians (yours truly included) have been making inroads on preparing PHP6 for a preview release. In the past week we've managed to roughly double the number of builtin functions (those which are part of the main distribution) that have been reviewed for unicode safety, either flagging them as good or upgrading their functionality   She also talks about what kinds of functions this entailed and how far along they are total (around 22%). She also encourages anyone that wants to get involved to help to jump right in.
664370
In his latest post, Sebastian Bergmann shares some information about an extension for the Reflection API included in PHP 5.    The Extended Reflection API enhances PHP 5 by providing access to type information and annotations that are embedded as doc-comments into the sourcecode.   Processable additions to the source code enable a wide range of new applications in general, and Web Services and Aspect-Oriented Programming in particular.    The wiki page for the project shares the difference between the two, including graphics to help show how they tie in together. There's even some pseudo code to get you started with the different class types, a mapping out of the API.
654370
Pierre-Alain Joye has a little reminder posted to his blog today about two posts from planet-debian and Apache that refer to clones/references in PHP4 and PHP5 and some of the misconceptions presented there.   Reading planet-debian and Apache (from Sven and David), I catched two posts about clones and references in php4 and php5. I do not think it is worth to explain again everything here as Sara wrote a very good post already, check it out here.   He mentions his annoyance with articles/posts like these and the impact that it has on PHP as well as the person posting.   I wonder when the OS community in general will be mature enough to stop bitching at each other. And that's valid for PHP developers, gnome-kde and other well established wars.
496780
Lorenzo Alberton has posted some updates about the PEAR packages that he maintains to his blog today including MDB_QueryTool, Mail_Queue2, MDB2, and Translation2.   Even if lately I've been coding way more in C/C++ than in PHP, I still keep an eye on PEAR developement: I reckon in the last month I've closed a bug a day, on average. And after my last call for help about my PEAR packages, I'm also pleased to announce that someone did indeed offer a hand. I'm happy to welcome not one, but two new developers!   Each of the items has links to their PEAR homepage and a few quick words on where the package stands (including developers involved or wanting to get involved). He also reminds developers out there that they can help out too if they want to jump in and get into PEAR.
661071
PÃ¡draic Brady continues his series looking at the creation of complex views in the Zend Framework with part six today all about gathering together the thoughts and ideas from the previous articles into a cohesive whole.   Part 6 now takes our previous fragments of theory and attempts to stitch them together into a cohesive whole - a description of a possible end solution. Yes, I know code talks loudly, and we'll get there with an almighty bang in Part 7 (which I promise is no more than a week away). Until then it's more verbosity.   He suggests a list of six terms to help get everyone on the same page when talking about the complex views:   Includes Partials Dispatches Layouts Placeholders Response Segments   Since these terms would mean nothing without proper definitions, he provides a few paragraphs on each explaining what they are and, where necessary, using code to illustrate the point.
753153
P&aacute;draic Brady has a suggestion for all of the PHP readers out there - two articles in the latest edition of php|architect magazine, the May 2007 edition:   The two that stick in my mind are Jim Delahunt's "Unicode and PHP: A Gentle Introduction" and Jeff Moore's "Test Pattern: Model View Controller". Both are something those seeking illumination on these topics should certainly read.   The first presents an introduction to one of the hottest topics in the PHP world - Unicoding - including a few same scripts to get you going. The second article, a look at the Model/View/Controller pattern that really gets more to what the pattern is about rather than just talking about its structure.