<?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, 24 May 2012 20:39:41 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: An Introduction to Redis in PHP using Predis]]></title>
      <guid>http://www.phpdeveloper.org/news/17901</guid>
      <link>http://www.phpdeveloper.org/news/17901</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial by <i>Daniel Gafitescu</i> showing you how to <a href="http://phpmaster.com/an-introduction-to-redis-in-php-using-predis/">work with Redis</a> (a key-value store) via PHP with the help of the <a href="https://github.com/nrk/predis">Predis</a> library.
</p>
<blockquote>
There is a lot of argument whether Redis or Memcache is better, though <a href="http://antirez.com/post/update-on-memcached-redis-benchmark.html">as the benchmarks show</a> they perform pretty much on par with each other for basic operations. Redis has more features than Memcache has, such as in-memory and disk persistence, atomic commands and transactions, and not logging every change to disk but rather server-side data structures instead. In this article we'll take a look at some of the basic but powerful commands that Redis has to offer using the Predis library.
</blockquote>
<p>
He helps you get a local redis server up and running and includes a <a href="https://github.com/nrk/predis">link to the repository</a> for the latest version of the Predis library. Some sample code is provided showing how to connect to the server, push data into a key/value combination, get the value back out, increment it and check to see if it exists. He also talks about some of the available data types Redis provides and a few other more complex operations you can perform on things other than strings.
</p>]]></description>
      <pubDate>Thu, 03 May 2012 09:35:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Returning JSON using the Accept header in ZF2]]></title>
      <guid>http://www.phpdeveloper.org/news/17756</guid>
      <link>http://www.phpdeveloper.org/news/17756</link>
      <description><![CDATA[<p>
In a <a href="http://phpdeveloper.org/news/17748">previous post</a> <i>Rob Allen</i> showed how to return JSON data from a controller in a Zend Framework 2 application. In <a href="http://akrabat.com/zend-framework-2/returning-json-using-the-accept-header-in-zf2/">this new post</a> he shows how to use the "Accepts" header from the client to do the same thing.
</p>
<blockquote>
Following yesterday's article on <a href="http://akrabat.com/zend-framework-2/returning-json-from-a-zf2-controller-action/">returning JSON from a ZF2 controller action</a>, <a href="http://twitter.com/lsmith">Lukas</a> suggested that I should also demonstrate how to use the Accept header to get JSON. So this is how you do it!
</blockquote>
<p>
You'll need to <a href="http://akrabat.com/zend-framework-2/returning-json-from-a-zf2-controller-action/">create the JsonStrategy</a> first, then you can return the ViewModel from the controller. If all goes well, you should see the sample HTML page rendered in a browser and JSON output when requested with the right "Accept" header (he uses curl in his example).
</p>]]></description>
      <pubDate>Fri, 30 Mar 2012 08:01:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: Returning JSON from a ZF2 controller action]]></title>
      <guid>http://www.phpdeveloper.org/news/17748</guid>
      <link>http://www.phpdeveloper.org/news/17748</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Rob Allen</i> shows how you can return JSON data <a href="http://akrabat.com/zend-framework-2/returning-json-from-a-zf2-controller-action/">directly back from a controller</a> in a Zend Framework 2 application.
</p>
<blockquote>
The new view layer in Zend Framework 2 can be set up to return JSON rather than rendered HTML relatively easily. [...] Firstly we need to set up the view's JsonStrategy to check to a situation when returning JSON is required and then to render out JSON for us.
</blockquote>
<p>
This "JsonStrategy" does some of the hard work for you - detecting when the client is requesting a JSON response and looking at the data coming into the view to see if it's JSON. He shows how to implement it in a sample module using the "onBootstrap" module and how to force a return of the JsonModel even when JSON isn't requested (useful for a consistent interface).
</p>]]></description>
      <pubDate>Thu, 29 Mar 2012 08:55:39 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Monitor.us Blog: Website Performance: PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17721</guid>
      <link>http://www.phpdeveloper.org/news/17721</link>
      <description><![CDATA[<p>
On the Monitor.us blog there's a <a href="http://blog.monitor.us/2012/03/website-performance-php/">recent guide to performance tuning your PHP</a> with sections on lots of topics, some related directly to the code and others more towards the environment it lives in.
</p>
<blockquote>
The World-Wide Web offers more PHP performance tips than can be comfortably discussed in one article, so the following is merely a list that can be used for reference purposes. The tips are divided into categories to group similar things together and make it easier to find what we need. The author's search for tips was extensive, but completeness still cannot be guaranteed.These tips fall into category #3.1 (the server executes a script) in the taxonomy of tips that we have been working with.Because of the sheer volume, these tips have not been tested. The reader is expected to test them in his own production environment before relying on them. This is not unreasonable, though, because the value of most tips depends on the unique environment within which PHP operates.
</blockquote>
<p>Sections in the guide include:</p>
<ul>
<li><a href="http://blog.monitor.us/2012/03/website-performance-php/#Cache">Caching</a>
<li><a href="http://blog.monitor.us/2012/03/website-performance-php/#Sessions">Session handling</a>
<li><a href="http://blog.monitor.us/2012/03/website-performance-php/#Compression">Compression</a>
<li><a href="http://blog.monitor.us/2012/03/website-performance-php/#MemLeaks">Memory Leaks</a>
<li><a href="http://blog.monitor.us/2012/03/website-performance-php/#Optimization">Code optimization</a>
<li><a href="http://blog.monitor.us/2012/03/website-performance-php/#Serv">Using services</a>
</ul>
<p>
Also included in the post are a <a href="http://blog.monitor.us/2012/03/website-performance-php/">list of links</a> that were references for the tips in the list..
</p>]]></description>
      <pubDate>Fri, 23 Mar 2012 09:54:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Konr Ness' Blog: Zend_Config Benchmark - JSON, Array, INI, XML, YAML]]></title>
      <guid>http://www.phpdeveloper.org/news/17647</guid>
      <link>http://www.phpdeveloper.org/news/17647</link>
      <description><![CDATA[<p>
In <a href="http://konrness.com/php5/zend_config-benchmark-json-array-ini-xml-yaml/">this recent post</a> to his blog, <i>Konr Ness</i> has benchmarked the components that the Zend Framework uses to read in different types of configuration files - JSON, native PHP arrays, INI, XML and YAML files.
</p>
<blockquote>
If you application relies on parsing one or several config files each time it is bootstrapped it is important that you select a file format that is fast to parse. But you also want to select a config file format that is easy for a human to read and edit. In a recent application I am building I also had the need to write modifications to config files, so I also benchmarked the Zend_Config_Writer components.
</blockquote>
<p>
He includes both the sample configuration INI file and the benchmarking script he used to measure the results (all configurations were read from external files, even the native PHP option). His results were pretty predictable (with the exception of YAML reading) with the standard INI file coming in second to the native PHP arrays, but having the advantage of being more readable.
</p>]]></description>
      <pubDate>Thu, 08 Mar 2012 11:51:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Taking Advantage of PHP's Built-in Server]]></title>
      <guid>http://www.phpdeveloper.org/news/17644</guid>
      <link>http://www.phpdeveloper.org/news/17644</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial for those on the bleeding edge of PHP using the latest released version (5.4) and a feature that comes with it - <a href="http://phpmaster.com/taking-advantage-of-phps-built-in-server/">using the built-in webserver</a> that comes bundled for testing purposes.
</p>
<blockquote>
One of the cooler features of the new PHP 5.4 release is a built-in web server designed specifically for development and testing. Now you can write and test your code without having to have a full-fledged LAMP configuration - just launch a the built-in server from the command line, test your code, and then shut it down when you're finished. [...] In this article I'll explain some basic uses of the new built-in server and show you how to build a portable personal development server useful for quickly testing your applications
</blockquote>
<p>
He starts with a look at how to start up the web server (a simple command line switch and host/port definition) and the resulting default <a href="http://php.net/phpinfo">phpinfo</a> page it displays. Other options include the ability to specify a document root for your server and create a sort of "front controller" for it to route requests. They show how to create a simple application based on this that can dynamically load in the index file, a router and pass the request off to the correct file. Their example includes some "niceties" too like logging, "hosts allowed" and checks for requesting directories.
</p>
<p>
You can find their full code for this example <a href="http://phpmaster.com/taking-advantage-of-phps-built-in-server">over on github</a>.
</p>]]></description>
      <pubDate>Thu, 08 Mar 2012 08:17:45 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Slawek Lukasiewicz's Blog: New Features in PHP 5.4 - JSON Extension & header_register_callback]]></title>
      <guid>http://www.phpdeveloper.org/news/17624</guid>
      <link>http://www.phpdeveloper.org/news/17624</link>
      <description><![CDATA[<p>
In the first two posts of his "features new to PHP 5.4" series <i>Slawek Lukasiewicz</i> has posted about two things that weren't mentioned very often in most of the 5.4 hit lists - improvements to the JSON extension and the header_register_callback method.
</p>
<p>About the <a href="http://www.leftjoin.net/2012/03/php-5-4-json-extension-improvements/">JSON extension improvements</a>:
</p>
<blockquote>
By default, when we pass object to json_encode function, it will return JSON representation of object public properties. [...] PHP 5.4 introduces JsonSerializable interface with JsonSerialize abstract method. After implementing this method we can independently set values used in JSON representation.
</blockquote>
<p>Related to the <a href="http://www.leftjoin.net/2012/03/php-5-4-header_register_callback/">header_register_callback addition</a>
</p>
<blockquote>
After looking at new functions introduced in PHP 5.4 we can found one called <a href="http://www.php.net/manual/en/function.header-register-callback.php">header_register_callback</a>. Using it, we can register callback which will be called before sending output.
</blockquote>
<p>
The stable version of PHP 5.4 has officially been released, so <a href="http://php.net/downloads">get out there and grab it</a> and start using these new features now!
</p>]]></description>
      <pubDate>Mon, 05 Mar 2012 10:16:20 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Project: phpVirtualBox - VirtualBox Management Tool]]></title>
      <guid>http://www.phpdeveloper.org/news/17616</guid>
      <link>http://www.phpdeveloper.org/news/17616</link>
      <description><![CDATA[<p>
For those fans of virtualization (and running VMs for development) you're not stranger to <a href="http://www.virtualbox.org">VirtualBox</a>. Over on the Google Code site, there's a project that wants to make it easier to work with your VirtualBox instances via a PHP-driven interface.
</p>
<blockquote>
An open source, AJAX implementation of the <a href="http://code.google.com/p/phpvirtualbox/wiki/VirtualBox">VirtualBox</a> user interface written in PHP. As a modern web interface, it allows you to access and control remote <a href="http://code.google.com/p/phpvirtualbox/wiki/VirtualBox">VirtualBox</a> instances. Much of its verbage and some of its code is based on the (inactive) <a href="http://code.google.com/p/vboxweb/">vboxweb</a> project. phpVirtualBox was designed to allow users to administer <a href="http://code.google.com/p/phpvirtualbox/wiki/VirtualBox">VirtualBox</a> in a headless environment - mirroring the <a href="http://code.google.com/p/phpvirtualbox/wiki/VirtualBox">VirtualBox</a> GUI through its web interface.
</blockquote>
<p>
The tool isn't designed to be a management tool for a "hosting" type of environment, but rather to help you admin all of your VMs at once (no "ownership"). It uses the SOAP service (vboxwebsrv) that comes with VirtualBox servers to create a <a href="http://phpvirtualbox.googlecode.com/svn/wiki/images/phpvbsm.png">clean interface</a>.
</p>]]></description>
      <pubDate>Fri, 02 Mar 2012 08:25:16 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect: What Will Power the Future of the Internet: REST or SOAP? ]]></title>
      <guid>http://www.phpdeveloper.org/news/17599</guid>
      <link>http://www.phpdeveloper.org/news/17599</link>
      <description><![CDATA[<p>
On the php|architect site today there's <a href="http://www.phparch.com/2012/02/what-will-power-the-future-of-the-internet-rest-or-soap/">a new article</a> from <i>Luke Stokes</i> asking a question about the future of the web (and web serivces) - is the future in REST or SOAP?
</p>
<blockquote>
I was recently asked why we chose REST over SOAP for our re-write of the <a href="http://www.foxycart.com/">FoxyCart.com</a> API, and the short answer that immediately came to mind was, "Because I don't hate myself". To expand on that answer, let me give you a little bit of the back story.
</blockquote>
<p>
He talks about their goals for the product and its API, how they wanted to create something useful, built by developers for developers. They leaned towards REST mostly because of the problems and overhead introduced with SOAP (and the complex nature of its requests). He also gives a few reasons why he's "excited about REST": working with known data types, standard interface methods and the fact that it's still such a hot topic of discussion.
</p>
<blockquote>
These questions [about HATEOS, hypermedia, vendor-specific content types] might seem overwhelming, but for us they are exciting! We believe the future of consistent, powerful API development is being defined right now, and we get to be a part of it.
</blockquote>]]></description>
      <pubDate>Tue, 28 Feb 2012 12:16:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Dzone.com: A Free Amazon EC2 Cloud Server Based LAMP]]></title>
      <guid>http://www.phpdeveloper.org/news/17571</guid>
      <link>http://www.phpdeveloper.org/news/17571</link>
      <description><![CDATA[<p>
In <a href="http://java.dzone.com/articles/free-ec2-cloud-server-based-0">this new article</a> on DZone.com, <i>Artur Mkrtchyan</i> shows you how to get an Amazon EC2 instance up and running and get a LAMP server set up and ready to go.
</p>
<blockquote>
In this article I'm going to show you how to create a free Amazon EC2 cloud based LAMP Server and Point your domain to Amazon EC2 Instance. There are 4 simple steps to do.
</blockquote>
<p>
The setup process is pretty easy - getting an Amazon free account, creating a server from an existing image, installing the LAMP stack and pointing your domain at the EC2 instance. He gives a step-by-step guide of the process, including the commands you'll need to execute to get all of the LAMP packages installed.
</p>]]></description>
      <pubDate>Wed, 22 Feb 2012 10:42:17 -0600</pubDate>
    </item>
  </channel>
</rss>

