Page 1 of 1
Do you think Framework in php make faster?
Posted: Tue Jan 20, 2009 7:21 am
by pjcvijay
I found php frameworks uses php code to generate html contents dynamically, which takes extra time to process php codes in server. If we use html in client side, rather than processed by server, I think I will give a good performance. Is there any way to solve this problem? Do you think anyother? pls. tell me know.
Thanks in advance,
Vijay
Re: Do you think Framework in php make faster?
Posted: Tue Jan 20, 2009 7:36 am
by onion2k
pjcvijay wrote:Is there any way to solve this problem?
What problem?
If your website is slow it's not PHP's fault, nor is it the fault of a framework (if you used one of the well-tested popular ones like Cake, Symphony or Zend). Dynamic content is fine. Sites like Facebook that serve
billions of pages generate all the content dynamically.
There are some things that take a long time to generate and caching to static HTML can help with, but that's
always due to processing lots of data rather than anything to do with the code itself.
Re: Do you think Framework in php make faster?
Posted: Tue Jan 20, 2009 7:46 am
by Chris Corbyn
The generation of the HTML must be done on the server side, since that's where the data on which it's modeled exists (probably).
Like onion2k says, there are ways to scale cleanly if demand is high. Use a reverse proxy to cache static content, use a write-through cache on the server so that your generated HTML is cached for as long as it can be, and use clusters (clouds) to spread the work.
Usually, generating the HTML will be the least of your worries though... that part should be trivial.
Re: Do you think Framework in php make faster?
Posted: Thu Jan 22, 2009 7:14 pm
by kaisellgren
Chris Corbyn wrote:The generation of the HTML must be done on the server side, since that's where the data on which it's modeled exists (probably).
Not necessarily. Too bad I do not have the project bookmarked, but I tried a JavaScript of around 10 kB that built beautiful CSS layouts dynamically. It supported themes, too. So all I had to do was to output a little JS text of 5 lines (plus src="script.js") and since the browser caches the JS include it is quite cool. Client side processing will increase though.
If you did not get, you pass the data as an array to the JS lib
