<?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>Sat, 18 May 2013 18:47:46 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Getting Started with Varnish]]></title>
      <guid>http://www.phpdeveloper.org/news/19074</guid>
      <link>http://www.phpdeveloper.org/news/19074</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial that can help you increase the performance of your application relatively painlessly with the help of the <a href="http://www.varnish-cache.org/">Varnish</a> proxy tool. <a href="http://phpmaster.com/getting-started-with-varnish/">The article</a> helps you get started.
</p>
<blockquote>
<a href="http://www.varnish-cache.org/">Varnish</a> is a reverse proxy server; it sits in front of your web server and serves content from your server and no one else's. Reverse proxy servers are tightly coupled to the web server and can act on messages received from it. [...] Simply put, Varnish does one thing: serve web content super fast.
</blockquote>
<p>
You'll need command line access to the machine (as well as permissions to install the software) but getting it installed is a simple "apt-get" away. There's a bit of configuration to set up to get it up and working, but it's only a few lines...and examples are included in the tutorial. They get into some of the more advanced configuration options too, like the time-to-live and changing the port it listens on. Varnish isn't just for PHP applications either - it can be used effectively for any kind of web application as it's just a proxy layer that sits on top and waits for requests.
</p>]]></description>
      <pubDate>Tue, 22 Jan 2013 10:37:17 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Shashikant Jagtap: Automating Web Performance Data Collection with Behat and BrowserMob Proxy]]></title>
      <guid>http://www.phpdeveloper.org/news/18679</guid>
      <link>http://www.phpdeveloper.org/news/18679</link>
      <description><![CDATA[<p>
<i>Shashikant Jagtap</i> has <a href="https://lestbddphp.wordpress.com/2012/10/30/automating-web-performance-data-collection-with-behat-and-browsermob-proxy/>a new post</a> to his site about using the PHP-based <a href="http://behat.org">Behat</a> TDD testing tool and the <a href="http://opensource.webmetrics.com/browsermob-proxy/">BrowserMob-Proxy</a> to make an automated system that collects performance data on your applications (including load time, recording headers and simulations of network traffic and latency).
</p>
<blockquote>
BrowserMob Proxy is a utility which is used for capuring HTTP traffic and performance data from the browser. <a href="http://opensource.webmetrics.com/browsermob-proxy/">BrowserMob-Proxy</a> adds in essential missing capabilities such as checking HTTP status codes and injecting headers for HTTP Basic Auth. Web Perfomance data can be manually captured by other tools like Firebug or Developers Tools. Using BrowserMob Proxy we can capture perfonace data in <a href="http://www.softwareishard.com/blog/har-12-spec/">HAR</a> format while running automated tests.
</blockquote>
<p>
He includes the commands you'll need to set up the PHP interface for BrowserMob (<a href="https://github.com/Element-34/PHPBrowserMobProxy">PHPBrowserMob</a>) the <a href="http://opensource.webmetrics.com/browsermob-proxy/">proxy itself</a> and a sample test and context file that runs some checks against Facebook.
</p>]]></description>
      <pubDate>Wed, 31 Oct 2012 10:19:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DZone.com: Sencha Touch 2 Models - Loading And Saving Model Data Using a Proxy, PHP Example]]></title>
      <guid>http://www.phpdeveloper.org/news/18430</guid>
      <link>http://www.phpdeveloper.org/news/18430</link>
      <description><![CDATA[<p>
On DZone.com there's a new tutorial posted (by <i>Jorge Ramon</i>) about hooking together the models of Sencha's Touch 2 with a PHP backend to make saving data to them simpler via a proxy.
</p>
<blockquote>
Sencha Touch models have the ability to work with a proxy. This feature allows you to save and retrieve model data from the server, memory or local storage, without depending on a Sencha Touch data store. Let's try it with a very simple scenario where the server side is a PHP page.
</blockquote>
<p>
The article includes both the Javascript to create the models (along with its proxy and custom API methods defined) as well as the PHP that powers the backend. The PHP just reads from the "php://input" stream and echoes back out JSON, but it gives you an idea of what to expect to receive. For more information on Sencha Touch, check out <a href="http://docs.sencha.com/touch/2-0/">their documentation</a>.
</p>]]></description>
      <pubDate>Fri, 31 Aug 2012 11:54:19 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso: Building a simple API proxy server with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/18358</guid>
      <link>http://www.phpdeveloper.org/news/18358</link>
      <description><![CDATA[<p>
In some of his work with <a href="http://backbonejs.org/">Backbone.js</a> recently, <i>Gonzalo Ayuso</i> has been frustrated by something that's a wall for many developers wanting to work with outside datasources - the browser restriction that prevents cross-domain requests. His solution? Create <a href="http://gonzalo123.wordpress.com/2012/08/13/building-a-simple-api-proxy-server-with-php/">a REST proxy</a> to live on his server and pass the requests through.
</p>
<blockquote>
Nowadays there is a header to allow it: <a href="https://developer.mozilla.org/en-US/docs/HTTP_access_control">Access-Control-Allow-Origin</a>. The problem is that the remote server must set up this header. For example I was playing with github's API and github doesn't have this header. If the server is my server, is pretty straightforward to put this header but obviously I'm not the sysadmin of github, so I cannot do it. What the solution? One possible solution is, for example, create a proxy server at localhost with PHP. 
</blockquote>
<p>
He shares the full code for his project - basically a handler that takes the incoming request and mirrors to out to the public, remote API - request method and all. It uses some of the packages from Symfony (like the http-foundation) and <a href="https://github.com/gonzalo123/rest-proxy/blob/master/lib/RestProxy/CurlWrapper.php">wraps around cURL</a> to handle the requests. The project is <a href="http://packagist.org/packages/gonzalo123/rest-proxy">available for Composer users</a> as well.
</p>]]></description>
      <pubDate>Tue, 14 Aug 2012 11:07:56 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: An Intro to Virtual Proxies, Part 1]]></title>
      <guid>http://www.phpdeveloper.org/news/17838</guid>
      <link>http://www.phpdeveloper.org/news/17838</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial from <i>Alejandro Gervasio</i> about <a href="http://phpmaster.com/intro-to-virtual-proxies-1/">using virtual proxies</a> in your application - a method in development that provides a layer of abstraction on top of domain objects and makes it more efficient to work with (and lazy load) them.
</p>
<blockquote>
Often referenced by a few other fancy names, the substitute is generically called a <a href="http://en.wikipedia.org/wiki/Proxy_pattern">virtual proxy</a>, a sort of stand-in that exploits the neatness of Polymorphism and interacts with the actual domain objects. Proxies aren't new to PHP. <a href="http://www.doctrine-project.org/">Doctrine</a> and <a href="http://framework.zend.com/">Zend Framework 2.x</a> make use of them, although with different aims. On behalf of a didactic cause, however, it would be pretty instructive to implement some custom proxy classes and use them for lazy-loading a few basic aggregates from the database, this way illustrating how virtual proxies do their stuff under the hood.
</blockquote>
<p>
He starts off by setting up a domain model for a "Post" and "Author" - a typical blog example.Based on the definition of these classes, he creates a mapper class to generate Author objects and an "AuthorProxy" class that uses a "loadAuthor" method to only load in the author's details when a property is requested. He gives a bit more code showing it in action and the difference between using the normal Author and AuthorProxy class.
</p>]]></description>
      <pubDate>Thu, 19 Apr 2012 08:52:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Markus Pullmann's Blog: Remote Debugging in PHP with XDebug]]></title>
      <guid>http://www.phpdeveloper.org/news/17554</guid>
      <link>http://www.phpdeveloper.org/news/17554</link>
      <description><![CDATA[<p>
<i>Markus Pullmann</i> has a new post to his blog about <a href="http://www.pullmann-is.org/2012/02/16/remote-debugging-in-php-with-xdebug/">setting up XDebug</a> in your PHP installation to help you narrow down those elusive issues more quickly.
</p>
<blockquote>
Debugging locally is a nice improvement to have no debugger at all, but in many situations there is the need to debug on production server, where the application is running on the web. There are different reasons for that, but the most important one for me is, that my local environment / installation is different from the one i have on servers in data center and bugs can be related to the environment.
</blockquote>
<p>
He walks you through the installation and server-side configuration of XDebug first then shows how to install the <a href="http://code.activestate.com/komodo/remotedebugging/">Komodo Remote Debugging Client</a> to help with multi-user debugging setups. He mentions setting up the debugging on the client/IDE side, but there's no specific instructions for any particular IDE - just how it works overall.
</p>]]></description>
      <pubDate>Fri, 17 Feb 2012 08:45:29 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint.com: How to Create an XML to JSON Proxy Server in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17016</guid>
      <link>http://www.phpdeveloper.org/news/17016</link>
      <description><![CDATA[<p>
On SitePoint.com today there's a new post from <i>Craig Buckler</i> showing you how to create a <a href="http://www.sitepoint.com/php-xml-to-json-proxy/">simple XML to JSON proxy server</a> in PHP with a SimpleXML object at its heart.
</p>
<blockquote>
Unless you're new to this web development lark, you'll know the 'X' in 'AJAX' stands for XML - eXtensible Markup Language. But you're probably not using XML. If you are, you'd probably prefer not to. All the cool kids are using JSON or JSON-P: it has a smaller payload, is easier to use and faster to process. [...] Fortunately, there are a couple of solutions which allow you to retain the benefits of XML data interchange but provide the ease of JSON in JavaScript. In this article, we're going to create an XML to JSON proxy server in PHP.
</blockquote>
<p>
Of course, this will only work with well-formatted XML documents, but it's a quick little hack that pulls in the XML data with a <a href="http://php.net/curl">curl</a> request and parses it via SimpleXML and uses <a href="http://php.net/json_encode">json_encode</a> to push it back out as JSON.
</p>
]]></description>
      <pubDate>Wed, 19 Oct 2011 13:07:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Liip Blog: First Release of Proxy-Object]]></title>
      <guid>http://www.phpdeveloper.org/news/16597</guid>
      <link>http://www.phpdeveloper.org/news/16597</link>
      <description><![CDATA[<p>
On the Liip blog <i>Bastian Feder</i> has announced the first release of a tool that helps you proxy your objects (overlay them with a layer that exposes properties and methods) following the <a href="http://en.wikipedia.org/wiki/Proxy_pattern">proxy object design pattern</a> in PHP.
</p>
<blockquote>
The outcome is this little library making it much easier to generate a proxy of your system under test (SUT). Another thought on this library was, that it should be very easy to use if you know the way to mock classes and methods in PHPUnit. Proxy-object has almost the same API, but does not change the behavior of the proxied class/method. The only purpose is to expose hidden methods and members.
</blockquote>
<p>
The scripts, <a href="http://github.com/lapistano/proxy-object">found on github</a>, give you a simple way to define a proxy over a given class' functionality and define methods/member variables to be exposed. He includes two code examples, one of each type. There's also an example of making the proxy object without calling the constructor, useful in certain cases when the initialization of the object doesn't need to happen.
</p>
<p>
You can also find out more about the usage of this tool in <a href="http://blog.bastian-feder.de/blog/029_proxyObject.html">this new post</a> to <i>Bastian</i>'s blog.
</p>]]></description>
      <pubDate>Fri, 15 Jul 2011 11:06:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matthew Weier O'Phinney's Blog: Proxies in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16555</guid>
      <link>http://www.phpdeveloper.org/news/16555</link>
      <description><![CDATA[<p>
In a new blog post <i>Matthew Weier O'Phinney</i> has <a href="http://weierophinney.net/matthew/archives/263-Proxies-in-PHP.html">taken a look at proxy objects</a> (the Proxy design pattern) and how it differs from some of the other popular patterns.
</p>
<blockquote>
Of the other patterns mentioned, the one closest to the Proxy is the Decorator. In the case of a Decorator, the focus is on adding functionality to an existing object -- for instance, adding methods, processing input before delegating to the target object, or filtering the return of a method from a target object.
</blockquote>
<p>
Proxies stand in for objects and have several benefits for your application that may or may not need all of the overhead a full object could cause. <i>Matthew</i> focuses on one benefit in particular - consuming and controlling access to another object. He sets up a problem of wanting to use properties/methods on objects that aren't exposed directly (like a protected method). His solution is a proxy layer class on top of the original object. He includes a few "gotchas" to look out for when using this technique including overwriting all necessary methods and copying over all of the needed properties.
</p>]]></description>
      <pubDate>Wed, 06 Jul 2011 08:10:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Using OpenStreetMap tiles with Flickr]]></title>
      <guid>http://www.phpdeveloper.org/news/15976</guid>
      <link>http://www.phpdeveloper.org/news/15976</link>
      <description><![CDATA[<p>
<i>Derick Rethans</i> has a new post today with a bit of code showing how to <a href="http://derickrethans.nl/using-openstreetmap-with-flickr.html">combine Flickr and OpenStreetMap</a> and make a mapping tool that plots out the location information for the Flickr images.
</p>
<blockquote>
I like taking pictures, and I usually take a GPS so that I can place them on a map on my Flickr page. On my last excursion however, the battery of my GPS had died, so I did not have location information available to store in my pictures' EXIF headers. Flickr can use the EXIF headers to then show the images on the map. Because I did not have the location information to automatically place my pictures on the map, I wanted to do that by hand. 
</blockquote>
<p>
His <a href="http://derickrethans.nl/files/redirectYahooMapsToOsm.php.txt">script</a> (as used by a local Squid proxy) supports two different versions of the mapping - one for Yahoo! Maps and the other for OpenStreetMaps'. You can see the <a href="http://derickrethans.nl/images/content/flickrosm.png">end result here</a> - a set of Flickr images with a map in the background.
</p>]]></description>
      <pubDate>Tue, 01 Mar 2011 09:37:56 -0600</pubDate>
    </item>
  </channel>
</rss>
