<?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 11:37:02 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Sameer Borate's Blog: Building a simple Parser and Lexer in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/17142</guid>
      <link>http://www.phpdeveloper.org/news/17142</link>
      <description><![CDATA[<p>
In a new post to his blog <i>Sameer Borate</i> shows how to <a href="http://www.codediesel.com/php/building-a-simple-parser-and-lexer-in-php/">create a lexer and parser</a> in PHP to work directly with the tokens of a PHP script.
</p>
<blockquote>
After looking around for a while [for a good resource on compilers] I settled for Terence Parr's <a href="http://www.amazon.com/Language-Implementation-Patterns-Domain-Specific-Programming/dp/193435645X/">Language Implementation Patterns</a>. This is exactly what I needed - bit sized patterns on compiler and parser design with working code. The book provides a recipe style approach, gradually moving from simple to complex compiler/parser design issues. As I primarily work with PHP, I thought of porting some code to PHP to see how it works.
</blockquote>
<p>
He shows examples <a href="http://www.codediesel.com/downloads/lexer-parser">using his custom tool</a> to show a basic lexer output for a list and a complete listing of the code involved. Ultimately, though, he finds that PHP isn't overly suited to the task - anything more than his simple example could be more trouble than it's worth.
</p>]]></description>
      <pubDate>Thu, 17 Nov 2011 11:57:59 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SitePoint PHP Blog: Sophisticated Object Iterators in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16301</guid>
      <link>http://www.phpdeveloper.org/news/16301</link>
      <description><![CDATA[<p>
Following up on their earlier <a href="http://phpdeveloper.org/news/16267">simple object iterators</a> post, the SitePoint PHP blog is back with a look at <a href="http://blogs.sitepoint.com/php-object-iterators/">more sophisticated iterators</a> you can use to work with database record objects.
</p>
<blockquote>
In my previous post, <a href="http://blogs.sitepoint.com/php-simple-object-iterators">Simple Object Iterators in PHP</a>, we discovered how to iterate over array items defined within an object using a <a href="http://php.net/manual/en/control-structures.foreach.php">foreach loop</a>. However, what if you need to iterate over items which are not stored in an array, e.g. records from a database or lines of text read from a file?
</blockquote>
<p>
He shows how to create a script that pulls in the users from a database object (PDO, in this case) and implements the Countable and Iterator interfaces. These interfaces give it some special methods that can give counts of the results and help you iterate through the results - current, rewind, next and valid. 
</p>]]></description>
      <pubDate>Thu, 05 May 2011 12:54:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jeremy Brown's Blog: 3 Tenets for Implementing a REST API]]></title>
      <guid>http://www.phpdeveloper.org/news/16066</guid>
      <link>http://www.phpdeveloper.org/news/16066</link>
      <description><![CDATA[<p>
<i>Jeremy Brown</i>, after working tirelessly on a REST API based around the Zend Framework (and a few other technologies), has come up with his <a href="http://www.notmessenger.com/rest/3-tenets-for-implementing-a-rest-api/">three tenets for implementing a REST API</a> to hopefully help you along the straight and narrow path that he forged himself.
</p>
<blockquote>
In the course of performing my duties at my day job I recently came across the need for our data to be accessible via an API. After researching the various types available, I settled on developing a REST API. The selection process wasn't the interesting part of this exercise though. Actually implementing a REST API is what was.
</blockquote>
<p>
His advice ranges from the general to very specific, sharing tips on how to most effectively create the service's API:
</p>
<ul>
<li>REST is a set of principles (and not a specification)
<li>Do not use custom media types
<li>Represent the headers in the response payload
</ul>]]></description>
      <pubDate>Fri, 18 Mar 2011 09:17:05 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Matt Williams' Blog: Implementing oAuth Twitter with CodeIgniter]]></title>
      <guid>http://www.phpdeveloper.org/news/15025</guid>
      <link>http://www.phpdeveloper.org/news/15025</link>
      <description><![CDATA[<p>
On his blog today <i>Matt Williams</i> has <a href="http://www.mattwillo.co.uk/blog/2010-08-25/implementing-oauth-twitter-with-code-igniter/">a quick tutorial</a> about setting up your CodeIgniter application to use the new oAuth authentication feature that <a href="http://twitter.com">Twitter</a> with the help of <a href="http://www.haughin.com/code/twitter">this library</a>.
</p>
<blockquote>
On August 31st Twitter will be axing basic auth GET requests, which is being overtaken by the more secure oAuth, there are a few tutorials out there on how to use oAuth and how to get started creating an app with CodeIgniter, but not many with actually helpful advice so here is my 2 penneth.
</blockquote>
<p>
<a href="http://www.haughin.com/code/twitter">The library</a> makes it simple to connect to the Twitter servers with your key/token combination and run a check against the credentials via a simple "oauth()" method call. Sample code is included in the post to make implementing easier.
</p>]]></description>
      <pubDate>Thu, 26 Aug 2010 12:18:43 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Aaron McGowan's Blog: Five things I wish PHP would implement (or had) & would change]]></title>
      <guid>http://www.phpdeveloper.org/news/14300</guid>
      <link>http://www.phpdeveloper.org/news/14300</link>
      <description><![CDATA[<p>
<i>Aaron McGowan</i> has posted his list of five things he <a href="http://www.amcgowan.ca/blog/computer-science/programming-computer-science/five-things-i-wish-php-would-implement-or-had-would-change/">wishes PHP could change</a> (or even had) in future versions of the language.
</p>
<blockquote>
Recently I have been hard at work trying to finish up a few major source packages and one application - but I have recently found myself thinking about how much better and more "grown" up PHP would be if it had a few things that other technologies such as C++ and C# have.
</blockquote>
<p>The five things on his list are:</p>
<ul>
<li>Operator Overloading
<li>Method and function Overloading
<li>Advancement of Namespaces
<li>Use of final keyword for class member variables
<li>'Getters' & 'Setters' similar to C#'s for class member variables
</ul>
<p>
Each point comes with a summary and a bit of code to show what he's talking about. He sees these things as major steps in PHP "growing up" and as features that could help it make a translation over from things like .NET simpler.
</p>]]></description>
      <pubDate>Mon, 05 Apr 2010 14:50:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: Integrating Source Control Into Your Projects]]></title>
      <guid>http://www.phpdeveloper.org/news/13723</guid>
      <link>http://www.phpdeveloper.org/news/13723</link>
      <description><![CDATA[<p>
<i>Brandon Savage</i> <a href="http://www.brandonsavage.net/integrating-source-control-into-your-projects/">as a suggestion</a> for anyone doing any kind of development work - use source/version control in your development, you'll be thankful later.
</p>
<blockquote>
If you ask most developers about source control, they'll agree that it's a wise thing to use. They'll insist that they think it's important. But yet, why are so many companies out there still not using source control in their projects? A good number of companies that I've worked with failed to make use of source control, resulting in issues that would have been trivial otherwise. In this article we'll explore ways to make sure that if your company isn't using source control, that you can help make a change to this policy.
</blockquote>
<p>
He makes a few suggestions about implementing version control in your environment (it doesn't need to come from the top), how it's best put in place before a crisis and how the real person that might need the convincing could be your fellow cowrokers.
</p>]]></description>
      <pubDate>Thu, 24 Dec 2009 10:13:20 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Joe Topjian's Blog: My Zend_Acl Implementation]]></title>
      <guid>http://www.phpdeveloper.org/news/12023</guid>
      <link>http://www.phpdeveloper.org/news/12023</link>
      <description><![CDATA[<p>
In <a href="http://joe.topjian.net/development/my-zend_acl-implementation.html">this recent post</a> to his blog <i>Joe Topjian</i> takes a look at something that has been known to confuse Zend Framework users when trying to set up access control for their application - using the <a href="http://framework.zend.com/manual/en/zend.acl.html">Zend_Acl</a> component.
</p>
<blockquote>
It seems everyone, myself included, has a bit of a hard time first grasping <a href="http://framework.zend.com/manual/en/zend.acl.html">Zend_Acl</a>. For the time being, I've settled on a simple solution. It's party based on the solution given in the <a href="http://www.manning.com/allen/">Zend Framework in Action book</a>. I hope you get some use out of it.
</blockquote>
<p>
<a href="http://joe.topjian.net/development/my-zend_acl-implementation.html">His example</a> uses the Zend_Config component to configure his roles and a more centralized approach to validating access for the users - more rules in the INI config file and a custom MyACL class/AclHelper tat are called from the bootstrap file to evaluate where the user can and cant go for each request.
</p>]]></description>
      <pubDate>Wed, 25 Feb 2009 13:45:43 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Observer pattern in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12012</guid>
      <link>http://www.phpdeveloper.org/news/12012</link>
      <description><![CDATA[<p>
On the Zend Developer Zone there's a <a href="http://devzone.zend.com/article/4284-Observer-pattern-in-PHP">new tutorial</a> posted about the Observer pattern (one of many <a href="http://en.wikipedia.org/wiki/Design_pattern_(computer_science)">design patterns</a>) and how it can help you create code using an event-driven programming style.
</p>
<blockquote>
What exactly is an observer pattern ?  All the theory is accessible on <a href="http://en.wikipedia.org/wiki/Observer_pattern">Wikipedia</a>. Basically we have an object you want to monitor ( observe ) for any changes. Most of the time this object just fires out events and we want to listen to them. We can have more objects observing one or more other objects so basically this can be M:N relationship
</blockquote>
<p>
He compares them to triggers in the database world - bits of code that are activated when something changes on an object. His example implements an interface (IObservable) to set/get an email address and validate it with a regular expression. When the setEmailAddress method is used and the validate method is called, the observer kicks into action and checks to ensure the value is correct.
</p>]]></description>
      <pubDate>Tue, 24 Feb 2009 12:08:32 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Timothy Boronczyk's Blog: Evil Access (a Database Class)]]></title>
      <guid>http://www.phpdeveloper.org/news/11787</guid>
      <link>http://www.phpdeveloper.org/news/11787</link>
      <description><![CDATA[<p>
<i>Timothy Boronczyk</i> has <a href="http://zaemis.blogspot.com/2009/01/database-access.html">posted a class</a> that provides a different sort of theory on database access:
</p>
<blockquote>
I was thinking today about database APIs when inspiration struck. I ended up hacking out the following class, which I think demonstrates a rather interesting approach to interfacing with a database (interesting enough at least to post here).
</blockquote>
<p>
His class implements an Iterator and lets you bend a few of the rules PHP normally has in place (use of the magic methods, special characters in an identifier). He also includes an example of its use - connecting to the database, selecting information and pulling that information back out.
</p>]]></description>
      <pubDate>Wed, 21 Jan 2009 21:34:04 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Brandon Savage's Blog: Picking The Right Tools For The Job ]]></title>
      <guid>http://www.phpdeveloper.org/news/11734</guid>
      <link>http://www.phpdeveloper.org/news/11734</link>
      <description><![CDATA[<p>
<i>Brandon Savage</i> has <a href="http://www.brandonsavage.net/entry/picking-the-right-tools-for-the-job.html">made a few suggestions</a> that can help you with one of the most important parts of any development project - picking the right tool for the job.
</p>
<blockquote>
You'd never dig a drainage ditch with a pitchfork, or plug a drywall hole with chewing gum. Instead, you'd pick an appropriate tool and you'd use it to accomplish the job (a shovel, or some spackle, for example). So why do software engineers often spend so much time fixing problems with the wrong tools at hand?
</blockquote>
<p>
He includes three common issues and ways you can overcome/stay away from them:
</p>
<ul>
<li>Lack of knowledge regarding available tools.
<li>Inability to implement solutions due to lack of resources.
<li>Unwillingness to implement a solution.
</ul>
<p>
Of the three, the last one is possibly the most scary - don't let personal feelings or your dedication to Tool X be your undoing and hurt your application in the long run.
</p>]]></description>
      <pubDate>Tue, 13 Jan 2009 17:59:28 -0600</pubDate>
    </item>
  </channel>
</rss>

