<?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>Thu, 28 Aug 2008 19:56:13 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPBuilder.com: Developing a Ajax-driven Shopping Cart with PHP and Prototype, Part 2]]></title>
      <guid>http://www.phpdeveloper.org/news/10105</guid>
      <link>http://www.phpdeveloper.org/news/10105</link>
      <description><![CDATA[<p>
PHPBuilder.com has continued their series looking at building an Ajax-driven shopping cart with <a href="http://www.phpbuilder.com/columns/jason_gilmore20080502_2.php3">part two</a> posted today (<a href="http://www.phpdeveloper.org/news/10060">part one here</a>). Last time they laid the PHP foundation for the example app, this time they add another layer - the Ajax functionality to manage the current contents of the cart.
</p>
<blockquote>
Finally, a link to the shopping cart is provided, although you could just as easily have displayed the cart contents on the same page. For the sake of brevity I'll just show you how to integrate the add feature, and will leave the subtraction mechanism to you as an exercise.
</blockquote>
<p>
The Ajax frontend calls a managecart.php backend file that calls addToCart and deleteFromCart based on which type of "task" is passed to it.
</p>]]></description>
      <pubDate>Mon, 05 May 2008 07:58:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Developing a Ajax-driven Shopping Cart with PHP and Prototype]]></title>
      <guid>http://www.phpdeveloper.org/news/10060</guid>
      <link>http://www.phpdeveloper.org/news/10060</link>
      <description><![CDATA[<p>
On PHPBuilder.com today there's <a href="http://www.phpbuilder.com/columns/jason_gilmore20080425.php3">a new tutorial</a> posted showing how to combine the Javascript power of Prototype along side PHP's adaptability to create a simple, ajax-driven shopping cart for your site.
</p>
<blockquote>
In the latest installment of this ongoing PHP series, I'll show you how to build a shopping cart using PHP, session handling, and the Prototype JavaScript library. The cart allows users to add and delete products from the cart, as well as change cart quantities. And of course, the interaction is seemingly instantaneous, allowing for the user to continue shopping without waiting for the page to reload.
</blockquote>
<p>
They start from the ground up - making the database tables, inserting some data - before writing up the simple PHP class with methods like deleteFromCart and getCart. This lays the foundation for the next article in the series where they add in a splash of ajax to make it a bit more user-friendly.
</p>]]></description>
      <pubDate>Tue, 29 Apr 2008 08:48:31 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPRiot.com: Monitoring File Uploads using Ajax and PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/9402</guid>
      <link>http://www.phpdeveloper.org/news/9402</link>
      <description><![CDATA[<p>
On the PHPRiot.com site today there's a <a href="http://www.phpriot.com/articles/php-ajax-file-uploads">new tutorial</a> posted covering an alternate method for uploading files - using Ajax to help monitor the progress of the file upload.
</p>
<blockquote>
In this article we will develop a solution that will allow users to upload a file from their computer using HTML forms. We will then determine the progress of the upload while it is in progress using Ajax, and display the status to the user.
</blockquote>
<p>
They chose the <a href="http://www.prototypejs.org/">prototype library</a> and the APC extension for PHP to make their code work. The basic idea is, through a feature of APC, the script can receive a progress measurement back from the server. This is handed off to the Javascript (Ajax) functionality that then updates the progress meter to reflect the change.
</p>]]></description>
      <pubDate>Fri, 11 Jan 2008 08:45:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Thompson's Blog: Return to Prototype Based Programming in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/8947</guid>
      <link>http://www.phpdeveloper.org/news/8947</link>
      <description><![CDATA[<p>
Taking full advantage of the upcoming features in the PHP 5.3.x series (and in PHP6 for that matter), <i>Joshua Thompson</i> has <a href="http://personal.schmalls.com/2007/10/29/return-to-prototype-based-programming-in-php/">come up with a way</a> to accomplish some prototype-based programming in a PHP application:
</p>
<blockquote>
With the implementation of the get_called_class() function in PHP, prototype based programming in PHP is possible. The new function is in both PHP5.3 and PHP6 <a href="http://snaps.php.net/">snapshots</a>. So, I went back to the drawing board and came up with a fully capable class. The $this keyword is usable, as well as being able to use the self, parent, and static (new with the <a href="http://www.ds-o.com/archives/65-Late-static-binding....sorta.html">late static binding patch</a>) keywords. 
</blockquote>
<p>
<a href="http://en.wikipedia.org/wiki/Prototype-based_programming">Prototype-based programming</a> is (basically) a method where classes aren't prebuilt. Instead they are created on the fly based on other objects and interfaces. <i>Joshua</i>'s <a href="http://personal.schmalls.com/2007/10/29/return-to-prototype-based-programming-in-php/">post</a> is a huge code dump of a prototype class and an example of it in use, dynamically creating two methods and making the three objects available.
</p>]]></description>
      <pubDate>Wed, 31 Oct 2007 16:38:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP-Learn-it.com: Starting with PHP and AJAX]]></title>
      <guid>http://www.phpdeveloper.org/news/8554</guid>
      <link>http://www.phpdeveloper.org/news/8554</link>
      <description><![CDATA[<p>
On the PHP-Learn-it.com website, there's a <a href="http://www.php-learn-it.com/tutorials/starting_with_php_and_ajax.html">new tutorial</a> today about taking those first steps into combining PHP and Ajax to make a simple working example.
</p>
<blockquote>
This simple tutorial demonstrates how to post a form using PHP and AJAX without having to refresh the page. A first step in becoming an AJAX developer.
</blockquote>
<p>
They chose to <a href="http://www.php-learn-it.com/tutorials/starting_with_php_and_ajax.html">go with</a> the prototype Javascript library to use its included Ajax functionality. They give the <a href="http://www.php-learn-it.com/tutorials/demos/starting_with_php_ajax/starting_with_php_ajax_demo.zip">complete code</a> first then go back and explain the different parts - how it makes the request, shows the response back from the PHp script and what the PHP script actually does.
</p>]]></description>
      <pubDate>Wed, 29 Aug 2007 15:39:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP-Learn-It.com: Ajax Edit in Place]]></title>
      <guid>http://www.phpdeveloper.org/news/8452</guid>
      <link>http://www.phpdeveloper.org/news/8452</link>
      <description><![CDATA[<p>
From the PHP-Learn-It.com website, there's a <a href="http://www.php-learn-it.com/tutorials/ajax_edit_in_place.html">quick tutorial</a> on how to create a bit of edit in place functionality with some simple Javascript and PHP.
</p>
<blockquote>
Suppose we have an article page on our site where people can edit articles. The article has an edit and save button which allows the user to edit the article and save the changes as necessary. <a href="http://www.php-learn-it.com/tutorials/demos/ajax_edit_in_place/articles.html">View the ajax_edit_in_place demo</a> to see what I'm talking about.
</blockquote>
<p>
They've gone with <a href="http://www.prototypejs.org/">Prototype</a> to handle the AJAX connection and provide both the Javascript and PHP code for editing, saving and canceling an edit on the page's content.
</p>]]></description>
      <pubDate>Tue, 14 Aug 2007 14:49:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Raphael Stolt's Blog: Handling JSON responses on the client side]]></title>
      <guid>http://www.phpdeveloper.org/news/7983</guid>
      <link>http://www.phpdeveloper.org/news/7983</link>
      <description><![CDATA[<p>
In a <a href="http://www.phpdeveloper.org/news/7957">previous post</a>, <i>Raphael Stolt</i> showed how to create a simple application that handled the transmission of a JSON-formatted message from the Zend Framework's Zend_Service component (translating XML to JSON in the process). In <a href="http://raphaelstolt.blogspot.com/2007/06/handling-json-responses-on-client-side.html">this new post</a> today he shows the other half of the equation - how to handle the JSON messages on the receiving end.
</p>
<blockquote>
In this post I'd like to show how to unpack the JSON response and render a visual representation by utilizing the <a href="http://www.prototypejs.org/api/template">Template</a> class of the Prototype JavaScript library.
</blockquote>
<p>
The <a href="http://raphaelstolt.blogspot.com/2007/06/handling-json-responses-on-client-side.html">code is all Javascript</a> but it's a good example of how to break down the request and output a simple list format of the contents to the page (record "shelf" and record information).
</p>]]></description>
      <pubDate>Wed, 06 Jun 2007 07:41:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Building a Data Validation System with the Prototype Pattern with PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/7908</guid>
      <link>http://www.phpdeveloper.org/news/7908</link>
      <description><![CDATA[<p>
DevShed has posted the last part of their latest series, a look at using the Prototype pattern in a PHP5 application, <a href="http://www.devshed.com/c/a/PHP/Building-a-Data-Validation-System-with-the-Prototype-Pattern-with-PHP-5/">Building a Data Validation System with the Prototype Pattern with PHP 5</a>.
</p>
<blockquote>
Taking into account that this pattern can be helpful in situations where a prototype object is required, along with other clones of it, in this final installment of the series I'm going to demonstrate how to use it to build a simple application for checking the validity of incoming data.
</blockquote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Building-a-Data-Validation-System-with-the-Prototype-Pattern-with-PHP-5/1/">create a simple validation system</a> with the pattern to check and see if the inputted data is either alpha only or alpha-numeric. On top of this, they create some additional classes to check the data for things like being a valid email address or if the value is made up of all numbers.
</p>]]></description>
      <pubDate>Wed, 23 May 2007 15:43:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Devshed: The Basics of Using the Prototype Pattern with PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/7850</guid>
      <link>http://www.phpdeveloper.org/news/7850</link>
      <description><![CDATA[<p>
DevShed gets back to its series looking at design patterns with <a href="http://www.devshed.com/c/a/PHP/The-Basics-of-Using-the-Prototype-Pattern-with-PHP-5/">this new tutorial</a> covering the Prototype pattern. This pattern is commonly used when its too "expensive" to create an object in the usual way in an application.
</p>
<blockquote>
The prototype class lets you use many instances of a specific class, without copying objects to different variables. [...] Expressed in simple terms, when you define a class in the context of a given PHP application, what you're actually doing is creating a prototype model that will be implemented by one or more instances of the originating class. Naturally there will be some variations, particularly if you're working with subclasses that override and overload methods defined by the respective parent.
</blockquote>
<p>
In this <a href="http://www.devshed.com/c/a/PHP/The-Basics-of-Using-the-Prototype-Pattern-with-PHP-5/">first part</a> of the series, they start by creating a class - DataPrototype - to act as a foundation for the rest of the tutorial. On top of the DataPrototype, they build two new classes:
<ul>
<li>an ArrayPrototype class that as methods for getting the size and data in an array as well as setting its contents
<li>a FilePrototype that has methods for reading file information and saving new data out
</ul>
</p>
<p>
Finally, they <a href="http://www.devshed.com/c/a/PHP/The-Basics-of-Using-the-Prototype-Pattern-with-PHP-5/3/">show it in action</a>, first the ArrayPrototype, then the FilePrototype both setting the data of their respective storage method then getting its size.
</p>]]></description>
      <pubDate>Wed, 16 May 2007 07:53:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer.com: Developing a Ajax-driven Shopping Cart with PHP and Prototype]]></title>
      <guid>http://www.phpdeveloper.org/news/7167</guid>
      <link>http://www.phpdeveloper.org/news/7167</link>
      <description><![CDATA[<p>
On Developer.com, <i>Jason Gilmore</i> has posted <a href="http://www.developer.com/lang/jscript/article.php/3656001">This new tutorial</a> that steps you through the creation of an ajax-enabled shopping cart that combines PHP and Prototype.
</p>
<blockquote>
In the latest installment of this ongoing PHP series, I'll show you how to build a shopping cart using PHP, session handling, and the Prototype JavaScript library (<a href="http://www.developer.com/open/article.php/3648396">introduced in an earlier installment</a>). The cart allows users to add and delete products from the cart, as well as change cart quantities. And of course, the interaction is seemingly instantaneous, allowing for the user to continue shopping without waiting for the page to reload.
</blockquote>
<p>
He <a href="http://www.developer.com/lang/jscript/article.php/3656001">creates the database table</a> first (bottom up approach), then moves to the PHP code to handle the request/responses for the shopping cart, and with a little bit of session magic to connect the cart to the user and the Prototype tossed in, the cart is complete.
</p>]]></description>
      <pubDate>Fri, 26 Jan 2007 07:46:00 -0600</pubDate>
    </item>
  </channel>
</rss>
