<?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, 04 Dec 2008 13:24:51 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHPImpact Blog: Improving the performance of Zend_Controller]]></title>
      <guid>http://www.phpdeveloper.org/news/10606</guid>
      <link>http://www.phpdeveloper.org/news/10606</link>
      <description><![CDATA[<p>
The PHP::Impact blog has a <a href="http://phpimpact.wordpress.com/2008/07/15/improving-the-performance-of-zend_controller/">quick performance tip</a> posted today for all of the Zend Framework-ers out there that are seeing some poor performance with their Zend_Controllers.
</p>
<blockquote>
Zend_Controller_Front gets an instance of Zend_Controller_Router_Rewrite, routes the request, iterates through all the provided routes and matches its definitions to the current request URI. The problem with this is that the more routes you add, the more time the router will take to find a positive match.
</blockquote>
<p>
<i>Federico</i> includes a few benchmarking stats to back this up ranging from four routes up to forty. His solution is to place the routes in different files and set the location with a Zend_Config_Ini object. This makes the controller only load the ones that are needed instead of pulling all forty into memory to have to parse through.
</p>]]></description>
      <pubDate>Tue, 15 Jul 2008 09:32:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[SaniSoft Blog:  The prefix automagic in CakePHP routing]]></title>
      <guid>http://www.phpdeveloper.org/news/9941</guid>
      <link>http://www.phpdeveloper.org/news/9941</link>
      <description><![CDATA[<p>
On the SaniSoft blog, <i>Tarique Sani</i> <a href="http://www.sanisoft.com/blog/2008/04/04/the-prefix-automagic-in-cakephp-routing/">talks briefly</a> about some of the prefix "automagic" that's already built in to the CakePHP framework's routing.
</p>
<blockquote>
There are times when you need more than just admin routing, how about something like http://blah.com/user/profiles/edit and http://blah.com/user/profiles/changepassword ? If this could be routed to an action like user_add and user_changepassword wouldn't it be great!! (eg: think ownership ACL checks)
</blockquote>
<p>
Good thing the CakePHP developers already planned for something like this - they included the connect() method for Router objects that maps the URL request to a method with that same prefix in the controller.
</p>]]></description>
      <pubDate>Wed, 09 Apr 2008 13:06:18 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[phpaddiction: Url Routing with PHP - Part Three]]></title>
      <guid>http://www.phpdeveloper.org/news/7625</guid>
      <link>http://www.phpdeveloper.org/news/7625</link>
      <description><![CDATA[<p>
phpaddiction has posted <a href="http://www.phpaddiction.com/tags/php/url-routing-with-php-part-three/">part three</a> of its URL Rewriting tutorial series today - the creation of the "C" (Controller) in MVC.
</p>
<blockquote>
In the final part of this series, I will build a functional modular front controller that can be easily adapted to small projects. It is basically the "C" in MVC for a simple MVC framework. If you haven't read the first two articles I recommend that you read over them first. <a href="http://www.phpaddiction.com/tags/axial/url-routing-with-php-part-one/">Url Routing with PHP - Part One</a> and <a href="http://www.phpaddiction.com/tags/php/url-routing-with-php-part-two/">Url Routing with PHP - Part Two</a>.
</blockquote>
<p>
They start with the base created before (with some slight modifications) and build up the dispatcher to handle their new requests and the controller to respond. In their example, when the Controller is called, it runs the execute() method and, based on the input, either calls another function or returns an error if it doesn't exist.
</p>]]></description>
      <pubDate>Mon, 16 Apr 2007 07:03:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[phpaddiction: Url Routing with PHP - Part Two]]></title>
      <guid>http://www.phpdeveloper.org/news/7574</guid>
      <link>http://www.phpdeveloper.org/news/7574</link>
      <description><![CDATA[<p>
On the phpaddiction site today, there's <a href="http://www.phpaddiction.com/tags/php/url-routing-with-php-part-two/">part two</a> of their tutorial looking at URL routing with PHP (started <A href="http://www.phpdeveloper.org/news/7532">here</a> in Part One).
</p>
<p>
With the foundation of the routing in place (from part one), they move on to bigger and better things:
<ul>
<li>assign responsibilities (what needs to be accomplished)
<li>creating a standard command object
<li>interpreting the URLs and the parameters passed in it
<li>using this information to dispatch the correct commands
</ul>
There's code examples through out to illustrate each point as well as one main one at the end to show how to put it all into action. Their script reads in the URL and sends the command along to the CommandDispatcher - check out <a href="http://examples.phpaddiction.com/urlrouter/part_2/">this example page</a> to see it in action.
</p>]]></description>
      <pubDate>Fri, 06 Apr 2007 08:41:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[phpaddiction: Url Routing with PHP - Part One]]></title>
      <guid>http://www.phpdeveloper.org/news/7532</guid>
      <link>http://www.phpdeveloper.org/news/7532</link>
      <description><![CDATA[<p>
The phpaddiction website has posted <a href="http://www.phpaddiction.com/tags/axial/url-routing-with-php-part-one/">the first part of a series</a> today covering URL routing with PHP (commonly used by frameworks to route requests through a centralized location.
</p>
<blockquote>
Most PHP frameworks use some variation of the front controller pattern to centralize common code and logic. There are advantages and disadvantages to this. I am going to ignore those for now. In fact the first part of this series will explore a simple procedural URL routing method that contains many of the disadvantages. In later articles we will build upon this basis and address the disadvantages.
</blockquote>
<p>
He walks through <a href="http://www.phpaddiction.com/tags/axial/url-routing-with-php-part-one/">the steps</a> to get things set up - working with mod_rewrite, creating the "entry point" for your application, and finally, how to execute a command based on the request's action.
</p>]]></description>
      <pubDate>Fri, 30 Mar 2007 08:12:00 -0500</pubDate>
    </item>
  </channel>
</rss>
