Re: Newbie Question

From: Date: Sun, 02 Jan 2011 18:25:08 +0000
Subject: Re: Newbie Question
References: 1 2 3 4 5 6 7 8  Groups: php.general 
Request: Send a blank email to php-general+get-310455@lists.php.net to get a copy of this message
On Jan 2, 2011, at 1:17 PM, Adam Richardson wrote: > > I tend to disagree with Ashley on this topic. For many websites, I'll start > out making all pages .php, even if they don't require PHP at the moment. > That's for a couple reasons. > > 1) A few years back, there was certainly a significant performance advantage > to keeping essentially static pages html. However, in my current > benchmarking (using both siege and ab on my Ubuntu servers using apache with > mod_php), if I use a cache such as APC and a well-configured apache server, > PHP tends to perform just as well (or sometimes even better) than the html > version. > > Rasmus has demonstrated similar performance results: > http://talks.php.net/show/froscon08/24 > > 2) I don't want to have to change urls site-wide and set up redirects from > the old url whenever a page requires adding dynamic capabilities. By making > all pages PHP right from the beginning, adding dynamic capabilities is a > snap as I just add the functionality. > > Adam I agree starting with all .php files is good practice for basic sites. I recommend for applications and bigger then basic project using a decent framework or main routing file to handle routes for you, instead of requiring you to manually adjust them if something changes. Regards, -Josh ____________________________________ Joshua Kehn | Josh.Kehn@gmail.com http://joshuakehn.com

« previous php.general (#310455) next »