<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Wed, 15 Oct 2008 22:08:12 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jake Blauzier's Blog: Event-Based AJAX Framework for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/10399</guid>
      <link>http://www.phpdeveloper.org/news/10399</link>
      <description><![CDATA[<p>
<i>Jake Blauzier</i> has just posted the last part of his series focusing on the creation of an event-based Ajax framework that works with PHP. It allows for calls to static functions, can return Javascript representations of PHP objects and a "call queue" system to keep things from overlapping.
</p>
<p>Here's the list of the parts of the series:</p>
<ul>
<li><a href="http://www.jacoblauzier.com/blog/2008/05/event-based-ajax-framework-for-php/">Part 1</a> - introduction, sample usage
<li><a href="http://www.jacoblauzier.com/blog/2008/05/event-based-ajax-framework-for-php-part-2/">Part 2</a> - problems in making an event-based ajax callback model (and his solutions) 
<li><a href="http://www.jacoblauzier.com/blog/2008/06/event-based-ajax-framework-for-php-part-3/">Part 3</a> - the use of JSON in the framework
<li><a href="http://www.jacoblauzier.com/blog/2008/06/event-based-ajax-framework-for-php-part-4/">Part 4</a> - implementation of the Scriptifiable interface
<li><a href="http://www.jacoblauzier.com/blog/2008/06/event-based-ajax-framework-for-php-part-5/">Part 5</a> - implementing the Remotable interface
</ul>
<p>
You can download the latest version of his Ajax framework directly <A href="http://www.jacoblauzier.com/blog/wp-content/uploads/2008/05/ajaxframework1.zip">from his blog</a>. 
</p>]]></description>
      <pubDate>Thu, 12 Jun 2008 11:18:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[John Maver's Blog:  How to create a Bebo application using PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/10166</guid>
      <link>http://www.phpdeveloper.org/news/10166</link>
      <description><![CDATA[<p>
In <a href="http://www.thoughtlabs.com/blogs/2008/05/08/how-to-create-a-bebo-application-using-php-5/">this new post</a> on his blog, <i>John Maver</i> gives a step-by-step guide for creating a PHP5 application for the popular social networking site <a href="http://bebo.com">Bebo.com</a>.
</p>
<blockquote>
I have been answering a lot of email requests for how to get started with a Bebo application. Since applications can be written in any language that supports interaction with the Bebo REST API, developers have a lot of choices in how they build their application. The focus of this article will be on the "officially supported language" - PHP.
</blockquote>
<p>
He <a href="http://www.thoughtlabs.com/blogs/2008/05/08/how-to-create-a-bebo-application-using-php-5/">defines</a> the parts of the application first (the callback, canvas page, profile box, invitation and news stories). Much like the Facebook API, the Bebo system has you host the application on your own servers and use their developer libraries to interface with their systems. He makes a simple application that has a "story" published to it that shows to each visitor.
</p>
<p>
He also tosses in a method for knowing a bit more about the user - like if they've just added the application, if they're a normal user or if they've just removed it from their application list.
</p>]]></description>
      <pubDate>Mon, 12 May 2008 17:21:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Tutorials Blog: PHP array_walk(): Run an array through a function]]></title>
      <guid>http://www.phpdeveloper.org/news/10020</guid>
      <link>http://www.phpdeveloper.org/news/10020</link>
      <description><![CDATA[<p>
The Developer Tutorials blog has a <a href="http://www.developertutorials.com/blog/php/php-functions/php-array_walk-run-an-array-through-a-function-128/">quick example</a> of how to use the array_walk function to maneuver through the array of your choosing and applying a callback method to each of its elements.
</p>
<blockquote>
It's a common sight: taking an array and running (well, walking) its elements through a particular function. Luckily, PHP provides a simple yet powerful function to overcome this: array_walk().
</blockquote>
<p>
They include an example, giving a sample "some_function" the array_walk method uses when it's called, replacing a foreach (or other type of loop). Plus you can specify an object with the callback to run it against a method inside a class too.
</p>]]></description>
      <pubDate>Wed, 23 Apr 2008 08:47:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Alexander Netkachev's Blog: Practical PHP events]]></title>
      <guid>http://www.phpdeveloper.org/news/6559</guid>
      <link>http://www.phpdeveloper.org/news/6559</link>
      <description><![CDATA[<p>
In his <a href="http://www.alexatnet.com/Blog/Index/2006-10-24/practical-php-events">latest tutorial</a>, <i>Alexander Netkachev</i> shows how to, with some of the simple PHP functions, create an event system for your script, complete with callbacks.
</p>
<blockquote>
The way how events are raised and how listeners are attached on the events is a part of a core in many modern applications. It plays an important role in some enterprise design patterns (MVC, for example). 
</blockquote>
<p>
He starts with the basics of event handling - some of the terms and descriptions of basic functionality that any good event handler would have. He describes the most common setup of an event-interaction relationship. Then, it's on to the code, showing first three different ways to call functions (by name, by variable, and by callback).
</p>
<p>
He <a href="http://www.alexatnet.com/Blog/Index/2006-10-24/practical-php-events">finishes it off</a> with a functional example that responds to a a call to fireEvent (five times) and handles each by calling the function in the callback information (myFunction).
</p>]]></description>
      <pubDate>Tue, 24 Oct 2006 07:20:48 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Eichorn's Blog: Webthumb API additions]]></title>
      <guid>http://www.phpdeveloper.org/news/6404</guid>
      <link>http://www.phpdeveloper.org/news/6404</link>
      <description><![CDATA[<p>
In light of the popularity of his <a href="http://bluga.net/webthumb/">WebThumb</a> site thumbnailing service, <i>Joshua Eichorn</i> is <a href="http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/">implementing a new feature</a> to help reduce the number of requests to the server. The most popular request is made to see if a thumbnail is ready, and the new feature - a GET callback to the server making the request - will help to reduce them.
</p>
<blockquote>
<p>
If you wondered an API that requires polling isn't a very good thing for scalability. On my current setup I can pretty easily handle about 20 status requests per second on top of my normal traffic, the problem is its not hard for a bad polling implmentation being run by one user to make that many requests.
</p>
<p>
To solve this problem im adding an addition to the Webthumb API that will allow you to skip polling all together. The basic idea is that your make an API request and when your thumbnail is complete i'll make a GET request back too your server telling you that the request is complete.
</p>
</blockquote>
<p>
It's a simple matter of including a new "notify" tag in the XML message to the server with a URL to make the callback to. He even <a href="http://blog.joshuaeichorn.com/archives/2006/10/02/webthumb-api-additions/">includes some sample PHP code</a> to get you started with the new feature. The script handles the automatic download of the thumbnails when called from the WebThumb service.
</p>]]></description>
      <pubDate>Mon, 02 Oct 2006 16:13:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Lukas Smith's Blog: Next MDB2 releases are around the corner]]></title>
      <guid>http://www.phpdeveloper.org/news/5812</guid>
      <link>http://www.phpdeveloper.org/news/5812</link>
      <description><![CDATA[<p>
<i>Lukas Smith</i> notes in <a href="http://pooteeweet.org/blog/452">this new blog post</a> that the next releases for his MDB2 package should be just around to corner. 
</p>
<p>
He's been working on several issues:
<ul>
<li>fixing issues with MySQL drivers
<li>updating transaction support to add SAVEPOINTS
<li>integrating a debug callback mechanism
</ul>
</p>
<blockquote>
The only two bug reports I am currently hoping to get resolved before the next release are: <a href="http://pear.php.net/bugs/bug.php?id=8051">a MySQL issue getting the last ID</a> and <a href="http://pear.php.net/bugs/bug.php?id=8124">a problem with an internal datatype</a>.
</blockquote>
<p>
Keep an eye out for his <a href="http://pear.php.net/package/MDB2">next release</a>.
</p>]]></description>
      <pubDate>Tue, 18 Jul 2006 05:50:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Felix Geisend&ouml;rfer's Blog: Welcome to the Dark Side of Plugins in CakePHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5682</guid>
      <link>http://www.phpdeveloper.org/news/5682</link>
      <description><![CDATA[<p>
CakePHP users out there looking to squeeze just a bit more out of their plugins might want to check out <a href="http://www.thinkingphp.org/2006/06/24/welcome-to-the-dark-side-of-plugins-in-cakephp/">this new post</a> over on <i>Felix Geisend&ouml;rfer</i>'s blog today. He shows how he's worked around two issues that have bothered him with the current framework setup - inter-plugin communication and filter callbacks.
</p>
<p>
He starts off by looking at the filter callbacks, looking to make "drag and drop-able" plugins for <a href="http://cakeforge.org/projects/spliceit">his setup</a>. He notes that, right now, you'd have to call a plugin to perfom an action, making for a good bit of load depending on the application structure. It also means that you have to change the Controller to add a new plugin ("...which doesn't seem like a very RAD approach to me").
</p>
<blockquote>
So in order to streamline such plugin callbacks, I created a function inside SpliceIt!, that allows plugins to hook into any AppController event, such as beforeFilter, afterFilter, beforeRender, etc. in order to make their own changes to the controller. So a Themes plugin can easily change the Controller::view and a Statistics plugin can make calls to a Model.
</blockquote>
<p>
He <a href="http://www.thinkingphp.org/2006/06/24/welcome-to-the-dark-side-of-plugins-in-cakephp/">gives the code</a> for the function as well as an example of how to use it in your app.
</p>
<p>
Moving on, he looks at his next issue to overcome - inter-plugin communication:
</p>
<blockquote>
Generally spoken Controller::requestAction() isn't a bad way to exchange data between controllers. It's a clean interface and you don't have to plan in advance what data should be exchangeable and what data should not. However, there are a couple problems with it.
</blockquote>
<p>
<a href="http://www.thinkingphp.org/2006/06/24/welcome-to-the-dark-side-of-plugins-in-cakephp/">His solution</a> involves the creation of an entirely seperate ApiController pattern. Of course, he provides examples, specifically related to his <a href="https://cakeforge.org/plugins/scmsvn/viewcvs.php/trunk/spliceit/?root=spliceit">SpliceIt! application</a>.
</p>]]></description>
      <pubDate>Mon, 26 Jun 2006 06:27:28 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPit.net: Having fun with PHP's output buffer]]></title>
      <guid>http://www.phpdeveloper.org/news/5186</guid>
      <link>http://www.phpdeveloper.org/news/5186</link>
      <description><![CDATA[<p>
One of the more powerful and handy features that PHP offers is output buffering. It allows you more control over when the client's browser gets the information instead of just spewing information at random. It is a little tricky to get the hang of, so PHPit.net has put together <a href="http://www.phpit.net/article/output-buffer-fun-php/">this new tutorial</a> on how to get started.
</p>
<quote>
<i>
<p>
I'm sure most of us have come across the dreaded "Cannot modify header information - headers already sent", and this is usually caused when your script tries to send a header or set a cookie, when it's already sent output. The easiest fix is to make sure no output has been sent, but it's also possible to enable something called output buffering which also solves the problem.
</p>
<p>
In this article I'll first show you how output buffering works, and take you through most of its basic functions. After that we'll have a look at what's possible with output buffering, and show you some neat tricks.
</p>
</i>
</quote>
<p>
The <a href="http://www.phpit.net/article/output-buffer-fun-php/">groundwork</a> is laid first, giving a simple "Hello world" example to show how the code flows. They show how the buffering system works and how to use a callback function to modify the contents of the buffer before outputting (including a full replace function to text within the buffer from an array). They follow that with a look at creating your own HTML tags and using the gzip compression functionality to speed up your pages. 
</p>]]></description>
      <pubDate>Mon, 17 Apr 2006 07:13:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Pierre-Alain Joye's Blog: PEAR Template IT bugs fixes release]]></title>
      <guid>http://www.phpdeveloper.org/news/5162</guid>
      <link>http://www.phpdeveloper.org/news/5162</link>
      <description><![CDATA[<p>
<i>Pierre-Alain Joye</i> <a href="http://blog.thepimp.net/index.php/2006/04/12/56-pear-template-it-bugs-fixes-release">notes</a> today that there were some issues with the PEAR <a href="http://pear.php.net/package/HTML_Template_IT/">HTML_Template_IT</a> package he's a lead programmer for.
</p>
<quote>
<i>
<p>
An annoying bug in the ITX callback system introduced a couple of months ago has been fixed. I would force me to write 100 more tests if I forgot again to run them before a release. But the bug seems to not have affected too much people (no related bug report) :-)
</p>
<p>
The other two are a PHP notice and a warning. For some reason fread decided to raise a warning when the content is zero, it will be fixed in PHP soon, but I still have to fix it in my code.
</p>
</i>
</quote>
<p>
You can either check out the <a href="http://pear.php.net/package/HTML_Template_IT/">HTML_template_IT homepage</a> for more or just <a href="http://pear.php.net/get/HTML_Template_IT">grab it directly</a>.
</p>]]></description>
      <pubDate>Wed, 12 Apr 2006 07:37:38 -0500</pubDate>
    </item>
  </channel>
</rss>
