0

Hi guys.

The thing is that I have some experience with other programing languishes like Java and C#. I recently got into php and java script.
The questions is when wold you prefer to use java script functions over php. For example say the random function. I'm aware of the disadvantage of java script that it can be turned off. But is there like a guide line like the browser processes java script faster or something like that?

Thank you for your time.

2
Contributors
2
Replies
6
Views
7 Years
Discussion Span
Last Post by JustmeVSI
0

Hi guys.

The thing is that I have some experience with other programing languishes like Java and C#. I recently got into php and java script.
The questions is when wold you prefer to use java script functions over php. For example say the random function. I'm aware of the disadvantage of java script that it can be turned off. But is there like a guide line like the browser processes java script faster or something like that?

Thank you for your time.

Generally many things should be faster with javascript, as it can do stuff without contacting the server, but you shouldn't rely on for anything that you want to
make sure is done, as it can be turned off, and also don't want to rely
on it to care about your security, like validating user input.

Even when you use php, you can use javascript for users convenience, with making
sure php is taking care of things that javascript misses.

I'd use javascript function for some math tutorial I guess:) though i even used it to make an interactive app - and i simply prevented users from seeing the app at all if javascript turned off

i think these 2 (js and php) complement each other, and syntax is not too different, so why not learn both?

my way was php first, as it can definitely can get things done, and js second, as an addition and enhancement

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.