What is the difference between Java and JavaScript? Also can you use plain Java programming within webpages or can JavaScript only be used?
What is the difference between Java and JavaScript
Collapse
X
-
Well as I learned. Java is object oriented programming, and Javascript is used to build more complex webpages (haven't tried using java script in webpages).
You cannot use JAVA in webpages, but you can use JAVA Applets and embed it on web pages. You create JAVA Applets in java, and embed it in web pages. -
for JavaScript no plugin or JVM is needed ... any modern browser supports JavaScript out of the box ... even though there are differences in the implementation where IE mostly differs from all others since it uses its own ECMA script implementation JScript. The user might have disabled JavaScript in the browser ... so it could be that the code wouldn't run ... so in case you want to rely on it you would need a fallback. JavaScript allows you to create modern and desktop-like webpages today by using AJAX ... a technique that basically allows you to make asynchronous requests to the server and to update small or bigger parts of a webpage by using DOM methods. There are a lot of Libs/frameworks out there that provide widgets like grids, trees and provide animation/effects for them. It is much to prefer to use JavaScript instead of any other plugin-requiring techniques ... since a plugin requires an installation while JavaScript doesn't. The only real thing that cannot be done well with JavaScript today is to create images/charts ... while even this point will become less important when browsers will support canvas in the future with HTML 5.Comment
-
So it seems like AJAX is better than JavaScript, as the browser might have JavaScript turned off?
Can AJAX do everything that JavaScript does, also how do you start using AJAX in your webpage (i.e. do you add it in <script> tags contained in the html header of the page?Comment
-
Java is a programming language in which we can create console applications, windows applications, web applications and mobile applications.
And
Javascript is a client-side scripting language used in web programming.
In this many of the authentications are done on the client machine itself rather than going to the server for those processing.
This helps the server from overburdening of requests made by client.Comment
Comment