NYCPHP Meetup

NYPHP.org

[nycphp-talk] Many pages: one script

inforequest 1j0lkq002 at sneakemail.com
Mon Aug 6 18:41:45 EDT 2007


Hans Zaunere lists-at-zaunere.com |nyphp dev/internal group use| wrote:

>Jon Baer wrote on Sunday, August 05, 2007 9:19 PM:
>  
>
>>I have to say that after spending a long time w/ Dynamo / Tomcat /
>>Struts and mod_rewrite that eventually I got down to learning the
>>routing mechanism of frameworks (MVC) and find it to be extremely
>>flexible and very well thought out + could easily replicate a servlet
>>URI request setup.    
>>
>>http://manual.cakephp.org/chapter/configuration
>>
>>    
>>
>http://framework.zend.com/manual/en/zend.controller.router.html#zend.control
>ler.router.usage
>
>
>I think there is a distinction to make here, however.
>
>There are two parts to the URL
>routing/handling/SEO-friendly-URL-of-the-month/etc game:
>
>1: getting the web server to relax it's by-default strict mapping of the URL
>space to the filesystem, and then passing whatever the request was down to
>the processing language
>
>2: programming mechanisms in the processing language to intelligently deal
>with whatever URL it gets from the web server
>
>In PHP at least, these are two different things.  At some point there was
>interest in apache_hooks, but it unfortunately never matured.
>
>In other technologies, #1 equates more to the processing language reaching
>up and grabbing what it needs from the server, and then taking over.  In
>PHP, however, it's certainly a "top-down" approach.
>
>For #1, most frameworks, and the two mentioned above, prefer the use
>mod_rewrite.  Then they each have their own mechanism to handle #2, with
>some arguably being worse than others.
>
>There's also fundamental differences in the way #1 can be handled.
>Rewriting is a very different thing than aliasing a handler or set of URLs
>to a single URL or processor.
>
>The later is more elegant - and more flexible - avoiding mucking with obtuse
>rewrite conditions and rules that require a testing cycle and often depend
>on a fixed set of extensions to ignore.
>
>---
>Hans Zaunere / President / New York PHP
>    www.nyphp.org  /  www.nyphp.com
>
>  
>
I follow you, Hans, but then what about URLs as resource locators? Your 
elegant "aliasing a handler or set of URLs to a single URL or processor" 
means URLs don't equate to (unique) information resources. Doesn't that 
"break" the web?

-=john andrews

-- 
-------------------------------------------------------------
Your web server traffic log file is the most important source of web business information available. Do you know where your logs are right now? Do you know who else has access to your log files? When they were last archived? Where those archives are? --John Andrews Competitive Webmaster and SEO Blogging at http://www.johnon.com




More information about the talk mailing list