PHP Classes

PHP parsing of requests is a GOOD thing

Recommend this page to a friend!

      PHP Classes blog  >  4 Reasons Why All PHP...  >  All threads  >  PHP parsing of requests is a GOOD thing  >  (Un) Subscribe thread alerts  
Subject:PHP parsing of requests is a GOOD thing
Summary:I disagree with point #4
Messages:2
Author:Vanduir Volpato Maia
Date:2014-02-05 10:29:08
Update:2014-02-05 22:39:42
 

  1. PHP parsing of requests is a GOOD thing   Reply   Report abuse  
Picture of Vanduir Volpato Maia Vanduir Volpato Maia - 2014-02-05 21:32:55
I disagree with point #4. Frameworks need to make things practical. You can't just add something and tell the user to go change the settings on a GUI.

Even when reconfiguring via PHP is possible, doing so is dangerous and might make a PHP-illiterate user with his site offline without knowing what to do.

Besides, frameworks need to assume that web server configuration might not always be modifiable by the user, and even when modifiable it might not be modifiable without a GUI. So you NEED a PHP-based solution anyway and adding a solution that relies on server configuration iss to much trouble for it's worth when you could be working on a caching engine instead.

  2. Re: PHP parsing of requests is a GOOD thing   Reply   Report abuse  
Picture of Manuel Lemos Manuel Lemos - 2014-02-05 22:39:42 - In reply to message 1 from Vanduir Volpato Maia
Nobody suggested changing settings on a GUI. You can just change .htaccess for Apache to define mod_rewrite configurations and have it route requests to the right script.

Even mod_rewrite, it is only necessary if you cannot change Apache settings to allow non .php scripts to be run as PHP.

For instance in PHPClasses URLs like this are handled by single PHP script without mod_rewrite or front-controllers.

/blog/post/226-4-Reasons-Why-All-PHP-Frameworks-Suck.html

Of course some things only work this way when you use Apache. But that is what Rasmus is saying, frameworks want to make things flexible for settings that do not change at the runtime, like the Web server or the database server. That flexibility imposes a cost and is worth nothing for most developers.