PHP or Javascript?

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
150mph
Forum Newbie
Posts: 1
Joined: Tue Mar 22, 2011 7:57 pm

PHP or Javascript?

Post by 150mph »

Hi guys. First post. I'm non-programmer (graphic designer) who wants to hire a coder to create a photo gallery with slideshow and user comments for a niche social networking site and I'm looking for insight on whether PHP would be a better solution than Javascript. The more I read (PHP vs Javascript debates) the more I don't know which would be better for my purposes. The photo gallery with user-uploaded images is an integral part of the site and must work seamlessly with MySQL database.

If you're serving large images and lots of them, is there a reason you'd want client-side vs server-side? (Not too concerned about users disabling JS - they'll just have to enable it)

Are there limitations in scalability with either choice when I grow from a dozen to 1000 to 10,000 simultaneous users?

What are the questions I should be asking my programmer about a photo gallery project like this and what pitfalls might I need to plan on?

Does it really come down six of one, half dozen of the other - as far as performance and integration?

Thanks for your insight.


Some reference would be similar to this site (which I believe is JS with maybe some Flash):

http://jeffsullivan.smugmug.com/Landsca ... 9882_Urtot
User avatar
Jonah Bron
DevNet Master
Posts: 2764
Joined: Thu Mar 15, 2007 6:28 pm
Location: Redding, California

Re: PHP or Javascript?

Post by Jonah Bron »

The real question is "do I want to use Javascript". Sounds the same, but it's not. You don't have the option to "not" use PHP (or some other server-side language). You need PHP to interact with the database and upload pictures. Javascript just augments the infrastructure to improve the user experience.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: PHP or Javascript?

Post by califdon »

Yes. There is no practical alternative to PHP (other than a Microsoft equivalent if it is on a Microsoft server) and for professional results, you certainly need Javascript.
Post Reply