<?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, 23 May 2012 17:47:10 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPMaster.com: Bulletproofing Database Interactions with PHPUnit's Database Extension]]></title>
      <guid>http://www.phpdeveloper.org/news/17794</guid>
      <link>http://www.phpdeveloper.org/news/17794</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial showing you how to <a href="http://phpmaster.com/bulletproofing-database-interactions">test your application's interface with the database</a> using "bulletproof" PHPUnit testing.
</p>
<blockquote>
There's already a great article here that discusses Test Driven Development, but did you know that you can also test the code that interacts with your database? Especially if your application is data intensive, subjecting your CRUD code to a battery of tests is good practice that helps ensure that your application is working correctly. In this article you will be learning how to write database tests in PHP using PHPUnit and its database extension. 
</blockquote>
<p>
Included in the post is an <a href="https://github.com/phpmasterdotcom/BulletproofingDatabaseInteractions/blob/master/schema.sql">example schema</a> and an example of the seed data (defined as XML) for the testing to use as predictable data in its execution. His test class extends <i> PHPUnit_Extensions_Database_TestCase</i> (instead of the usual <i>PHPUnit_Framework_TestCase</i>) and a test for a basic "getArticles" method in his "IArticleDAO" class. By calling the "createXMLDataSet" method, the test loads in the pre-defined XML records and allows the correct evaluation of the assertions,
</p>]]></description>
      <pubDate>Tue, 10 Apr 2012 08:50:10 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SkyTechGeek.com: 10 Exceptional Tools For Website Testing]]></title>
      <guid>http://www.phpdeveloper.org/news/16760</guid>
      <link>http://www.phpdeveloper.org/news/16760</link>
      <description><![CDATA[<p>
Sometimes a little (external) testing of your website is in order and <i>Gagan Chhatwal</i> has posted <a href="http://skytechgeek.com/2011/08/10-exceptional-tools-for-website-testing/">his list of ten tools</a> you can use to check everything from  how much load the site can take to what can be done to optimize the load time.
</p>
<blockquote>
When maintaining or running a website , Webmasters need to keep in mind that one of the pertinent issues they will need to focus on is :Website Testing, which is not only vital for the website itself but for the user as well and one should not overlook its importance. [We have] collected some vital and free website testing tools which will help Webmasters in testing their sites thus saving users to conduct time consuming needless searches in finding the best resources pertaining to Web related tools and info.
</blockquote>
<p>Among the tools on the list are services like:</p>
<ul>
<li><a href="http://loadimpact.com/">Load Impact</a>
<li><a href="https://browsermob.com/performance-testing">Browser Mob</a>
<li><a href="http://host-tracker.com/">Host Tracker</a>
<li><a href="http://builtwith.com/">Built With</a>
<li><a href="http://online.htmlvalidator.com/php/onlinevallite.php">CSE HTML validator</a>
</ul>
<p>
Most of these resources are free services, if not then they have a trial where you can see if it's a good fit.
</p>]]></description>
      <pubDate>Tue, 23 Aug 2011 13:25:22 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tom Rawcliffe's Blog: session_start() blocking in php]]></title>
      <guid>http://www.phpdeveloper.org/news/16382</guid>
      <link>http://www.phpdeveloper.org/news/16382</link>
      <description><![CDATA[<p>
<i>Tom Rawcliffe</i> has a new post to his blog talking about an issue he found when trying to optimize a site for his company's systems - a <a href="http://tomrawcliffe.co.uk/blog/2011/04/session_start-blocking-in-php/">problem with the blocking sessions caused</a> when the pages were loaded.
</p>
<blockquote>
Now I didn't know it but is seems that php's session handling is blocking on a per request basis. Kinda makes sense if you think about it, that if two requests simultaneously try and change a session variable then you would get constancy issues. So php handles this by making session_start() a blocking action and will wait for any other request to either finish or close the session using session_write_close().
</blockquote>
<p>
The only reliable fix he found for the issue was to only selectively use the session in certain circumstances (or on certain pages) and closing it out when you were done with it.
</p>]]></description>
      <pubDate>Wed, 25 May 2011 10:46:21 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Leonid Mamchenkov's Blog: Disable and enable CakePHP plugins on the fly]]></title>
      <guid>http://www.phpdeveloper.org/news/16243</guid>
      <link>http://www.phpdeveloper.org/news/16243</link>
      <description><![CDATA[<p>
<i>Leonid Mamchenkov</i> has a quick post to his blog showing how to <a href="http://mamchenkov.net/wordpress/2011/04/23/disable-and-enable-cakephp-plugins-on-the-fly/">enable and disable (well, restrict from enabling) CakePHP plugins</a> on the fly - no need to modify config files if you only need it for a certain request.
</p>
<blockquote>
I am currently working on a rather large project which is based on CakePHP framework.  In order to simplify the task, I've broken down the whole application into a number of CakePHP plugins.  Now, however, I want to enable/disable plugins on the fly.  After a brief search around I couldn't find how to do that.  Asking a question at #cakephp IRC channel did it.  RabidFire instantly replied with <a href="http://groups.google.com/group/cake-php/browse_thread/thread/9370aac4a0d80488?fwc=1&pli=1">the link that gave me an idea</a>. 30 seconds later I had a working solution.
</blockquote>
<p>
Since the plugins extend the main AppController, all it took was a beforeFilter() method call that looks at a request parameter for the plugin name, checks against an "allowed" array and throws an exception of it's not found or can't load it.
</p>]]></description>
      <pubDate>Mon, 25 Apr 2011 11:45:17 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Gonzalo Ayuso's Blog: Speed up page page load combining javascript files with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/15937</guid>
      <link>http://www.phpdeveloper.org/news/15937</link>
      <description><![CDATA[<p>
<i>Gonzalo Ayuso</i> has a <a href="http://gonzalo123.wordpress.com/2011/02/21/speed-up-page-page-load-combining-javascript-files-with-php/">handy performance tip</a> for getting that little bit extra speed from your page load times - combining Javascript with PHP files.
</p>
<blockquote>
One of the golden rules when we want a high performance web site is minimize the HTTP requests. Normally we have several JavaScript files within our projects. It's a very good practice to combine all our JavaScript files into an only one file. [...] But if your project is alive and you are changing it, it's helpful to spare your JavaScript files between several files. [...]  So we need to choose between high performance and development comfort.
</blockquote>
<p>
He includes a quick script that runs through your javascript directory (recursively), grabs all of the javascript content from each, combines and minifies them to serve gzip compressed out to the browser.
</p>]]></description>
      <pubDate>Mon, 21 Feb 2011 13:01:54 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ole Markus' Blog: High load websites: A lock on Memcached::get]]></title>
      <guid>http://www.phpdeveloper.org/news/15640</guid>
      <link>http://www.phpdeveloper.org/news/15640</link>
      <description><![CDATA[<p>
<i>Ole Markus</i> has <a href="http://olemarkus.org/2010/12/high-load-websites-a-lock-on-memcachedget/">a new post</a> to his blog looking at a technique for working with memcached and fetching data out of the store using a binary semaphore for better performance.
</p>
<blockquote>
A typical document takes but a few hundred milliseconds to generate when a single request for the document enters the backend. The problem is that this is a highload website. In its current form, the backend serves hundreds of pages per second. This pretty much guarantees that the backend will concurrently receive cache miss on multiple languages and at the same time also receive cache miss on the pre-translated document.
</blockquote>
<p>
Given that he wants the translated version to be the one that's always shared, a problem can come up when the cache request is "missed" and the document starts generating from multiple places. His fix for the situation is that only the first miss generates and all others see a lock on it and wait for it to be removed before successfully fetching the result. He provides code in a "LockedMemcached" class to help make it all more useful.
</p>]]></description>
      <pubDate>Mon, 27 Dec 2010 12:34:14 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings techPortal: Surviving a Plane Crash]]></title>
      <guid>http://www.phpdeveloper.org/news/14035</guid>
      <link>http://www.phpdeveloper.org/news/14035</link>
      <description><![CDATA[<p>
The Ibuildings techPortal has posted the latest episode of their Dutch PHP Conference 2009 podcast series, a session given by <i>Peter Verhage</i> on handling the <a href="http://techportal.ibuildings.com/2010/02/16/surviving-a-plane-crash-2/">ups and downs of server loads and traffic</a>.
</p>
<blockquote>
NU.nl is a well known news website in its homeland, The Netherlands, and is actively expanding into other countries. On an average day NU.nl will serve up 7 million page views; peak traffic days are more than triple that number. [...] In this [episode] we want to look at the front end that we architected for NU.nl, and how we designed the system to handle both regular traffic and peaks.
</blockquote>
<p>
To listen you can either use the <a href="http://techportal.ibuildings.com/2010/02/16/surviving-a-plane-crash-2/">in-page player</a> or you can grab the <a href="http://techportal.ibuildings.com/wp-content/uploads/audio/dpcradio/episode_015.mp3">mp3 directly</a>.
</p>]]></description>
      <pubDate>Tue, 16 Feb 2010 12:05:37 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Abhinav Singh's Blog: Get real time system & server load notification on any IM using PHP and XMPP ]]></title>
      <guid>http://www.phpdeveloper.org/news/13834</guid>
      <link>http://www.phpdeveloper.org/news/13834</link>
      <description><![CDATA[<p>
On his blog today <i>Abhinav Singh</i> has <a href="http://abhinavsingh.com/blog/2010/01/get-real-time-system-server-load-notification-on-any-im-using-php-and-xmpp/">an interesting post</a> describing how to use PHP and <a href="http://xmpp.org/">XMPP</a> (the Extensible Messaging and Presence Protocol) to get real-time notifications of the status of your servers and applications via instant messenger.
</p>
<blockquote>
There are several open and closed source softwares in the market which can generate almost real time notifications for you. Most famous one being <a href="http://www.nagios.org/">Nagios</a>. In this blog post I will discuss, how to generate real time system notifications using PHP and <a href="http://xmpp.org/">XMPP</a>. Specifically, I will present sample script using <a href="http://code.google.com/p/jaxl">Jaxl</a> (Jabber XMPP Client Library) for generating real time system load notifications, which can be received using any Instant Messengers.
</blockquote>
<p>
The code for a class that uses and extends the Jaxl library is included. It sends the messages via Jabber after grabbing the contents of the "/proc/loadavg" file on the local system. You'll need to check out the latest Jaxl source and create a configuration file with your IM information, but that's about it. The rest is handled by the script - you can <a href="http://abhinavsingh.com/blog/wp-content/uploads/2010/01/Jaxl4serveradmins.class.php-example-screenshot-for-system-load.png">see an example here</a>.
</p>]]></description>
      <pubDate>Wed, 13 Jan 2010 11:23:15 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Giorgio Sironi's Blog: Doctrine 2 now has lazy loading]]></title>
      <guid>http://www.phpdeveloper.org/news/13013</guid>
      <link>http://www.phpdeveloper.org/news/13013</link>
      <description><![CDATA[<p>
As is mentioned in <A href="http://giorgiosironi.blogspot.com/2009/08/doctrine-2-now-has-lazy-loading.html">this new post</a> to <i>Giorgio Sironi</i>'s blog, the latest version of Doctrine now includes lazy loading functionality.
</p>
<blockquote>
Lazy loading is the capability of performing a expensive operation on demand, only when it reveals necessary from a client request. [...] In <a href="http://trac.doctrine-project.org/wiki/Doctrine2.0">Doctrine 2</a> I made some architectural choices implementing the proxy approach, which substitute a subclassing object to every association which is not eager-loaded.
</blockquote>
<p>
There's two main places you can see these differences - in the one/many to one associations dynamic proxies and collection interface.
</p>]]></description>
      <pubDate>Fri, 07 Aug 2009 11:07:37 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Giorgio Sironi's Blog: Lazy loading of objects from database]]></title>
      <guid>http://www.phpdeveloper.org/news/12914</guid>
      <link>http://www.phpdeveloper.org/news/12914</link>
      <description><![CDATA[<p>
In <a href="http://giorgiosironi.blogspot.com/2009/07/lazy-loading-of-objects-from-database.html">recent post</a> to his blog <i>Giorgio Sironi</i> takes a look at a handy feature that PHP makes it relatively simple to work with objects in your applications - lazy loading.
</p>
<blockquote>
What is lazy loading? A practice in object/relational mapping which simulate the presence of the whole object graph in memory. There is some techniques for produce this illusion that I explain here. [...] The main problem is that we cannot load all the object graph, because it will not fit in the memory of the server and it will take much time to build, depending on the size of the database. Nor we can load an arbitrary subset of it.
</blockquote>
<p>
His solution is to use the <a href="http://en.wikipedia.org/wiki/Proxy_pattern">proxy design pattern</a> to create an interface allowing only the first level of information to be loaded by default. After that, each of the sub-levels have what they need to load themselves and the data that might be needed inside.
</p>]]></description>
      <pubDate>Tue, 21 Jul 2009 12:48:54 -0500</pubDate>
    </item>
  </channel>
</rss>

