JavaScript vs PHP





 So much confusion among new babies programmers. I have heard people talked so much about JavaScript and php. They often compared the two programming languages.

So today, I want to briefly explanation about their differences. I will talk what php can do and cannot do and also things programmer can do with JavaScript and can't do.

First, let's look at what JavaScript can do that php cannot do.

JavaScript is front end programming language, while php is band end programming language. The word front end meaning dealing with web ages off from server side.

A programmer can use JavaScript to build web page animations, styling web page and can even send input field content to php.




Things JavaScript can do;

  • Making animations
  • Styling pages
  • Sending form data to php
  • Fetching content from php
  • Making web page auto refresh


Things JavaScript cannot do;


  • Can't fetch content from server direct
  • Can't send form data to server direct

If a programmer use JavaScript, HTML and CSS to make a website, this kind of website can't submit anything to server because the developer did not use back end language.

Now let's look into the case of php. Php is a Powerful back end programming language (server side). On the web version of Facebook, those functions of making posting is carry out by php.





With php, a programmer can send information to database straight and can fetch user picture from database. 

Things php can do;

  • Sending form data to server
  • Fetching information from server


Things php cannot do;

  • Php can't be use to style web page
  • Php can't be use to make animations

Comments

Popular posts from this blog

How to Delete Record From Table Using PHP MySQL

Guide to add blog URL to Google search console

Best steps to master JavaScript programming language