<?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 10:43:14 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Martin Sikora's Blog: Symfony 1.4 on shared webhosting]]></title>
      <guid>http://www.phpdeveloper.org/news/16521</guid>
      <link>http://www.phpdeveloper.org/news/16521</link>
      <description><![CDATA[<p>
On his blog <i>Martin Sikora</i> shares a solution that many a Symfony developer out there might find handy for <a href="http://www.martinsikora.com/symfony-1-4-on-shared-webhosting">running their application in a shared hosting environment</a>:
</p>
<blockquote>
Some time ago (actually when I was making this blog) I posted on <a href="http://www.stackoverflow.com/">stackoveflow.com</a> a question on <a href="http://stackoverflow.com/questions/2809778/symfony-on-virtual-host-document-root-problem">how to configure Symfony to run on shared webservers</a> where you can't change your website's document root. I solved it but forgot that I was asking and left it without any answer.
</blockquote>
<p>
The main problem is that the DOCUMENT_ROOT for the hosting service can't be changed by the users of the shared host. To solve this he modified his routing rules (sfPatternRouting class) and changed his .htaccess file to rewrite things over from just "/page" to "/web/page" instead. A simple solution, but it might be evasive if you've never configured it before.
</p>]]></description>
      <pubDate>Mon, 27 Jun 2011 11:07:36 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Basic's Blog: A hack for Zend Framework's translated route segments]]></title>
      <guid>http://www.phpdeveloper.org/news/16203</guid>
      <link>http://www.phpdeveloper.org/news/16203</link>
      <description><![CDATA[<p>
<i>Robert Basic</i> has put together a new post to his blog about <a href="http://robertbasic.com/blog/zend-frameworks-translated-route-segments-hack/">a hack he's found</a> for the <a href="http://framework.zend.com">Zend Framework</a> translated route segments when a "gotcha" popped up when he was trying to use them in a  multi-language website. 
</p>
<blockquote>
The web site's default locale, language, is English. If the user has no locale in the session/cookie, she, or he, will get the English version of the web site. [...] But! If the user's first visit is on the http://example.com/vesti URL ("vesti" is "news" in Serbian), the router can't route that because it depends on the locale and the default locale is English and not Serbian, thus directing the user to the 404 page.
</blockquote>
<p>
To get around this issue he created a front controller plugin that fires in the postDispatch hook to change the locale manually if the current request's isn't found to be English. It then redirects the user to the correct location for the new language and things proceed normally.
</p>]]></description>
      <pubDate>Fri, 15 Apr 2011 09:17:40 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: Chaining language with default route]]></title>
      <guid>http://www.phpdeveloper.org/news/14948</guid>
      <link>http://www.phpdeveloper.org/news/14948</link>
      <description><![CDATA[<p>
On the Zend Developer Zone there's <a href="http://devzone.zend.com/article/12381-Chaining-language-with-default-route">a new post</a> talking about including language information in your Zend Framework application's default route in a cleaner manner.
</p>
<blockquote>
There are several ways how to include language id in default route of Zend Framework. However, generally you end up with the solution not quite elegant and likely not totally trouble-free. I have seen people overwriting the default route by new one which mimics module route with additional language id. There is no need to throw the default module route away to do this. To get it right chain the plain language route with default route.
</blockquote>
<p>
He gives code examples of the routing code to put in your bootstrap that uses the <a href="http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.chain">Zend_Controller_Router_Route_Chain</a> and a plugin to handle the language checking and routing handling.
</p>]]></description>
      <pubDate>Thu, 12 Aug 2010 10:47:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Basic's Blog: Chaining routes in Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/13600</guid>
      <link>http://www.phpdeveloper.org/news/13600</link>
      <description><![CDATA[<p>
<i>Robert Basic</i> has <a href="http://robertbasic.com/blog/chaining-routes-in-zend-framework/">a quick new tutorial</a> about chaining routes in your Zend Framework applications:
</p>
<blockquote>
On a forum, there was a question today, about adding language "support" to the routes using <a href="http://framework.zend.com/">Zend Framework</a>. The guy wanted routes like /en/foo/bar or /de/baz. I wrote there an example for that using <a href="http://framework.zend.com/manual/en/zend.controller.router.html#zend.controller.router.routes.chain">Zend_Router_Routes_Chain</a>, so just posting that example here, too.
</blockquote>
<p>
Custom routing allows you to define routes specific to your application without having to change the core libraries. In his example, he shows how to set up the routing objects and how to add them to the request's chain.
</p>]]></description>
      <pubDate>Mon, 30 Nov 2009 12:04:28 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Robert Basic's Blog: Playing with Zend_Navigation and routes]]></title>
      <guid>http://www.phpdeveloper.org/news/13016</guid>
      <link>http://www.phpdeveloper.org/news/13016</link>
      <description><![CDATA[<p>
In <a href="http://robertbasic.com/blog/playing-with-zend_navigation-and-routes/">this new post</a> to his blog <i>Robert Basic</i> looks at the Zend_Navigation component of the Zend Framework and how it can be used to more correctly handle bad requests.
</p>
<blockquote>
I wanted to set up routes in such way that when a user requests a page, all requests for non-existing controllers/modules are directed to a specific controller (not the error controller). In other words, if we have controllers IndexController, FooController and PageController, anything but http://example.com/index and http://example.com/foo is directed to the PageController.
</blockquote>
<p>
Using the Zend_Controller_Router_Route_Regex component he creates an expression that matches anything but the two allowed controllers and pushes them back over to the "page" controller. The new route is put in place via an addRoute call. He also shows how to use the Zend_Navigation component to manage the navigation structure for this application, defining a PHP array of the nested sitemap if the site.
</p>]]></description>
      <pubDate>Mon, 10 Aug 2009 08:13:12 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jonathan Snook's Blog: Building a URL Shortener (with CakePHP)]]></title>
      <guid>http://www.phpdeveloper.org/news/12412</guid>
      <link>http://www.phpdeveloper.org/news/12412</link>
      <description><![CDATA[<p>
With recent discussions about URL shortners, <i>Jonathan Snook</i> decided to work up his own quick version using some of the built-in routing of the <a href="http://cakephp.org">CakePHP</a> framework.
</p>
<blockquote>
With all the talk of URL shortening services, I decided to add a quick service into Snook.ca, which is run on CakePHP, to redirect a short URL to a post. Because my static content already has short URLs and all I have are posts, creating a short URL handler for it was very easy.
</blockquote>
<p>
His shortener is used on his posts for his blog to redirect the smaller URLs back to the post they reference. The result is a route that connects something like "/s/id_number" over to the correct post (as seen <a href="http://snook.ca/s/1">here</a>). He also offers a suggestion for a "super-compressed" URL tat converts it down to a three-character shortened version that can then be easily converted back down to the decimal equivalent. 
</p>]]></description>
      <pubDate>Mon, 27 Apr 2009 12:06:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Jani Hartikainen's Blog: Improving Ajax performance in Zend Framework applications]]></title>
      <guid>http://www.phpdeveloper.org/news/12184</guid>
      <link>http://www.phpdeveloper.org/news/12184</link>
      <description><![CDATA[<p>
New on his blog <i>Jani Hartikainen</i> has <a href="http://codeutopia.net/blog/2009/03/23/improving-ajax-performance-in-zend-framework-applications/">posted a simple idea</a> that you can take to make sure you're getting the most out of your Ajax/Zend Framework connections.
</p>
<blockquote>
A common reason to use Ajax in a website is to make it feel faster, so you usually want Ajax requests be processed as quickly as possible. While there are <a href="http://framework.zend.com/manual/en/performance.html">many ways to speed up Zend Framework</a> based applications, there are still some things like routing and dispatching which still add up to the total. There is, however, another way to make Ajax work even faster
</blockquote>
<p>
Since Ajax requests don't usually require all of the complex routing and dispatching that a normal Zend Framework request might, he recommends creating a separate Ajax handler. His includes an example of a simple searching endpoint with a class handling the backend logic. A simple handler script loads up the bootstrap and makes the request for the search, returning the search results in a JSON format.
</p>]]></description>
      <pubDate>Mon, 23 Mar 2009 08:45:03 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Debuggable Blog: How To Save Half A Second On Every CakePHP Request]]></title>
      <guid>http://www.phpdeveloper.org/news/12038</guid>
      <link>http://www.phpdeveloper.org/news/12038</link>
      <description><![CDATA[<p>
CakePHP users might want to <a href="http://debuggable.com/posts/how-to-save-half-a-second-on-every-request-of-your-cakephp-app:49a69610-8648-4d65-815d-754c4834cda3">listen to this suggestion</a> from <i>Tim Koschutzki</i> on the Debuggable blog - he wants to help you save a half second on each request.
</p>
<blockquote>
There are several ways to improve the performance of your CakePHP application. [...] Any performance improvement that does not effect how data is retrieved, stored and cached is welcome. If it affects your entire site and not only parts of it, it's all the better.
</blockquote>
<p>
The performance boost comes in the form of an update to CakePHP's reverse route lookup functionality. Normally a lookup would have to be parsed and resolved back to their original location. They figured a bit faster way around it though - breaking the reverse routing feature for the sake of speed. The code for the hack is <A href="http://debuggable.com/posts/how-to-save-half-a-second-on-every-request-of-your-cakephp-app:49a69610-8648-4d65-815d-754c4834cda3">included in the post</a>.
</p>]]></description>
      <pubDate>Fri, 27 Feb 2009 12:09:51 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Symfony Blog: Cross Application Links]]></title>
      <guid>http://www.phpdeveloper.org/news/11985</guid>
      <link>http://www.phpdeveloper.org/news/11985</link>
      <description><![CDATA[<p>
<i>Fabien Potencier</i> has <a href="http://www.symfony-project.org/blog/2009/02/17/cross-application-links">recently posted a tutorial</a> over on the symfony blog about using cross-application links in your application:
</p>
<blockquote>
A symfony project is made of one or more applications. Applications share nothing, but the model classes. But, even if the symfony documentation is crystal clear on the subject, many developers want to share more than just the model. The most requested feature being the ability to create links to a frontend application from a backend one.
</blockquote>
<p>
This sort of linking is relatively simple in the 1.1 release of the framework - its instances of sfRoutingConfigHandler and sfPatternRouting that let you create the configuration classes (and code) to grab information and functionality from one application to another.
</p>]]></description>
      <pubDate>Thu, 19 Feb 2009 12:56:08 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Make Me Pulse: Using the Zend Framework URL rewriting]]></title>
      <guid>http://www.phpdeveloper.org/news/11743</guid>
      <link>http://www.phpdeveloper.org/news/11743</link>
      <description><![CDATA[<p>
New from the Make Me Pulse blog is <A href="http://blog.makemepulse.com/2009/01/15/using-the-zend-framework-url-rewriting/">this quick tutorial</a> about bending the URL rewriting that the Zend Framework does to match whatever your needs might be.
</p>
<blockquote>
Today for a good website's referencement in Google, it's necessary to have an URL rewriting. [...] If your application is based on ZF, we have a htaccess base file which will redirect all php files to the boostrap (<a href="http://framework.zend.com/docs/quickstart/create-a-bootstrap-file">what is the bootstrap ?</a>), and ZF classes will manage all redirection rules. How to implement the URL rewriting with ZF classes ?
</blockquote>
<p>
He sets up a config file (an ini file) with the routing instructions the framework will need to adhere to and shows how to get the application to include it and match against it for routing rules. His example sets a default route and several regular expression-based routes to remap requests right where they need to go.
</p>]]></description>
      <pubDate>Thu, 15 Jan 2009 07:55:15 -0600</pubDate>
    </item>
  </channel>
</rss>

