<?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, 09 Feb 2012 20:24:33 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Leaseweb Labs Blog: Migration to Symfony2 continued]]></title>
      <guid>http://www.phpdeveloper.org/news/17525</guid>
      <link>http://www.phpdeveloper.org/news/17525</link>
      <description><![CDATA[<p>
On the LeaseWeb Labs blog there's a continuation from a previous post about migrating your Symfony1 application over to Symfony2. In the <a href="http://phpdeveloper.org/news/17299">first part</a> of this series of posts, <i>Stefan Koopmanschap</i> talked about wrapping your code to make it work. In <a href="http://www.leaseweblabs.com/2012/02/migration-to-symfony2-continued/">this second post</a>, <i>Maurtis van der Schee</i> tackles two issues <i>Stefan</i> mentioned - performance problems and handling authorization/authentication.
</p>
<blockquote>
On December 21, 2011 Stefan Koopmanschap wrote an excellent article on this blog titled "Painless (well, less painful) migration to Symfony2." [...] We were very much inspired by his passionate elucidation and we were fully convinced of the urge to start migrating to Symfony2 as soon as possible. However, he also provided us with a "A word of caution" about 2 things: performance and authentication/authorization. This might get some people worried, but not us: it challenged us to find a solution for those two open issues.
</blockquote>
<p>
They explain why these two things are a problem and some of their solutions they've created - a .htaccess for routing and manually replicating the Symfony2 session in the Symfony1 code. Included in the post are the rewrite rules and code to make these two things happen (and a small configuration change to make them work).
</p>]]></description>
      <pubDate>Thu, 09 Feb 2012 11:51:59 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint.com: How to Create Your Own Random Number Generator in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17524</guid>
      <link>http://www.phpdeveloper.org/news/17524</link>
      <description><![CDATA[<p>
On SitePoint.com today there's a new tutorial showing how to <a href="http://www.sitepoint.com/php-random-number-generator/">create a random number generator</a> in PHP (with the help of methods like <a href="http://php.net/mt_rand">mt_rand</a> and <a href="http://php.net/mt_srand">mt_srand</a>).
</p>
<blockquote>
Computers cannot generate random numbers. A machine which works in ones and zeros is unable to magically invent its own stream of random data. However, computers can implement mathematical algorithms which produce pseudo-random numbers. They look like random numbers. They feel like random distributions. But they're fake; the same sequence of digits is generated if you run the algorithm twice.
</blockquote>
<p>
Included in the post is code showing how to use the random functions and how to create a class (Random) that provides a few methods to help make generation easier - "seed" and "num". It first calls "seed" with a number to start the random generator off with and then "num" in a loop to pull out random values based on that. 
</p>]]></description>
      <pubDate>Thu, 09 Feb 2012 10:03:35 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Refulz.com: The __toString() Method - Objects as Strings]]></title>
      <guid>http://www.phpdeveloper.org/news/17523</guid>
      <link>http://www.phpdeveloper.org/news/17523</link>
      <description><![CDATA[<p>
On the Refulz.com blog there's a <a href="http://php.refulz.com/magic-methods-in-php-tostring-method/">recent post</a> introducing the __toString() magic method in PHP. This handy method allows you to define how to return an object when it's referenced as a string.
</p>
<blockquote>
We started the study of PHP magic methods by learning about <a href="http://php.refulz.com/magic-methods-in-php-__get-method/">__get() magic method</a>. [...] PHP is loosely typed language and same variable can be used or referred as string, number or object. The __toString() method is called when the code attempts to treat an object like a string. This function does not accept any arguments and should return a string.
</blockquote>
<p>
Some quick code is included showing how it works - returning a combined string made from two private class properties when the object ($obj) is echoed out. They also show multiple ways of using the method in both pre- and post-PHP 5.2.
</p>]]></description>
      <pubDate>Thu, 09 Feb 2012 09:27:19 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMaster.com: Using Traits in PHP 5.4]]></title>
      <guid>http://www.phpdeveloper.org/news/17522</guid>
      <link>http://www.phpdeveloper.org/news/17522</link>
      <description><![CDATA[<p>
On PHPMaster.com today there's a new tutorial about using a feature in the upcoming PHP release (5.4) to make it easier to work with more modular code - <a href="http://phpmaster.com/using-traits-in-php-5-4/">using traits</a>.
</p>
<blockquote>
In this article I will discuss traits, a new feature introduced in PHP 5.4 to overcome [issues where multiple inheritance is needed]. The concept of traits itself is nothing new to programming and is used in other languages like Scala and Perl. They allows us to horizontally reuse code across independent classes in different class hierarchies.
</blockquote>
<p>
Included in the post is example code showing what the use of a trait looks like and a method for creating a Singleton that can spawn instances of two classes. Also included are examples of:
</p>
<ul>
<li>using multiple traits at once, 
<li>traits made up of traits, 
<li>the importance of order, 
<li>aliasing to avoid conflicts, 
<li>reflection 
<li>and a few other features that come along with their use.
</ul>]]></description>
      <pubDate>Thu, 09 Feb 2012 08:40:50 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Site News: Blast from the Past - One Year Ago in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17521</guid>
      <link>http://www.phpdeveloper.org/news/17521</link>
      <description><![CDATA[Here's what was popular in the PHP community one year ago today:<ul><li><a href="http://phpdeveloper.org/news/15895">Zend Developer Zone: ZendCon Sessions Episode 037: Why MVC is not an Application Architecture</a>
<li><a href="http://phpdeveloper.org/news/15868">Michael Nitschinger's Blog: Understanding the Lithium Router - Part 1</a>
<li><a href="http://phpdeveloper.org/news/15867">Rafael Dohms' Blog: Problem Solving technique #1: Taking a mental break</a>
<li><a href="http://phpdeveloper.org/news/15866">ZendCasts.com: Unit Testing Doctrine 2 Entities</a>
<li><a href="http://phpdeveloper.org/news/15864">Lorna Mitchell's Blog: Installing Gearman for PHP and Ubuntu</a>
<li><a href="http://phpdeveloper.org/news/15894">Label Media Blog: Design Patterns in PHP - Observer Pattern</a>
<li><a href="http://phpdeveloper.org/news/15865">Sebastian Bergmann's Blog: PHP Project Wizard</a>
<li><a href="http://phpdeveloper.org/news/15891">Lorna Mitchell's Blog: Book Review: The Passionate Programmer</a>
<li><a href="http://phpdeveloper.org/news/15863">Jim Plush's Blog: How to Auto Create Issues in Jira From PHP</a>
<li><a href="http://phpdeveloper.org/news/15892">Query7.com: Developing A Blog With CakePHP</a>
<li><a href="http://phpdeveloper.org/news/15889">AppStorm.net: Using PyroCMS to Manage Content With Simplicity</a>
<li><a href="http://phpdeveloper.org/news/15888">TechZinger Blog: Fat-Free Framework for PHP</a>
<li><a href="http://phpdeveloper.org/news/15887">Zend Developer Zone: Creating Multi-Language Web Applications with Zend_Translate</a>
<li><a href="http://phpdeveloper.org/news/15881">MySQL Performance Blog: Sample datasets for benchmarking and testing</a>
<li><a href="http://phpdeveloper.org/news/15880">PHPBuilder.com: Top 10 phpMyAdmin Tips and Tricks You May Not Know</a>
</ul>]]></description>
      <pubDate>Thu, 09 Feb 2012 07:08:28 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings techPortal: DPC Radio: Implementing OAuth]]></title>
      <guid>http://www.phpdeveloper.org/news/17520</guid>
      <link>http://www.phpdeveloper.org/news/17520</link>
      <description><![CDATA[<p>
On the Ibuildings techPortal today they've posted the latest in their DPC Radio series of podcasts as recorded at last year's <a href="http://phpconference.nl">Dutch PHP Conference</a>. In <a href="http://techportal.ibuildings.com/2012/02/08/dpc-radio-implementing-oauth/">this new episode</a> they share <i>Lorna Mitchell</i>'s talk "Implementing OAuth".
</p>
<blockquote>
With Twitter moving its API to OAuth the idea of using tokens rather than passwords for authentication went mainstream. Many explanations of OAuth make it seem complicated whereas in reality the "OAuth Dance" is a series of simple steps executed in sequence. This talk covers consuming and providing OAuth services, includes implementation examples, and is recommended for all technical leads, architects, and integration specialists.
</blockquote>
<p>
You can listen to this latest episode either via <a href="http://techportal.ibuildings.com/2012/02/08/dpc-radio-implementing-oauth/">the in-page player</a> or by <a href="http://dpcradio.s3.amazonaws.com/2011_010.mp3">downloading the mp3</a>. You can follow along with the presentation in <a href="http://www.slideshare.net/lornajane/oauth-7990565">her slides</a>.
</p>]]></description>
      <pubDate>Wed, 08 Feb 2012 14:20:29 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Artur Ejsmont's Blog: A few words on bugs and software quality]]></title>
      <guid>http://www.phpdeveloper.org/news/17519</guid>
      <link>http://www.phpdeveloper.org/news/17519</link>
      <description><![CDATA[<p>
In <a href="http://artur.ejsmont.org/blog/content/a-few-words-on-bugs-and-software-quality">this new post</a> to his blog <i>Artur Ejsmont</i> shares some of his thoughts on bugs and how they can effect the quality of your software. He touches on topics like handling bug reports, how random code changes effect them and how effective a code review can be.
</p>
<blockquote>
From time to time I see bugs in the code and I start thinking "really? is it possible that no one noticed that bug before? am i the first person to see this code?". I thought it might be worth writing a little post on what helps me to deal with bugs and software quality in general and what are the common pitfalls in developer's thought process. Although it is not a very extensive post i hope it may inspire some developers to try new approaches.
</blockquote>
<p>
Other topics he offers for consideration involve the fact that bugs will never fix themselves (they might disappear in a refactor though), that the bug is almost never in the language/data source's code and how automated (unit) testing can help to find new bugs before they're released to the users.
</p>]]></description>
      <pubDate>Wed, 08 Feb 2012 13:50:40 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Developer Drive: Building a PHP Ad Tracker: Data Object Design and Coding]]></title>
      <guid>http://www.phpdeveloper.org/news/17518</guid>
      <link>http://www.phpdeveloper.org/news/17518</link>
      <description><![CDATA[<p>
Continuing on from <a href="http://phpdeveloper.org/news/17400">the first part</a> of their tutorial series about creating a simple ad tracker for your web application, Developer Drive is back with <a href="http://www.developerdrive.com/2012/02/php-ad-tracker-part-ii-data-object-design/">part two</a>, a more in-depth look at the actual object design and code.
</p>
<blockquote>
In our last PHP Ad Tracker lesson, we constructed the database tables for our ad banner application. Now we are ready to construct the data object that will hold the variables and functions that will display, add, edit and delete the data in those tables.
</blockquote>
<p>
They cover each of the variables they'll be using with a summary of what they're used for as well as the various functions to be defined and what they'll return. Following this, they get into the actual development - creating an "ads" class and defining the methods to get the current ad count, get the number of clients and pull the actual client/ad data.
</p>]]></description>
      <pubDate>Wed, 08 Feb 2012 12:57:54 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Refulz.com: CakePHP evolves to 2.0]]></title>
      <guid>http://www.phpdeveloper.org/news/17517</guid>
      <link>http://www.phpdeveloper.org/news/17517</link>
      <description><![CDATA[<p>
On the Refulz.com blog there's a new post looking at <a href="http://php.refulz.com/cakephp-evolves-to-2/">some of the new features in CakePHP 2.0</a> including its use of lazy loading, the CakeEmail library and the new class loader.
</p>
<blockquote>
With CakePHP 2.0, they have dropped support for PHP 4 and have refactored the library code to make it strictly complaint with PHP 5.2+. Modeled on Ruby on Rails (RoR), CakePHP is a tough competition to Zend framework, Symfony and CodeIgniter.
</blockquote>
<p>
Besides the topics mentioned above, he also goes into the details of the new CakeRequest and CakeResponse models (to access information about teh current request/response). Summaries of all of the new functionality are provided along with some sample code where needed to illustrate.
</p>]]></description>
      <pubDate>Wed, 08 Feb 2012 11:15:43 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Ed Finkler's Blog: The MicroPHP Follow-up FAQ]]></title>
      <guid>http://www.phpdeveloper.org/news/17516</guid>
      <link>http://www.phpdeveloper.org/news/17516</link>
      <description><![CDATA[<p>
Following up from his (now infamous) <a href="http://phpdeveloper.org/news/17341">MicroPHP manifesto</a>, <i>Ed Finkler</i> has <a href="http://funkatron.com/posts/the-microphp-follow-up-faq.html">this new post</a> to his blog answering some of the common questions he's gotten about his beliefs.
</p>
<blockquote>
My previous post, <a href="http://funkatron.com/posts/the-microphp-manifesto.html">The MicroPHP Manifesto</a>, resulted in much excitement. In between fits of rage and crying, I found some time to answer folks questions, and also discuss the topic on the <a href="http://devhell.info/">/dev/hell podcast</a> with my cohost <A href="http://littlehart.net/">Chris Hartjes</a>. To summarize and address some of the common questions, I felt I should write a small FAQ.
</blockquote>
<p>Questions asked so far include:</p>
<ul>
<li>So you think full-stack frameworks suck?
<li>You need a large framework to enforce best practices!
<li>You should check out my microframework!
<li>How do you choose what gets listed in the <a href="http://microphp.org/code.html">MicroPHP code collection</a>?
<li>Why do you hate Rush?
</ul>
<p>
If you have a question you don't see listed, <a href="http://funkatron.com/contact.html">drop him a note</a> and he'll add to the post with more answers.
</p>]]></description>
      <pubDate>Wed, 08 Feb 2012 10:50:14 -0600</pubDate>
    </item>
  </channel>
</rss>

