PHP or Java Script?

RomeRome2

New Member
Messages
23
Reaction score
0
Points
0
It depends what you are going to be making/doing with your site.
 

FalseHope

Active Member
Messages
1,639
Reaction score
0
Points
36
Yeah I'm going to have to agree with RomeRome2 on this. It all depends on what you are doing.
 

sunils

New Member
Messages
2,266
Reaction score
0
Points
0
PHP comes under the category of server side script
and java script comes under the category of client side script.

I ask my students to use php when they want to do some operation on server and then display only the result to the client.
and javascipt when they want to do the operation on the client computer
 

sumitmehta

New Member
Messages
215
Reaction score
1
Points
0
As everybody said, it depends on what you want to do with it. I would suggest to use both of them. If your application is database oriented and needs a lot of server side scripting and validation, then you should be using php. But for client side processing, javascript is the best.

In fact for validation, i would suggest to provide both server and client side validation to your application to make your application more robust and secure from hackers.
 
Last edited:

bilal855

New Member
Messages
74
Reaction score
0
Points
0
Javascript - Easy To Use - Less Powerful And Less Functional.
PHP - Difficult To Use- More Powerful And More Functional


Decide Yourself Buddy
 

eliasr

Member
Messages
345
Reaction score
0
Points
16
It's hard to compare because they are so different.

PHP could be better compared with ASP o JSP... they are "server side".
 

AutoItKing

New Member
Messages
32
Reaction score
0
Points
0
If it's something fun and flashy, Java.
If I need to do some serious programming on a site I'm working on, I'll use PHP, always.

PHP is great, Java has a bunch of weird conventions and naming which I don't really like.
 

seven7htangent

New Member
Messages
6
Reaction score
0
Points
0
In my experience, it's always better to use server-side scripting, as you have better control over what the user will see client-side. If you're using JavaScript to accomplish something integral to content displaying correctly on the page, and the user happens to have JavaScript turned off, or has a slow computer, or a slow connexion, your whole site is lost on that user. Designers/developers themselves can be an especially difficult audience to reach when they inhabit the users' role, because they have even less patience than do 'regular' users for scripts that take a long time to process, or sites that rely too heavily on client-side scripting. Myself, if a page is having trouble running it's scripts, or if it seems the scripting isn't seamless enough, i'm gone.

Ultimately, as has been voiced by others here as well, PHP and JavaScript are suited to different applications. PHP is superb for database interfacing and content-management, whereas JavaScript is really the only alternative to Flash when it comes to user-interface interactivity...
 

Senjai

New Member
Messages
26
Reaction score
0
Points
0
PHP and Javascript are incomparable, one is server side, one is client side, most things in javascript can be done in php, not including some dynamic abilities, but form validation and stuff should be done in php over javascript, as javascript is clientside, users dont have to abide by what you code, they can turn off javascript and unless you account for that, you get a gaping security hole, so be careful. PHP validates the forms and stuff, PHP has ability to interface with mysql databases, PHP IS THE WAY TO GO!
 

jason.claude

New Member
Messages
7
Reaction score
0
Points
0
totally depends on what you want to do, i prefer php as everything is done on the server, while javascript depends on the user's browser, compatibility, and whether or not they have it disabled. I am also slightly biased as i have only ever realy used php and tend to stay away from javascript.
 

liadmz

New Member
Messages
1
Reaction score
0
Points
1
In the end you will have to use PHP\ASP (or HTML) to write your site...

Java itself can't replace it....
Edit:
By the way.. the PHP is much more flexible and with much more options
 
Last edited:

callumacrae

not alex mac
Community Support
Messages
5,257
Reaction score
97
Points
48
If you are making a form validation, you want javascript.
If you want a pop-up input box, you want javscript.
Otherwise, use PHP.
 

sonicpld

New Member
Messages
33
Reaction score
0
Points
0
PHP or JavaScript is like asking Tomatos or Monitor - which is berer :naughty:;)
 

Sohail

Active Member
Messages
3,055
Reaction score
0
Points
36
I would have to say PHP but they are both completely different code and they are used for different things so i don't know how you can say that one is better...
 

tittat

Active Member
Messages
2,478
Reaction score
1
Points
38
Even it depends what you are going to be making/doing with your site as RomeRome2 sais...PHP is better known for its powerful integration with the databases,especially with MYSQL.
 

networker

New Member
Messages
97
Reaction score
0
Points
0
And of couse don't confuse javascript with java,They are two
different languages.
Myself I rarely use javascript.Only when I have to,such as to open
a page in a new window or something.Only for essential client side
functions.
Javascript is very browser fickle.Thats why I can never fully
trust it.Theres a lot you can do with just css classs now anyway,
Although css can be fickle too.It appears just about anything client side can be.That's the problem.
 

VPmase

New Member
Messages
914
Reaction score
0
Points
0
I usually mix javascript and PHP together on my sites. I also use AJAX, the combonation of the two.
 

stocks

New Member
Messages
22
Reaction score
0
Points
0
For me the deciding factor is speed. If you need high speed on the server side use PHP. If you need high speed on the client side use JAVASCRIPT.
 

DeadBattery

Community Support Team
Community Support
Messages
4,018
Reaction score
120
Points
0
These are 2 completely different uses.
Plus I would classify this thread as a one-liner...
 
Top