Donald Belcham and Kyle Baley talk to Carl and Richard about inheriting existing (brownfield) applications. The focus of this talk is on setting up the environment before tackling the code with a special focus on testing.
Carl and Richard interview Glenn Block, Steve Lasker, and Tim Huckaby on the state of the Smart Client.
This new post on the Symfony blog today looks at using the framework’s built-in support for the YAML format. They include a few examples of the code to make the files and how to use them.
Here is a short tutorial about my discovery of the new YAML parsing library that comes with symfony 1.1. As you may know, YAML files are a place symfony developers spend time writing configuration, it is very important they have a good tool to manipulate data and debug files.
They include code showing how to pull in a sample file, access the properties inside of it and how to take a multi-dimensional PHP array and push it back out (automagically) into a new YAML formatted file.
Padraic Brady has gone back to a previous project, working with OAuth, and some thoughts on it and its possible implementation in both the Zend Framework and PEAR.
Starting yesterday, I opened up my IDE, updated PHPUnit, and got cracking. At the current rate of development a Consumer is likely at the weekend. I’ve already started writing up a formal proposal for PEAR and, of course, the Zend Framework also. I’m thankful the OAuth specification is this simple – it’s one of the easiest to read specifications I’ve had to pleasure to work with.
He notes that an update to the API’s Core (from 1.0 to 1.1) might be on the horizon, but can’t see it affecting extensions/packages that much. He also mentions Extensions – not PHP extensions, these are augmentations to the OAuth core that allow for other different functionality to be included (like Discovery).
On the ProDevTips blog, there’s a quick post with an example of a Zend Framework/jQuery and Smarty combination he came across while working up a CMS system:
The result is an interface where an administrator can settle money transfers. It will start with displaying a list of all requested transfers, when the administrator has manually finished transferring cash to each recipient’s account he can use this interface to update the database.
He briefly explains the code, a combination of a jQuery function run on page load, a Smarty template for each transfer’s information and the backend code through the Zend Framework to handle the requests issued from the button click.
A new tutorial has been posted on the PHPFreaks.com site today dealing with paginating your data (in their example, info from a database).
It makes way more sense to break up your list into page-sized chunks, and only query your database one chunk at a time. This drastically reduces server processing time and page load time, as well as gives your user smaller pieces of info to digest, so he doesn’t choke on whatever crap you’re trying to feed him. The act of doing this is called pagination.
They include the full script for those that want to jump right in and the detailed info in the rest of the tutorial for those that need a little more insight. The script gets a count of the results first then uses the LIMIT format for MySQL to restrict the number of rows returned each time and where to start those returned rows from.
DevShed has posted the fifth part of their series looking at the visibility keywords on PHP5′s object oriented support today. They’ve already looked at private, public and protected properties in a class, now they look at the use of making methods private to restrict their use/extension.
Of course, when it comes to specifying how visible a certain class property or method will be, you know that PHP 5 permits you to work with three distinct levels of access, called “public,” “protected,” and “private” respectively. [...] As you may have noticed, however, I’ve not taught you how to define private methods yet, which is something that can definitely be very useful if you want to restrict the access to your classes from the outside more severely.
The tutorial shows the creation of a class with private properties and then expands it to include a private method. Then they call it from an object, an example of the error PHP kicks back is there too. He also includes the concept of a “getter” to call the private function from a public one.
Carl and Richard talk to Eric Brechner, the author of the book ‘I. M. Wright’s Hard Code’, an opinion blog (and book) with a tude!
The IBM developerWorks website has a new tutorial (login required) showing how to use the Eclipse PDT functionality to debug scripts your PHP development.
The PHP Development Tools (PDT) plug-in, when installed with Eclipse Europa, gives you that ability to quickly write and debug PHP scripts and pages. PDT supports two debugging tools: XDebug and the Zend Debugger. Learn how to configure PDT for debugging PHP scripts and discover which perspectives you use when taking closer looks at your scripts.
You’ll need to have a machine with PHP, Eclipse, Apache and the PHP Development Tools already installed to follow along (as well as a trial version of the Zend Studio Web Debugger). They also include the methods for setting up XDebug as the debugger.