I want to make dynamic websites and for that I am learning PHP/MySQL. But some one told me that I should learn Javascript as well.
Is it really important, also, if I learn simple Java, whats the difference.
If you are webmaster you must know javascript.
Javascript is client side web language.
Most of the video pages like youtube use javascript. It makes the website lively. In fact without javascript you cannot watch youtube video.
Java is web development language based on OOPs concepts while javascript is client side scripting language for making web applications attractive and user friendly.JAVA is used to build web applications,desktop applications etc.Both are like North and South direction i.e different to each other. !-!
What is Javascript? Javascript is rightly called the language of the Web. Each newer browser version pushes the bar higher in terms of JavaScript execution speeds. This is an important performance parameter these days as sites make extensive use of JavaScript. JavaScript led the Web 2.0 revolution with AJAX. Using JavaScript, sites can send HTTP requests behind the scenes and customize or update certain sections of the site, tailored to a particular user's needs. This does away with complete page refreshes and makes the user interface a lot more powerful and user friendly.
Hello World of JavaScript
The Hello World example is almost customary to include when talking about programming languages. So here we go
<script>
dоcument.write("Hello, World!");
</script>
You can also pop alert boxes just as easily with:
<script>
dоcument.alert("Hello, World!");
</script>
Javascript is a scripting language used to make HTML dоcuments more dynamic.for web developer they should have knowledge of javascript also.
It's bater to know JavaScript. But as a new bies your learning flow must be this HTML & CSS --> PHP --> JavaScript --> others
I think it is the best flow.
More you know the better it is and thus for your development of websites you have to know PHP as well as java script.Javascript is a object oriented scripting language making it a powerful tool for development ,when you already know PHP it becomes very helpful for developers.
If you are a beginner just focus only on PHP and MYSQL. Once you are good in basic then you can start learning javascript which is also needed for making good dynamic website.
1.Php runs on server and the main function of php is to produce html code so that browser will easily read it where as javascript can handle only local task.
2.Php does not execute with in a browser window where as javascript execute with in a browser window.
3.MYSQL database is used commonly in Php, but its not compulsory to use MYSQL database in javascript.
4.Php can only combined with HTML while javascript can combine with HTML,XML and AJAX.
1. Php is embedded only with HTML but with not XML where as javascript can be combined with HTML,XML and AJAX.
2.PHP doesn't execute with in browser window where as javascripts execute with in browser window.
3. In php code will be available only after the server interprets its where as javascript code can be viewed even after the output is Interpreted.