Jump to content
xisto Community
wannabeeaweak

javascript vs java

Recommended Posts

I have been learning Java for college, and it is pretty interesting (for me anyways), although you do have to do quite a bit of code to print out just a little piece of text, i think. You also require - to view your java - a compiler ot some sort, javascript does not so it has a great advantage over Java in this way. Javascript is so much easier, but you cannot really compare them they both have completely different purposes. You can use Java in websites i think, but it can make the website so very slow.

Share this post


Link to post
Share on other sites

Can you compare Javascript and Java? Although their names resemble each other, are they very similar languages to each other? I have the impression that both languages are very different from each other, so you cant really compare them fairly.

Share this post


Link to post
Share on other sites

javascript = script version of a small part of java.please people, do not confuse the two.java is a programming language. you can make programs that run on any computer that hase the java virtual machine installed. it's meant to make apples ( you know, the little games and stuff you find on the internet). javascript is, as the name says, a scripting language. it is not compiled but interpretted. it is used to do some simple things on websites, like popups, change values in forms and stuff. you cannot make a program that works on it's own by using javascript!!!if you're just interested in making sites there is no need for you to learn java, just learn javascript.the way it works is quite the same: if, while, variables... all the same. it's just that java has a lot more power & options. and is compiled!

Share this post


Link to post
Share on other sites

haha, indeed applets. applets are small programs that can be embedded in html pages. like videos. they have little or no interaction with the html. it's really seperate.java -> programsjavascript -> scripts,

Share this post


Link to post
Share on other sites

JS is different than javascript. javascript was made by netscape, JS by microsoft as an answer to javascript.java itself was made by sun and is a complete programming language, like vb, vb.net, c++.java is slower than vb c, for the obvious reason that it doesn't interact with the computer or os directly, but there is an extra layer between them, the java virtual machine. you can compare it to talking to someone of another country.when you know his language, you can just talk the language directlyif you don't, you have to use an extra person that translates everything for you, so it'll take more time.however, there are java compilers that will compile java into exe files that you can run without the virtual machine. those are faster, but the exe file will not work on all the computers.the coolest thing about java is that everyone, wether you are using a mac, linux, pc, solaris,... can install the java virtuall machine from java.sun.comand everybody can run your programs that you have written in java!so if you want to make a photo-editor for a mac-user, but you are on a linux machine, you could do it in java. it's the most universal programming language.there is an alternative to php & asp that uses java. it's called jsp: java servlet pages. it's a very secure & fast alternative to php & asp.net. problem is that only paid servers support it. you need a tomcat server.so, to sum it all up1) client side scripting:javascript (netscape, universal) or JScript (made by microsoft, only IE). there's also vbscript, also by msoft, only IEuse java script: easy and more universal.2) serverside scripting: jsp. very secure & fast. precompiled. for big-*bottom* companies that have their own webserver or can afford quite some money to pay for their webserver. better than php, but php has the advantage to be very cheap (free or cheap servers, easy to learn) and you'll find a lot of example code, tutorials,....so, if you have to make a choice for serverside scripting:a) you have money: 1. jsp, 2. asp.net, 3.php:) you don't: 1.php3) programming language: that's java. works on every machine in the world that has the java virtual machine installed, which is free at java.sun.com that's the big advantage: the programs you write can be used by everybody. but because of the extra layer, it's slower than other programming languages. but you can compile it for one machine, so it's faster. don't know about the speed then. i think it'll still be slower than c++ and c# and the likes

Share this post


Link to post
Share on other sites

in my opinion javascript is better then java becasue java requires more programing experecense then javascript and i think to that javascript is more reliable then java in some ways

I think these two languages are not comparable, because they are intended to different things:

JavaScript is a typical scripting language. JavaScript statements are executed into the browser on client side.

But Java is object-oriented language for server-based- and standalone- applications as well as for applets.

I agree that many statements in these languages look very similar, but they are used on different layers.

 

However, we can compare JavaScript implementation of business logic with JSP-based implementation, becouse we have sometimes the choice how to implement the busines logic - with JavaScript or with JSP!

For example, we can validate data on server side (using Java) as well as on client side (using JavaScript).

If we respect security, we need to validate data on server side only.

But for non-secure application, we can implement the similar bussines logic on client side, using JavaScript - this implementation will work quicklier. So, it is one of the ways to improve performance.

 

Is it possible to convert javascripts to java applets? is yes? how?

Applet is a Java application. So, every applet contains not only its own source code, but also uses classes from different Java packages (java.lang.* etc.)

Are we able to convert methods of Java classes into JavaScript functions???

Probably it is possible, but it is a very time-consumed job!

I think it is not good idea to re-use source code of applets in Javascripts. It is easier to create new scripts from scratch!

Edited by java-area (see edit history)

Share this post


Link to post
Share on other sites

java vs js

javascript vs java

 

Some people here are a bit confused..

 

 

 

Javascript is a client side browser scripting language where execution occurs on the client (Firefox). Java is an enterprise programming language used to build business applications. There should be no comparison between the two because they are totally different and have completely different uses.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.