<?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 09:19:00 -0500</pubDate>
    <ttl>30</ttl>
    <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>
    <item>
      <title><![CDATA[Cal Evans' Blog: Update from webcast on Zend_Cache_Frontend_Class]]></title>
      <guid>http://www.phpdeveloper.org/news/13179</guid>
      <link>http://www.phpdeveloper.org/news/13179</link>
      <description><![CDATA[<p>
<i>Cal Evans</i> has <a href="http://blog.calevans.com/2009/09/07/zend_cache_frontend_class/">posted an update</a> to comments made during his <a href="http://phparch.com/conferences/webcasts">webcast</a> for php|architect on the Zend Framework:
</p>
<blockquote>
In reading over the chat room log for my recent <a href="http://phparch.com/conferences/webcasts">webcast</a>, <a href="http://blog.calevans.com/2009/09/03/zend-framework-piece-by-piece/">Zend Framework: Piece by Piece</a> I noticed a question from my buddy <a href="http://ishouldbecoding.com/">Elazar</a> [Matthew Turland] about Zend_Cache_Frontend_Class. Thinking I had made a mistake, I reviewed the materials and the <a href="http://framework.zend.com/manual/en/zend.cache.frontends.html">Zend_Cache_Frontend_Class</a> documentation page so that I could do a quick update. The answer wasn't nearly as simple as I thought.
</blockquote>
<p>
He notes that it's not a proxy and caching tool for objects and their data as he originally stated. In fact, when you call it directl, it does work this way. When you create it in a cache object, though, the resulting object isn't created correctly. To solve the issue, he gives two ways to properly use the Zend_Cache_Frontent_Class component - an easy way and a hard way. In one you make the class first and pass it in and, in the other, a suggestion for integrated model caching.
</p>]]></description>
      <pubDate>Tue, 08 Sep 2009 07:50:10 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Derick Rethans' Blog: Debugging with multiple users]]></title>
      <guid>http://www.phpdeveloper.org/news/12675</guid>
      <link>http://www.phpdeveloper.org/news/12675</link>
      <description><![CDATA[<p>
For most developers, working with <a href="http://xdebug.org">XDebug</a> is a simple matter of setting up the extension and getting to work. For larger teams, though, its not quite that easy. The way that XDebug is set up by default, it's no quite conducive to multiuser situations. <i>Derick Rethans</i> is <a href="http://derickrethans.nl/debugging_with_multiple_users.php">here to help</a> in his latest blog post, though. He describes a method (using a DBGp proxy) to handle splitting things between multiple developers.
</p>
<blockquote>
As author of <a href="http://xdebug.org/">Xdebug</a>, people ask me often the question how to handle the case in teams when there is one development server and multiple developers working on the same project on that server. [...] Now, in order to solve the above mentioned issue, you will need to run a DBGp proxy. DBGp is the protocol, designed by ActiveState and myself to facilitate communication between an IDE and PHP+Xdebug.
</blockquote>
<p>
He walks you through the setup process - how to point XDebug to the correct location and how to configure the proxy to handle the multiple incoming requests and route the debug information back to the correct client.
</p>]]></description>
      <pubDate>Fri, 12 Jun 2009 09:36:10 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Kae Verens' Blog: Hosting multiple sites from the same CMS engine]]></title>
      <guid>http://www.phpdeveloper.org/news/11781</guid>
      <link>http://www.phpdeveloper.org/news/11781</link>
      <description><![CDATA[<p>
<i>Kae Verens</i> has <a href="http://verens.com/archives/2009/01/20/hosting-multiple-sites-from-the-same-cms-engine/">a few tips</a> to help simplify your life with your current content management system by using one code base to run multiple sites.
</p>
<blockquote>
I haven't studied how other engines do it, but here's how I do it. First off, some benefits to sharing the CMS across separate sites: reduced resource usage, easier upgrades, easier bug-fixing. Convinced yet? Of course you are. Here's how you do it.
</blockquote>
<p>There's four steps to his process:</p>
<ul>
<li>Separate out the site-specific files from one another
<li>Serve all site-specific files out through a "proxy" script that can intelligently grab the needed ones based on the site
<li>Override the default configuration at request time (forcing it to use that "proxy" script)
<li>Create that proxy file that the web server can funnel the requests through (his example is included).
</ul>]]></description>
      <pubDate>Wed, 21 Jan 2009 10:21:33 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brian Snugg's Blog: Reverse Proxy in PHP5]]></title>
      <guid>http://www.phpdeveloper.org/news/11554</guid>
      <link>http://www.phpdeveloper.org/news/11554</link>
      <description><![CDATA[<p>
<i>Brian Snugg</i> has two new posts relating to his script for a reverse proxy in PHP5. The first lays the foundation, the second makes some updates to make it a bit more efficient.
</p>
<blockquote>
So I have been working on a little class to run a reverse proxy from <a href="http://www.php.net/">PHP</a> using <a href="http://us.php.net/curl">cURL</a>. I have extended this class for my own purposes (single-sign-on) to handle some special request parameters, but here it is. It has some warts, but it's a good starting point.
</blockquote>
<p>
He creates the ProxyHandler class in the <a href="http://techzinger.blogspot.com/2007/07/writing-reverse-proxy-in-php5.html">first post</a> and in the <a href="http://techzinger.blogspot.com/2007/07/reverse-proxy-in-php5-rev2.html">second</a> updates the script to pass a more correct version of the headers to the proxy server to get a better response back.
</p>]]></description>
      <pubDate>Thu, 11 Dec 2008 11:14:03 -0600</pubDate>
    </item>
  </channel>
</rss>

