skip to Main Content

I know it’s not always possible to exchange server-side implementation (e.g. PHP) with a client-side one (e.g. Javascript), but there are many cases in which it is possible (especially the layout stuff) and so I am looking for some study or resource that shows performance comparison between a PHP based implementation vs. Javascript based implementation of a web page (or website).

In particular, I am interested in e-commerce (shopping cart) implementation, since there seems to be two schools of thought in that regard (e.g. osCommerce/Zen-Cart camp vs. Magento/OpenCart camp).

Intuitively, it seems that Javascript based implementation moves processing power requirements to the client, thus distributing resource load and is scalable and best for shared web hosting. PHP, on the other hand, would be more suited for sites without much traffic or ones that have lots of host server processing power.

But this is all intuitive and it would be great to see some numbers or graphs showing performance differences as a function of hits, client’s browsing platform, bandwidth, etc.

Does a study like this exist?

2

Answers


  1. This isn’t really a question, more of a discussion. Please keep stack overflow to specific examples and questions only. There are tons of forums out there for this type of thing.

    To TRY and answer your thoughts; the two are completely different technologies, so a comparison is a moot point. If you have a shopping website, it’ll be running off PHP and a database anyway, so requests will always route through PHP to get the info you want regardless of whether it’s straight PHP or PHP with AJAX.

    Login or Signup to reply.
  2. I don’t know of a study addressing your question specifically but the following answer may help:

    jQuery vs. PHP – Performance Comparison

    “If 10^5 users are requesting this, you might see some difference when letting jQuery do this: everyone does it once (and doesn’t see the difference), but your server gets to do 10^5 checks less.”

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search