Do you think Framework in php make faster?

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
pjcvijay
Forum Commoner
Posts: 25
Joined: Tue Sep 09, 2008 6:12 am

Do you think Framework in php make faster?

Post 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
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: Do you think Framework in php make faster?

Post 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.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Re: Do you think Framework in php make faster?

Post 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.
User avatar
kaisellgren
DevNet Resident
Posts: 1675
Joined: Sat Jan 07, 2006 5:52 am
Location: Lahti, Finland.

Re: Do you think Framework in php make faster?

Post 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 :)
Post Reply