Nov 21, 2009
Pages: 1, 2

javascript vs java

free web hosting

Read Latest Entries..: (Post #12) by iGuest on Apr 15 2008, 05:51 AM.
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....
read more.
Read the FIRST post of this Topic. - Express your Opinion! Contribute Knowledge :-).

Open Discussion & Free Web Hosting > Computers & Tech > Programming > Scripting > JavaScript

javascript vs java

wannabeeaweak
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

Comment/Reply (w/o sign-up)

k22
I don't know Java, but i think that JS is too simple sometimes, because with Java or other Lang you can use more functions and Options....JS is a basic lang IMHo... wink.gif

Comment/Reply (w/o sign-up)

overture
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.

Comment/Reply (w/o sign-up)

jcguy
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.

Comment/Reply (w/o sign-up)

marijnnn
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!

Comment/Reply (w/o sign-up)

overture
"its meant to make apples".

Did you mean Applets? or are they the same things?

Comment/Reply (w/o sign-up)

marijnnn
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 -> programs
javascript -> scripts,

Comment/Reply (w/o sign-up)

k22
I read that the only problem with java is the speed, Java is slower than other lang and os is't use as Php or Asp, is it true?I have only tried JS and it's fast enough wink.gif

Comment/Reply (w/o sign-up)

marijnnn
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 directly
if 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.com
and 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 up
1) client side scripting:
javascript (netscape, universal) or JScript (made by microsoft, only IE). there's also vbscript, also by msoft, only IE
use java script: easy and more universal.

2) serverside scripting: jsp. very secure & fast. precompiled. for big-ass 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
cool.gif you don't: 1.php

3) 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

 

 

 


Comment/Reply (w/o sign-up)

FeedBacker
is it possible?
javascript vs java

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

Comment/Reply (w/o sign-up)

Latest Entries

iGuest
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.

Comment/Reply (w/o sign-up)

java-area
QUOTE(wannabeeaweak @ Sep 24 2004, 11:41 PM) *
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.

QUOTE
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!

Comment/Reply (w/o sign-up)


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

This textarea will convert to Rich-Text automatically (IE, Firefox, Chrome)

Pages: 1, 2
Similar Topics

Keywords : Javascript Java

  1. JavaScript: Hide And Show Any Element With CSS - From the simple way to the more advanced way (Javascript & CSS) (9)
    Welcome everyone, this is my first post. The first thing you need to know is... CSS
    has two special attributes, the first one is " display " and the second is " visibility ". The
    difference between these two goes like this. " display ": has many properties or values, but the
    ones we need are "none" and "block". "none" is like a hide value, and "block" is like show. If you
    use the "none" value you will totally hide what ever html tag you have applied this css style. If
    you use "block" you will see the html tag and it's content. very simple. " visibi...
  2. Getting Screen Resolution using Javascript. - (10)
    Is it possible to get the screen resolution of the users moniter using only javascript. No other
    external stuff, just pure javascript. I guess most of the people using JAVA for this. I also got
    some scripts regarding this which used SCREEN.WIDTH function or something, but they did not seem to
    work out. Any possible solutions. BTW, is it possible to get the resolution using PHP ( I guess it
    is not ) ......
  3. Javascript: Text To Texbox And Back To Text - (3)
    i need some help i want to create a thing where when some one double clicks a certain text it
    changes into a texbox where they can edit the text and the they double click and it changes into the
    test they just typed in. I have found this function in javascript that does some of it but i needs
    to be simplified CODE "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> Span to
    Text Box - Demo - DOM /* © John Davenport Scheuer */ function exchange(el){ var
    nodeI=el.parentNode, inputC=document.createElement('input'), text=el.innerHTML; el.style.f...
  4. Best Way To Learn Javascript - I would very much like to know. (11)
    Well, I know HTML, I know CSS, so the next step is learning Javascript. I have heard that it is sort
    of an easier way to do things than PHP, though I would very much like to learn PHP as well. So, I
    thought that if I learnt Javascript, I might find it easier to learn PHP when I get to that point.
    The problem though is actually finding out the best way to learn Javascript. I have been to
    websites and things, but every time I read through the tutorials and articles and things, I
    didn't learn anything. It when in one ear and out the other, you could say. So, that is wh...
  5. Vertical Marquee Using JavaScript - by The JavaScript Source (1)
    Hi, i find this script and hope that will be useful for somebody. Text scrolls from bottom to top,
    pauses, then scrolls up and out of view. A link can be added, opening in a new window. Configuration
    is simple. First copy the following code in a new file and name it vertical.js CODE /* This
    script and many more are available free online at The JavaScript Source ::
    http://javascript.internet.com Created by: Mike Hudson :: http://www.afrozeus.com */ /* To change
    the values in the setupLinks function below. You will notice there are two arrays for each of Titles
    and L...
  6. Javascript: Browser Detection Script - Detect your visitors browser (2)
    If you want to detect your visitors browser, sebd them a message and redirect them use this script:
    CODE var browserName=navigator.appName; if (browserName=="Netscape") { alert("Hi Netscape
    user!") window.location = "netscape.html" } else { if (browserName=="Microsoft Internet
    Explorer") {   alert("Hi Microsoft Internet Exlorer User!");   window.location = "MIE.html" }
      else   {    alert("What are you browsing with?");    window.location = "unkown.html"    } } //-->
    ...
  7. Javascript: Disable Mouse Right-click In Browser - (17)
    just copy and paste this on to your html site in the head tag CODE /* */ var message="Hey
    YOU!\nStop Stealing my pictures or\nFACE THE PUNISHMENT!" function click(e) { if (document.all)
    { if (event.button == 2) { alert(message); return false; } } if (document.layers) { if (e.which ==
    3) { alert(message); return false; } } } if (document.layers) {
    document.captureEvents(Event.MOUSEDOWN); } document.onmousedown=click; // --> ...
  8. Javascript Question - Vertical Scroll Box (6)
    Alright well I've been working and modifying this template for about a year now I think and
    I've started used JavaScript in it (bad to use templates I know, but I can't design them
    x_x). So I'm trying to put a vertical scroll box in my side events panel to save space, but it
    won't recognize the script. It takes the horizontal one I have as you can see if you look at
    the site, but not the vertical. Actually it won't take anything in that little panel. So my
    question really is, what could cause a javascript code to not work on a certain webpage ...
  9. JavaScript: Simple Dropdown Menu - Simple Dropdown Menu (5)
    This simple dropdown menu is flexible enough to be used in various ways. It can be placed and
    modified in the webpage as is....
  10. 12 Javascript Image Galleries - (0)
  11. I Need Help With Javascript. - help plz (7)
    Well, I want to learn to code in JavaScript, but when I try to view the page in Firefox, it
    dosen't work. Can anyone tell me why its not working? Do i need to use a different browser?...
  12. Include Function For Javascript - (7)
    I've been working on an include function for javascript. It works just fine in Firefox and IE,
    but for some reason, it doesn't result in the loading of the scripts for Safari. The code is as
    follows: CODE function include(url) {   // Include Guard   var scripts =
    document.getElementsByTagName("script");   for (var index = 0; index     if (scripts.src == url) {
          return;     }   }      // Inclusion   var head =
    document.getElementsByTagName("head").item(0);   var script =
    head.appendChild(document.createElement("script"));   script.type = "text/javascrip...
  13. JavaScript Frames & Querystring - (4)
    Hi, I actually want to create a HTML page which has the capablity of reading a QueryString
    (x.html?querystring=test) and then using a hidden frame pass on the data to an ASP Script on another
    server. For obtaining the QueryString i use the following:- CODE function
    getQueryVariable(variable) {   var query = window.location.search.substring(1);   var vars =
    query.split("&");   for (var i=0;i     var pair = vars .split("=");     if (pair == variable) {
          return pair ;     }   } }   alert( getQueryVariable("QueryString") ); Now my
    problem is to cre...
  14. Create And Import JavaScript Modules For A Large Script - (2)
    I have one main script which defines an object. I then have several other script files that define
    functions for that object. I have tried using the following setup to import the functions: HTML
    code snippet: Javascript code snippet: import Object.functionName; This works fine for
    Mozilla Firefox, but causes an error in Internet Explorer which causes the object to be undefined.
    I would like to know how better to import the functions into the main javascript (preferably without
    needing to add the module script to the html file) that works in both Firefox a...
  15. Ever Needs To Find Out A Table Height Or With With JavaScript - Well stop looking, here is the answer (CSS and JS) (2)
    Welcome everybody to this litle tutorial. by v.DragonEyE.n09 Introduction: Using
    javascript you can find the height and width of a table, cell, div, image, etc.. the more simple way
    is to ask for this... QUOTE id= "myElement" border= "0" cellpadding=
    "0" cellspacing= "0" style= " height : 300px ; width
    : 450px ; " > some
    fake text and images for the example some fak...
  16. How To Create A Popup Window With Javascript? - (19)
    Please help me! I want to in popup massage suggest to visitors of my site to make my site their home
    page . Please note that I have some script code that visitors most click on a text to make my site
    their home page . Every one that can help me please send an email to soleimanian@noavar.com...
  17. Add Text To Textarea - I suppose it uses DOM and JavaScript?? (6)
    I am working on a web "application" thing that allows you to click a button to add text to a
    textarea. Similar to this forum when you click the BOLD button and it puts in {b}{/b} with the
    square brackets. I want a similar function like that. Also, I want it to add wherever the cursor is,
    not at the end. And after adding the thing, the cursor should be in between the tag or whatever that
    was added. All the extra stuff are extra priorities. For now I would like to get something that
    inserts text on click. The thing I came up with is: HTML html > head > text/javasc...
  18. Javascript Changes Aren't Working. - (6)
    The link is where I got it from, the code is my attempt at changing it, which has the identical
    javascript, but it doesn't work. Can anyone fix it for me?
    http://code.google.com/edu/client/samples/dhtmltest.html CODE example body {font: 14px
    arial; color: #000066;} #mytext {position: absolute; top: 100px; left: 400px; font: 24px arial;
    font-weight: 900; } var texttop = 100; var textleft = 400; function vanish(flag) {     var myObj
    = new getObj('myText');     myObj.style.visibility = (flag) ? 'hidden' :
    'visible' } function m...
  19. Javascript Help Needed : Alert(z) Works Fine But Document.write Not - please (2)
    hi all, I am facing problem in my javascript, any kind of help would be apreciated CODE
    function basicFiles(){ //var Z = "";             for (i = 0; i                 var x =
    document.Form.regionlist.options .value;                 var y = document.Form.regionlist.options
    .text;                 var Z =  "regions" + " " + " = " + y + ", ";                 alert(Z);
                }                   } this works well but the following returns only errors CODE
    function basicFiles(){ //var Z = "";             for (i = 0; i                 var x =
    document.Form....
  20. Fun With Javascript And Forms - Lets have some fun with javascript! (2)
    I will post here every week with new and exciting things to do in javascript! After i finish 10 of
    them , ill do Ajax(real-time) - 1.Alerting and documenting Forms Ever seen those dynamic sites
    where if you hove your mouse or type something bad..etc , it popups up or dynamically gets written
    onto the page? Well i am here to teach or rather help with all that stuff! Step 1:Get notepad out
    and make a form CODE Text displays here: Step 2: Add the javascript Bit CODE
    function onKeyDown() { document.GetElementById('r').innerHTML=document....
  21. Problem With Javascript Alert(); - (9)
    Hi Everyone, i just need to know that this javascript code is formatted correctly: (A piece of
    code that it's written BESIDE an HTML code.) CODE My body contents |||Always keeps
    telling me that this was incorrect. ...
  22. Javascript: How Do I Create Embedded Pop-up Windows? - (7)
    The post title summarises my query - how do I create pop-up windows that are embedded inside a page?
    Broadly, there are two kinds of JavaScript pop-ups.. one is that ultra annoying one, which pops
    out a new instance of a browser window and displays something there (usually an ad) - made infamous
    by all the warez and porn sites. Second one, which has come to be quite well-known of late is the
    kind you see in recent versions of WordPress (in the Visual Editor) as well as LightBox based
    galleries. Here a small window (or rather a div) pops-up embedded in the middle of t...
  23. Javascript: Simple Slidedown Menu - Simple Slidedown Menu (2)
    This is a simple slidedown from the top menu. It can be placed on the Webpage as is. To modify it
    to a slideout menu, simply change the style and postion of the menu....
  24. Problems With Dynamically Loading Javascript - As well as dynamically inserting HTML (2)
    Hello, I have started to try to create a JavaScript application (or rather, AJAX, but the
    JavaScript is the part I'm having trouble with). I have come across a roadblock, though. I try
    to load an external JavaScript file by editing the innerHTML of a div tag to contain <script
    src="URL" type="text/javascript"> (with a real URL). The problem is that it is not loading. I have
    used FireBug to check the dynamic HTML status, I get the following (with code removed): CODE
    <script type="text/javascript"> <script src="source/main_login.js" typ...
  25. JavaScript Off Redirect Script - How to redirect a browser when Javascrip (2)
    Hi, here's a trick that will redirect a browser when JavaScript is turned off. Why not redirect
    the ones that have JavaScript? It's because less than 10% of browsers have JavaScript turned
    off; therefore, is better to redirect less than 10% of visitors than over 90%. Simply paste this
    code into the HEAD section of your HTML document. CODE /* Created by: Will Bontrager ::
    http://www.willmaster.com/ */ //--> Best regards,...
  26. Dynamicdrive: Good Site For JavaScript Codes - (5)
    If anyone needs Javascript codes or similar items for their web page a great place to go is
    http://www.dynamicdrive.com . They have hundreds of codes that are good. I would reccomend them for
    all your javascript needs....
  27. Calling Of Functions Between Mulitple External Javascript Files - How do I use an external script to call a function from another script (2)
    I have a page that requires many Javascript functions. In order to make the coding easier to read
    and edit, I decided to seperate them into 3 Javascript files. Two files will each do a specific job.
    One file will have the shared functions that both other 2 files will need to use. They are all
    linked to a page using three tags. The difficult part is that after the page calls a function in
    one of the special code files, that Javascript file will need to call the functions located in the
    common Javascript file. The file will call several functions, and it will an argumen...
  28. Downloads With Javascript? - (7)
    Hi! I want to let people download .mp3's. But i don't want them tio have to right-click and
    "Save as". Is there a way with Java Script? Cheers!' Jens...
  29. Unobtrusive Javascript Image Rollovers - really cool & useful.. (0)
    i find this really cool..gr8 piece of code. image rollovers Create image rollovers for your
    navigation without hardcoding any JavaScript into the HTML code on your Web pages. Easy to
    implement, even for beginners, and works across all browsers. Degrades nicely for visitors with
    JavaScript turned off. CODE img {border: none;} ul {list-style-type:none;} ul li
    {display:inline;} function isDefined(property) {   return (typeof property !=
    'undefined'); } var rolloverInitialized = false; function rolloverInit() {   if
    (!rolloverInitialized && isDe...
  30. Javascript: Help With Fetching Data From Webpages - (6)
    Hi guys, Am trying to come up with a Javascript function that can load a given URL and fetch
    part/whole of the web page and hand it over to my parser. Any ideas on how to do it ? One way I
    figured is to use XMLHttpRequest - but you need the server-end to respond by sending the required
    data to you in XML format. What if the page I want to extract data from is just an ordinary static
    page ... say I know the required data is a word that can be found at second paragraph of a page.. So
    how do I go about getting that page and extracting that info. Any help will be much...



Looking for javascript, java

See Also,

*SIMILAR VIDEOS*
Searching Video's for javascript, java
JavaScript:
Hide And
Show Any
Element With
CSS From the
simple way
to the more
advanced way
(Javascript
& CSS)
Getting
Screen
Resolution
using
Javascript.
Javascript:
Text To
Texbox And
Back To Text
Best Way To
Learn
Javascript I
would very
much like to
know.
Vertical
Marquee
Using
JavaScript
by The
JavaScript
Source
Javascript:
Browser
Detection
Script
Detect your
visitors
browser
Javascript:
Disable
Mouse
Right-click
In Browser
Javascript
Question
Vertical
Scroll Box
JavaScript:
Simple
Dropdown
Menu Simple
Dropdown
Menu
12
Javascript
Image
Galleries
I Need Help
With
Javascript.
help plz
Include
Function For
Javascript
JavaScript
Frames &
Querystring
Create And
Import
JavaScript
Modules For
A Large
Script
Ever Needs
To Find Out
A Table
Height Or
With With
JavaScript
Well stop
looking,
here is the
answer (CSS
and JS)
How To
Create A
Popup Window
With
Javascript?
Add Text To
Textarea I
suppose it
uses DOM and
JavaScript??
Javascript
Changes
Aren't
Working.
Javascript
Help Needed
: Alert(z)
Works Fine
But
Document.wri
te Not
please
Fun With
Javascript
And Forms
Lets have
some fun
with
javascript&#
33;
Problem With
Javascript
Alert();
Javascript:
How Do I
Create
Embedded
Pop-up
Windows?
Javascript:
Simple
Slidedown
Menu Simple
Slidedown
Menu
Problems
With
Dynamically
Loading
Javascript
As well as
dynamically
inserting
HTML
JavaScript
Off Redirect
Script How
to redirect
a browser
when
Javascrip
Dynamicdrive
: Good Site
For
JavaScript
Codes
Calling Of
Functions
Between
Mulitple
External
Javascript
Files How do
I use an
external
script to
call a
function
from another
script
Downloads
With
Javascript?
Unobtrusive
Javascript
Image
Rollovers
really cool
&
useful..
Javascript:
Help With
Fetching
Data From
Webpages
advertisement



javascript vs java

Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com