java & java script

J

Jeremy Watts

hi,

excuse this naive question from a newbie, but i am wondering what the
differences are between 'java' and 'java script'.

i know that java script is a language thats embedded in the html of the
brouser and the clients machine then interprets that, so then is java a
compiled version of a program that resides on the server?


thanks
jeremy
 
M

Michael Borgwardt

Jeremy said:
excuse this naive question from a newbie, but i am wondering what the
differences are between 'java' and 'java script'.

The better question is: what do they have in common?
The answer: very little.

- The first four letters of their names
- Both are object oriented
- Both derive their syntax from C

And that's ALL.
 
A

Andrew Thompson

excuse this naive question from a newbie, but i am wondering what the
differences are between 'java' and 'java script'.

i know that java script is a language thats embedded in the html of the
brouser and the clients machine then interprets that, so then is java a
compiled version of a program that resides on the server?

Java is usually seen in browsers as Applets.

OTOH, Java does not need a browser, and can run
applications on any hardware that supports a
Java Virtual Machine.

Java can be used on the server to *generate* the web-site
using Java Server Pages or Servlets, it can also operate
as applications, on either the server or any Java enabled
client (read your PC or mine).

HTH
 
K

kaeli

excuse this naive question from a newbie, but i am wondering what the
differences are between 'java' and 'java script'.

They have very, very little in common.

'Javascript' is one word, not two. It is an implementation of a subset of
ECMAScript.

There is also JScript, Microsoft's proprietary version, often seen in ASP
pages.
i know that java script is a language thats embedded in the html of the
brouser and the clients machine then interprets that, so then is java a
compiled version of a program that resides on the server?

Java is an object oriented programming language. Like C++ and VisualBasic.
Javascript is a scripting language, like Perl. It has some objects and is
beginning to support the creation of user-defined objects, but it isn't a
full blown OOP language. Its main use is for DHTML. It has no use outside a
web context.

Java can run standalone console, standalone GUI, as an applet, as a server-
side scripting language (JSP), as a web service, and more.
Javascript runs in a client's browser. JScript runs in the browser (IE only)
or on the server (ASP).

Java has pretty much nothing to do with the browser, unless you're talking
applets. Javascript has pretty much everything to do with the browser, unless
you're talking ASP JScript.

If you are at all familiar with C++ (or C#), Java is much more like that than
like Javascript. Not syntax-wise - functionality wise.

--
 
H

Hal Rosser

The better question is: what do they have in common?
The answer: very little.

- The first four letters of their names
- Both are object oriented
********************************
***Actually - JavaScript is object-based - rather than object-oriented -
but they try
 
M

Michael Borgwardt

Hal said:
********************************
***Actually - JavaScript is object-based - rather than object-oriented -
but they try


"object-based" is not a technical term related to programming languages.
"object-oriented" is, and Javascript is most definitely object-oriented.
What you probably meant is that, unlike java, Javascript's object
orientation is prototype-based instead of class-based. But that doesn't
meant it's "less" object-oriented.
 
B

Brad

Java is an object oriented programming language. Like C++ and VisualBasic.
Javascript is a scripting language, like Perl. It has some objects and is
beginning to support the creation of user-defined objects, but it isn't a
full blown OOP language. Its main use is for DHTML. It has no use outside a
web context.

If you consider JScript the same as JavaScript, which I do, then you can
most certainly use it outside of a web context, such as with Windows
Scriping Host (WSH) to access the Windows Scripting object model, ActiveX
controls and COM objects and do a whole slew of things from very simple
console apps to complex systems administration and automation tasks. Other
applications can and do incorporate scripting hosts that utilize JavaScript
to script applications.

Furthermore, Microsoft has extended JScript with JScript.NET (the jsc
compiler is available with VS.NET 2003 Professional) to be a compiled fully
object-oriented language that supports programming to the .NET Framework for
a whole range of applications, although the IDE offers little or no support
for it.

I personally think, what's the point, what with VB, C#, J#, C++, etc. being
available already, but somebody probably finds it useful, maybe for ASP.NET
or something.
 
M

Michael Saunby

Brad said:
outside

If you consider JScript the same as JavaScript, which I do ......

Or even ECMAScript http://en.wikipedia.org/wiki/ECMAScript

From ECMA-262

<QUOTE>

Overview
This section contains a non-normative overview of the ECMAScript language.

ECMAScript is an object-oriented programming language for performing
computations and manipulating

computational objects within a host environment. ECMAScript as defined here
is not intended to be

computationally self-sufficient; indeed, there are no provisions in this
specification for input of external data

or output of computed results. Instead, it is expected that the
computational environment of an ECMAScript

program will provide not only the objects and other facilities described in
this specification but also certain

environment-specific host objects, whose description and behaviour are
beyond the scope of this specification

except to indicate that they may provide certain properties that can be
accessed and certain functions that can

be called from an ECMAScript program.

A scripting language is a programming language that is used to manipulate,
customise, and automate the

facilities of an existing system. In such systems, useful functionality is
already available through a user

interface, and the scripting language is a mechanism for exposing that
functionality to program control. In this

way, the existing system is said to provide a host environment of objects
and facilities, which completes the

capabilities of the scripting language. A scripting language is intended
for use by both professional and nonprofessional

programmers. To accommodate non-professional programmers, some aspects of
the language

may be somewhat less strict.

<END QUOTE>



Michael Saunby
 
M

Malcolm Dew-Jones

Jeremy Watts ([email protected]) wrote:
: hi,

: excuse this naive question from a newbie, but i am wondering what the
: differences are between 'java' and 'java script'.

: i know that java script is a language thats embedded in the html of the
: brouser and the clients machine then interprets that, so then is java a
: compiled version of a program that resides on the server?


Netscape made a nifty scripting language called Livescript, that
integrated with their browser.

Then Java became a "hot item", and so Netscape changed the name of
Livescript to Javascript to cache in on the hype. (I'm not kidding, it's
true.) Oh, and I don't say this due to any bias against Javascript,
personaly I rather like it, it's a nice variation on how things can be
done.
 
G

Grant Wagner

Malcolm said:
Then Java became a "hot item", and so Netscape changed the name of
Livescript to Javascript to cache in on the hype. (I'm not kidding, it's
true.)

I think this spin is a little unfair to Netscape. Netscape didn't
unilaterally change the name. Netscape and Sun both agreed to the name
change:

<url: http://wp.netscape.com/comprod/columns/techvision/innovators_be.html />

"Like all languages, it borrowed from others. LiveScript was the official
name it was given when it first shipped in beta releases of Netscape
Navigator 2.0 in September 1995, but we rechristened it JavaScript in a joint
announcement with Sun on December 4, 1995."

<url: http://wp.netscape.com/newsref/pr/newsrelease67.html />

"Netscape Communications Corporation (NASDAQ: NSCP) and Sun Microsystems,
Inc. (NASDAQ:SUNW), today announced JavaScript, an open, cross-platform
object scripting language for the creation and customization of applications
on enterprise networks and the Internet. The JavaScript language complements
Java, Sun's industry-leading object-oriented, cross-platform programming
language."

Given the press release text above, it seems that Sun was trying to benefit
from the name change as much as, if not more than, Netscape.


....Grant
 
M

Malcolm Dew-Jones

Grant Wagner ([email protected]) wrote:
: Malcolm Dew-Jones wrote:

: > Then Java became a "hot item", and so Netscape changed the name of
: > Livescript to Javascript to cache in on the hype. (I'm not kidding, it's
: > true.)

: I think this spin is a little unfair to Netscape. Netscape didn't
: unilaterally change the name. Netscape and Sun both agreed to the name
: change:

: <url: http://wp.netscape.com/comprod/columns/techvision/innovators_be.html />

: "Like all languages, it borrowed from others. LiveScript was the official
: name it was given when it first shipped in beta releases of Netscape
: Navigator 2.0 in September 1995, but we rechristened it JavaScript in a joint
: announcement with Sun on December 4, 1995."

: <url: http://wp.netscape.com/newsref/pr/newsrelease67.html />

: "Netscape Communications Corporation (NASDAQ: NSCP) and Sun Microsystems,
: Inc. (NASDAQ:SUNW), today announced JavaScript, an open, cross-platform
: object scripting language for the creation and customization of applications
: on enterprise networks and the Internet. The JavaScript language complements
: Java, Sun's industry-leading object-oriented, cross-platform programming
: language."

: Given the press release text above, it seems that Sun was trying to benefit
: from the name change as much as, if not more than, Netscape.

Interesting, I'll buy that.

The relation to the original question is stil the same, of course. The
name's are similar for marketing reasons, not because the languages are
related.
 
A

Andrew Thompson

(snip detail)
..it seems that Sun was trying to benefit
from the name change as much as, if not more than, Netscape.

...and a very poor choice it was, one that resulted in
untold confusion down the years, with lots more still
to come.

Ultimately though, I suspect it back-fired for both
Java and Javascript..

Every bad thing in either language (lack of security,
lack of availability, differences in implementation..)
seems carried over to and dumped on the other, as far
as end users and SysAdmins are concerned.
 
D

Dave Monroe

Jeremy Watts said:
hi,

excuse this naive question from a newbie, but i am wondering what the
differences are between 'java' and 'java script'.

i know that java script is a language thats embedded in the html of the
brouser and the clients machine then interprets that, so then is java a
compiled version of a program that resides on the server?

The 'java' part of javascript is terribly misleading.

There's an effort underway to rename it to ECMAscript.

The original name, however, seems to keep hanging around.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top