<?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>Sun, 12 Feb 2012 17:55:01 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lorna Mitchell's Blog: Building A RESTful PHP Server: Understanding the Request]]></title>
      <guid>http://www.phpdeveloper.org/news/17418</guid>
      <link>http://www.phpdeveloper.org/news/17418</link>
      <description><![CDATA[<p>
In <a href="http://www.lornajane.net/posts/2012/building-a-restful-php-server-understanding-the-request">this new post</a> to her blog <i>Lorna Mitchell</i> starts off a new series (based on popular demand) looking at building an RESTful server in PHP. Back to basics - no framework, just PHP.
</p>
<blockquote>
In the first part of this (probably) 3-part series, we'll begin with the basics. It might seem boring, but the most important thing to get right with REST is parsing all the various elements of the HTTP request and responding accordingly. I've put in code samples from from a small-scale toy project I created to make me think about the steps involved.
</blockquote>
<p>Her "basics" include:</p>
<ul>
<li>the routing to send everything to the main index file (a "front controller" of sorts) with the .htaccess settings included
<li>Handling the incoming request with a "Request" class
<li>Parsing the incoming parameters from the "php://input" stream
</p>]]></description>
      <pubDate>Thu, 19 Jan 2012 10:02:18 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[ZendCasts.com: RESTful Delete with SLIM, jQuery and JSON]]></title>
      <guid>http://www.phpdeveloper.org/news/17248</guid>
      <link>http://www.phpdeveloper.org/news/17248</link>
      <description><![CDATA[<p>
Continuing on with his webcast series looking at using the Slim microframework to create a RESTful web service with JSON Output, <i>John Lebensold</i> takes the code from the previous tutorials (<a href="http://phpdeveloper.org/news/16958">part one</a>, <a href="http://phpdeveloper.org/news/17044">two</a>, <a href="http://phpdeveloper.org/news/17106">three</a>) and <a href="http://www.zendcasts.com/restful-delete-with-slim-jquery-and-json/2011/12/">adds handling for DELETE</a> to remove values from the data.
</p>
<blockquote>
This tutorial will show you how to add jQuery RESTful calls for using the DELETE verb when deleting items via a JSON REST interface.
</blockquote>
<p>
You'll definitely need to check out either the previous tutorials in the series to follow along with the code or <a href="https://gist.github.com/1469109">grab the current source</a> to see how everything's structured.
</p>]]></description>
      <pubDate>Tue, 13 Dec 2011 09:56:34 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Reddit.com: Should I be doing just about everything using REST?]]></title>
      <guid>http://www.phpdeveloper.org/news/17225</guid>
      <link>http://www.phpdeveloper.org/news/17225</link>
      <description><![CDATA[<p>
In <a href="http://www.reddit.com/r/PHP/comments/n1pyn/should_i_be_doing_just_about_everything_using_rest/">this new post</a> to Reddit.com, the question is asked "Should I be doing just about everything using REST?" - wondering if their new applications should all sit on top of a web service for their functionality.
</p>
<blockquote>
I'm pretty new to server-side programming, and actually started out with Python/mod-wsgi. From the ground up, mod-wsgi made a lot of sense. The server gets a request, you route the request. It feels like that's where I should start, so that's pretty much what I'm trying to create with PHP (a REST router - for learning purposes, I know frameworks exist). I'm trying to think of a situation where I wouldn't use a REST interface, but I can't seem to think of one (even for simple cases). Would it be safe to say that using REST is a pretty safe bet, most of the time?
</blockquote>
<p>
There's some good discussion and answers to his question touching on things like Service Oriented Architectures, some implications of having a web service power an entire application (or applications) and 
 a few comments with some personal experience.
</p>
<p>A comment about SOA sums it up well:</p>
<blockquote>
You learn to write for your platform in the way developers/partners will have to, so you produce a good quality usable API which encourages development and consumption of your platform.
</blockquote>]]></description>
      <pubDate>Wed, 07 Dec 2011 12:41:38 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[php|architect: Finding Exactly Where You Are]]></title>
      <guid>http://www.phpdeveloper.org/news/17121</guid>
      <link>http://www.phpdeveloper.org/news/17121</link>
      <description><![CDATA[<p>
On the php|architect site today <i>Chris Tankersley</i> has a new tutorial about geocoding, <a href="http://www.phparch.com/2011/11/finding-exactly-where-you-are/">Finding Exactly Where You Are</a> - a guide to integrating the <a href="http://developer.yahoo.com/geo/placefinder/">Yahoo! Placefinder</a> service into your application.
</p>
<blockquote>
Yahoo! PlaceFinder is a REST web service that will turn an address into the latitudinal and longitudinal coordinates in XML, JSON, or serialized PHP objects. It has a few other functions too, like finding the nearest airport, time zone, and even telephone area code. [...] PlaceFinder is a very simple REST service, so cURL is a quick and easy way to access it. There are no authentication tokens to deal with or logon procedures. Just send a GET request, and read the response. 
</blockquote>
<p>
He <a href="https://developer.apps.yahoo.com/dashboard/createKey.html">links you</a> to the service to get an API key and includes a simple class (PlaceFinderAPI) that builds the GET query for you and makes the request via <a href="http://php.net/curl">curl</a>. Also included is an example showing how to find a given location (coincidentally, his location choice is the hotel where the <a href="http://tek.phparch.com">php|tek</a> conferences are held).
</p>]]></description>
      <pubDate>Fri, 11 Nov 2011 12:05:40 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Building RESTful APIs with the Slim Microframework]]></title>
      <guid>http://www.phpdeveloper.org/news/16958</guid>
      <link>http://www.phpdeveloper.org/news/16958</link>
      <description><![CDATA[<P>
On PHPBuilder.com today there's a new tutorial from <i>Jason Gilmore</i> about building a <a href="http://www.phpbuilder.com/columns/RESTfulAPIs/RESTfulAPIs_10-04-2011.php3">simple RESTful API with Slim</a>, a microframework for PHP.
</p>
<blockquote>
Although a relatively new entrant in the PHP framework sweepstakes, I've been lately quite intrigued by <a href="https://github.com/codeguy/Slim">Slim</a>, a slick RESTful microframework modeled after Ruby's <a href="http://www.sinatrarb.com/">Sinatra</a>, which is coincidentally by far <a href="http://www.developer.com/lang/rubyrails/building-an-ajax-friendly-rest-api-with-sinatra.html">my favorite microframework</a> available for any programming language. In this article I'll show you just how easy it is to get started building a powerful RESTful API using this streamlined framework.
</blockquote>
<p>
Setup of the framework is as simple as downloading the latest copy from <a href="https://github.com/codeguy/Slim">its github repository</a>. It can then be included and used to make the simple routes in his examples. He uses a "games" request type to show how to handle GET, POST and PUT requests through Slim's simple interface.
</p>]]></description>
      <pubDate>Thu, 06 Oct 2011 10:12:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Federico Cargnelutti's Blog: Building a RESTful Web API with PHP and Apify]]></title>
      <guid>http://www.phpdeveloper.org/news/16844</guid>
      <link>http://www.phpdeveloper.org/news/16844</link>
      <description><![CDATA[<p>
<i>Federico Cargnelutt</i> has a new post to his blog showing you how to <a href="http://blog.fedecarg.com/2011/09/11/building-a-restful-web-api-with-php-and-apify/">create a REST API</a> for your site using the <a href="https://github.com/apify/apify-library">Apify</a> (complete with a shiny new 1.0 release).
</p>
<blockquote>
Web services are a great way to extend your web application, however, adding a web API to an existing web application can be a tedious and time-consuming task. Apify takes certain common patterns found in most web services and abstracts them so that you can quickly write web APIs without having to write too much code.
</blockquote>
<p>
Some code snippets are included to build a simple REST service - first some examples with user handling then a more fleshed out example of a controller that lets you fetch "post" information as pulled from a model. <a href="http://www.youtube.com/watch?v=7ptoB0yCsDo">A screencast</a> has also been posted showing the library in action.
</p>]]></description>
      <pubDate>Mon, 12 Sep 2011 09:10:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[IBM developerWorks: Hook into Wikipedia information using PHP and the MediaWiki API]]></title>
      <guid>http://www.phpdeveloper.org/news/16732</guid>
      <link>http://www.phpdeveloper.org/news/16732</link>
      <description><![CDATA[<p>
On the IBM developerWorks site, there's a tutorial from <i>Vikram Vaswani</i> showing you how to <a href="http://www.ibm.com/developerworks/web/library/x-phpwikipedia/index.html?ca=drs-">connect to Wikipedia's API</a> in your PHP application. It shows how to fetch, search and update entries through their backend. The tutorial's a little bit older (from May 2011) but the content is still relevant.
</p>
<blockquote>
Wikipedia is the ultimate online encyclopedia, containing millions of entries on different aspects of human knowledge. Web application developers are able to access and search these entries through the Wikipedia API. This article introduces the Wikipedia API and demonstrates it in the context of a PHP application, explaining how to search and retrieve different elements of Wikipedia content with PHP.
</blockquote>
<p>
He starts with a general introduction to the API including example feed results and URL request formats. From there he moves into the code - a mostly Zend Framework-driven example that uses the REST client. He shows how to make requests for categories, full-text search, grabbing raw page content and adding/editing the content of pages.
</p>]]></description>
      <pubDate>Wed, 17 Aug 2011 12:16:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Building a client for a REST API with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16660</guid>
      <link>http://www.phpdeveloper.org/news/16660</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a new post to his blog showing how to <a href="http://gonzalo123.wordpress.com/2011/08/01/building-a-client-for-a-rest-api-with-php/">make a PHP-based client for a REST API</a> with the help of <a href="https://github.com/gonzalo123/GzaasApi">his handy tool</a>.
</p>
<blockquote>
Today we're going to create a library to use a simple RESTfull API for a great project called <a href="http://gzaas.com/">Gzaas</a>. [...] Ok. The API is a simple RESTfull <a href="http://gzaas.com/project/api-embed/api-general-overview/">API</a>, so we can use it with a simple curl interface. A few lines of PHP and it will run smoothly. But Gzaas is cool so we're going to create a cool interface too. This days I'm involved into TDD world, so we're going to create the API wrapper using TDD. Let's start.
</blockquote>
<p>
He starts with his tests, defining checks for fonts, patterns and styles and moves into a sample call that sets configuration options for background color, shadows and visibility. You can find out more about what the service has to offer by <a href="http://gzaas.com/project/api-embed">reading the documentation</a> and the client <i>Gonzalo</i> has written for it <a href="https://github.com/gonzalo123/GzaasApi">in github</a>.
</p>]]></description>
      <pubDate>Mon, 01 Aug 2011 11:57:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Josh Adell's Blog: Path finding with Neo4j]]></title>
      <guid>http://www.phpdeveloper.org/news/16530</guid>
      <link>http://www.phpdeveloper.org/news/16530</link>
      <description><![CDATA[<p>
In a follow up to his previous post on <a href="http://phpdeveloper.org/news/16485">using Neo4j with PHP</a>, <i>Josh Adell</i> looks in a bit more detail about how to <a href="http://blog.everymansoftware.com/2011/06/path-finding-with-neo4j.html">find paths in the data</a> via a REST interface to the database.
</p>
<blockquote>
The thing that makes graphing databases useful is the ability to find relationship paths from one node to another. There are many algorithms for finding paths efficiently, depending on the use case.
</blockquote>
<p>
He includes some code showing the REST request (made via <a href="https://github.com/jadell/Neo4jPHP">this client</a>) to fetch <a href="http://1.bp.blogspot.com/-qteFgW-vvPE/TgK3beUyk_I/AAAAAAAAAA8/cstHGsCaLEU/s1600/street_graph.png">these street-based relationships</a>. He then creates a little sample script that provides driving directions from one intersection to another with a "findPathsTo" call. He modifies it a bit later on to use the <a href="http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm">Dijkstra algorithm</a>.
</p>]]></description>
      <pubDate>Tue, 28 Jun 2011 12:38:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Josh Adell's Blog: Neo4j for PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16485</guid>
      <link>http://www.phpdeveloper.org/news/16485</link>
      <description><![CDATA[<p>
<i>Josh Adell</i> has written up a new post for his blog showing some of his experience <a href="http://blog.everymansoftware.com/2011/06/neo4j-for-php.html">connecting PHP to Neo4j</a>, a graph database (and <a href="http://github.com/neo4j">open source project</a>). It helps to solve a problem of related datasets and the difficulties that traditional RDBMS have with them.
</p>
<blockquote>
Lately, I've been playing around with the graph database Neo4j and its application to certain classes of problems. Graph databases are meant to solve problems in domains where data relationships can be multiple levels deep. [...] As you continue to add degrees, the query becomes increasingly unwieldy, harder to maintain, and less performant.
</blockquote>
<p>
Graph databases, like Neo4j, handle these sorts of needs perfectly. There wasn't an official PHP interface for it, so he decided to <a href="http://github.com/jadell/Neo4jPHP">create his own</a> that worked with the REST interface the database provides. He includes a few code snippets showing how to connect and make a few requests - setting properties on objects, relating objects to one another and making queries that follow the paths from user to user and return them as a simple array.
</p>]]></description>
      <pubDate>Fri, 17 Jun 2011 10:05:26 -0500</pubDate>
    </item>
  </channel>
</rss>

