<?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, 19 Jun 2013 23:21:44 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[David M&uuml;ller: Cross Domain AJAX Guide]]></title>
      <guid>http://www.phpdeveloper.org/news/18868</guid>
      <link>http://www.phpdeveloper.org/news/18868</link>
      <description><![CDATA[<p>
In his latest post <i>David M&uuml;ller</i> covers some of the things to consider when <a href="http://www.d-mueller.de/blog/cross-domain-ajax-guide/">working with cross-domain ajax requests</a> including CORS and iframes.
</p>
<blockquote>
As it is widely known, AJAX Requests are only possible if port, protocol and domain of sender and receiver are equal. [...] Having this cleared out, we will cover ways around this restriction.
</blockquote>
<p>
He covers three main approaches to allowing these cross-domain requests (and some of the security implications that can come with them):
</p>
<ul>
<li>CORS (Cross Origin Resource Sharing)
<li>JSONP (Javascript with a local domain callback)
<li>Iframes
</ul>
<p>
He also briefly mentions things like <a href="https://developer.mozilla.org/en-US/docs/DOM/window.postMessage">window.postMessage</a> (HTML5) and the use of a backend script to proxy a request into your application's local code. 
</p>]]></description>
      <pubDate>Mon, 10 Dec 2012 12:17:39 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Implementing User Defined Interfaces in PHP 5]]></title>
      <guid>http://www.phpdeveloper.org/news/18364</guid>
      <link>http://www.phpdeveloper.org/news/18364</link>
      <description><![CDATA[<p>
On PHPBuilder.com today there's a new tutorial that <a href="http://www.phpbuilder.com/articles/php-functions/other-functions/Implementing_User_Defined_Interfaces_in_PHP_5.html">talks about creating interfaces</a> in PHP and how to use them to effectively structure your application.
</p>
<blockquote>
Starting with PHP 5 the object model was rewritten to add features and bring PHP in line with languages such as Java and Visual Basic .NET. In this article I'll discuss interfaces, which is among the most important features in PHP 5. Other important features include <a href="http://www.php.net/manual/en/language.oop5.visibility.php>visibility</a>, <a href="http://www.php.net/manual/en/language.oop5.abstract.php">abstract</a> and <a href="http://www.php.net/manual/en/language.oop5.final.php">final</a> classes, methods and additional <a href="http://www.php.net/manual/en/language.oop5.magic.php">magic methods</a>. You will learn how to define your own interfaces and how to work with them using different object model mechanisms.
</blockquote>
<p>
The introduce you to some of the basic concepts behind using interfaces and how to create a basic one - a simple definition of a string class with one method, "getString". They then show how to extend a different example (a RandomNumber interface) and add on an additional method. He also shows how to extend multiple interfaces and integrate functionality from multiple sources, overloading and overrides.
</p>]]></description>
      <pubDate>Thu, 16 Aug 2012 08:35:53 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: PHP Ajax Cookbook (Book Review)]]></title>
      <guid>http://www.phpdeveloper.org/news/17829</guid>
      <link>http://www.phpdeveloper.org/news/17829</link>
      <description><![CDATA[<p>
On Dzone.com there's a book review from <i>Ivan Ilijasic</i> covering a recently released title from Packt Publishing, the "PHP Ajax Cookbook" (by Milan Sedliak, Rajesh Jeba R. Anbiah and Roshan Bhattarai). <a href="http://php.dzone.com/reviews/php-ajax-cookbook">His review</a> gives a "one minute bottom line" about the book and its contents.
</p>
<blockquote>
I've been in PHP development for more than 10 years and this book is really useful material. I could recommend it to beginners and experienced developers. From my point of view, there are three types of developer books - complete byte-to-byte fat books, introduction books and cookbooks. I want my cookbook to have useful and simple to use recipes. This book fulfilled my expectations.
</blockquote>
<p>
He mentions some of the topics that the book covers including javascript libraries and frameworks (mostly jQuery) and recipes for things like form validation, dynamic content, pagination and drag and drop functionality. He also points out some coverage of testing and debugging content as well as web service "mashups" and mobile app development.
</p>]]></description>
      <pubDate>Tue, 17 Apr 2012 13:03:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: Build Ajax Data Grids with CodeIgniter and jQuery]]></title>
      <guid>http://www.phpdeveloper.org/news/16901</guid>
      <link>http://www.phpdeveloper.org/news/16901</link>
      <description><![CDATA[<p>
In a new tutorial from NetTuts.com today they show you how to combine a <a href="http://codeigniter.com">CodeIgniter</a>-based backend and a <a href="http://jquery.com">jQuery</a> frontend to make a <a href="http://net.tutsplus.com/tutorials/javascript-ajax/build-ajax-data-grids-with-codeigniter-and-jquery-2/">simple Ajax data grid</a> of data pulled from a database.
</p>
<blockquote>
In this lesson, we will create a CodeIgniter library that allows us to generate data grids automatically for managing any database table. I'll explain each step required to create this class; so you'll likely learn some new OOP techniques/concepts in the process! As a bonus, we'll proceed to write some jQuery code that will enable a user to update the data grid's content without having to wait for a page refresh.
</blockquote>
<p>
The tutorial's broken up into a few different steps, each complete with descriptions and plenty of code ready for cut-and-paste:
</p>
<ul>
<li>Build a Data Grid Generator Class (a helper in PHP)
<li>Testing the Datagrid Helper Class with a CodeIgniter Controller
<li>Implementing Ajax (jQuery to the Rescue!)
<li>Check All or Nothing!
</ul>
<p>
You can also <a href="http://nettuts.s3.amazonaws.com/1053_ci_datagrid/CodeIgniter-datagrid-tutorial-source.rar">download the source</a> for all of the scripts if you'd like to dive right into the code.
</p>]]></description>
      <pubDate>Fri, 23 Sep 2011 12:23:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NetTuts.com: How to Upload Files with CodeIgniter and AJAX]]></title>
      <guid>http://www.phpdeveloper.org/news/16847</guid>
      <link>http://www.phpdeveloper.org/news/16847</link>
      <description><![CDATA[<p>
New from NetTuts.com today there's a tutorial for those using the <a href="http://codeigniter.com">CodeIgniter</a> framework for their application. It shows how to <a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-upload-files-with-codeigniter-and-ajax/">upload files with Ajax</a> and a simple form (with <a href="http://jquery.com">jQuery</a> and <a href="http://www.phpletter.com/Our-Projects/AjaxFileUpload/">AjaxFileUpload</a>).
</p>
<blockquote>
Uploading files asnychronously can be a pain at the best of times, but when coupled with CodeIgniter, it can be a particularly frustrating experience. I finally found a way that not only works consistently, but keeps to the MVC pattern.
</blockquote>
<p>
They help you create a database table to store the file information in (filename and title), make the controller to handle the request and build the view (with the form). Also included is the javascript you'll need to get the AjaxFileUpload script working for your file upload field. They extend the controller to handle the file upload and make a model to handle the upload and fetching of file information. The tutorial is finished off with a simple "delete" action to remove any file that's been uploaded.
</p>]]></description>
      <pubDate>Mon, 12 Sep 2011 12:03:27 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tutorialzine.com: AJAX-enabled Sticky Notes With PHP & jQuery]]></title>
      <guid>http://www.phpdeveloper.org/news/16796</guid>
      <link>http://www.phpdeveloper.org/news/16796</link>
      <description><![CDATA[<p>
On the Tutorialzine.com site there's an interesting (though a bit older) tutorial showing you how to combine jQuery, PHP and some CSS+HTML to make a <a href="http://tutorialzine.com/2010/01/sticky-notes-ajax-php-jquery/">simple sticky note application</a> complete with multiple note support and drag-and-drop abilities.
</p>
<blockquote>
Today we are making an AJAX-enabled Sticky Note management system. It will give visitors the ability to create notes with a live preview, and move them around on the screen. Every movement is going to be sent to the back-end via AJAX and saved in the database.
</blockquote>
<p>
They use the <a href="http://fancybox.net/">fancybox plugin</a> for jQuery to make creating the notes a lot simpler. Included in the tutorial is all of the HTML, CSS, javascript and PHP you'll need to create the application (as well as plenty of description along the way). You can see a demo of it in action <a href="http://demo.tutorialzine.com/2010/01/sticky-notes-ajax-php-jquery/demo.php">here</a> or just <a href="http://demo.tutorialzine.com/2010/01/sticky-notes-ajax-php-jquery/demo.zip">download the source</a> and dive right in. 
</p>]]></description>
      <pubDate>Wed, 31 Aug 2011 10:16:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Joris de Wit's Blog: Extending different layouts for Ajax requests in Twig, Symfony2]]></title>
      <guid>http://www.phpdeveloper.org/news/16784</guid>
      <link>http://www.phpdeveloper.org/news/16784</link>
      <description><![CDATA[<p>
<i>Joris de Wit</i> has a (very) <a href="http://jorisdewit.ca/2011/08/27/extending-different-layouts-for-ajax-requests-in-twig-symfony2/">quick post</a> about a handy tip he found about switching layouts easily with <a href="http://twig-project.org">Twig</a> in his Symfony2-based application - a handy ternary sort of switch that can detect when something's an Ajax request.
</p>
<blockquote>
I just learned about the 'app' global variable in twig. It's very handy for loading a special layout for ajax requests.
</blockquote>
<p>
The "app" variable allows you get get back at some of the settings of your application and check on special things like the isXMLHttpRequest in his example. For more information about Twig and how you can add it to your application, check out <a href="http://www.twig-project.org/documentation">Twig-Project.org</a>. Using it's as simple as adding a phar.
</p>]]></description>
      <pubDate>Mon, 29 Aug 2011 11:39:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[HowToForge.com: Installing Cherokee With PHP5 And MySQL Support On Ubuntu 11.04]]></title>
      <guid>http://www.phpdeveloper.org/news/16733</guid>
      <link>http://www.phpdeveloper.org/news/16733</link>
      <description><![CDATA[<p>
On the HowToForge.com site there's a new tutorial stepping you through the process of getting <a href="http://www.howtoforge.com/installing-cherokee-with-php5-and-mysql-support-on-ubuntu-11.04">Cherokee+PHP+MySQL working</a> on an Ubuntu linux installation.
</p>
<blockquote>
Cherokee is a very fast, flexible and easy to configure Web Server. It supports the widespread technologies nowadays: FastCGI, SCGI, PHP, CGI, TLS and SSL encrypted connections, virtual hosts, authentication, on the fly encoding, load balancing, Apache compatible log files, and much more. This tutorial shows how you can install Cherokee on an Ubuntu 11.04 server with PHP5 support (through FastCGI) and MySQL support.
</blockquote>
<p>
The tutorial makes use of the package manager (apt-get) to install the needed software, so don't look for complete compiling information from this process. They include a bit of the configuration of the Cherokee installation and how you enable PHP support via its interface. Screenshots of the Cherokee interface are included to help make it easier to follow along.
</p>]]></description>
      <pubDate>Wed, 17 Aug 2011 13:46:09 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[David Stockton's Blog: Changing ErrorController to work with AJAX]]></title>
      <guid>http://www.phpdeveloper.org/news/16709</guid>
      <link>http://www.phpdeveloper.org/news/16709</link>
      <description><![CDATA[<p>
<i>David Stockton</i> has a new tutorial posted to his blog - a technique he's found useful in his Zend Framework application to make the <a href="http://zendtutorials.com/tutorial/changing-errorcontroller-to-work-with-ajax/">ErrorController work with Ajax calls</a> to reduce the message you get back to just a JSON response.
</p>
<blockquote>
If you've ever built a Zend Framework MVC app which makes AJAX calls, you may have noticed that if an error occurs, you'll get a chunk of JSON followed by the HTML for the error page. If you've built a layout, you'll get all of that back to. This is fine if your users hit the page in the browser but it can cause problems with your JavaScript being able to correctly decode your JSON.
</blockquote>
<p>
The fix is pretty simple, though, and only requires that you add the error handling action to the Ajax context to force it to drop the layout and any other HTML that might come along with the view. He includes a bit more code to have the error handler include the exceptions and pass them out to be included in the JSON response.
</p>]]></description>
      <pubDate>Fri, 12 Aug 2011 08:58:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Populating datagrid techniques with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16605</guid>
      <link>http://www.phpdeveloper.org/news/16605</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Gonzalo Ayuso</i> looks at the code required to <a href="http://gonzalo123.wordpress.com/2011/07/18/populating-datagrid-techniques-with-php/">populate a jQuery data grid</a> with the records as pulled from a (MySQL) database.
</p>
<blockquote>
Today I want to speak about populating datagrid techniques with PHP. At least in my daily work datagrids and tabular data are very common, because of that I want to show two different techniques when populating datagrids with data from our database. Maybe it's obvious, but I want to show the differences.
</blockquote>
<p>
He uses "old school spaghetti code" rather than a framework to keep things simple and pulls the data from the database with a PDO connection. This information is then manually pushed into an HTML table and the data grid functionality is applied to it. The other method involves a little bit of JSON magic that the data grid library pulls in and populates for you, still appending rows to a table. 
</p>
<p>
He notes that the second method seems faster to the user since the page and table are rendered first, but it also comes at the cost of more than one HTTP request.
</p>]]></description>
      <pubDate>Tue, 19 Jul 2011 09:25:46 -0500</pubDate>
    </item>
  </channel>
</rss>
