Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jscript vs JavaScript 2

Status
Not open for further replies.

Codfish

Programmer
Apr 29, 2001
11
0
0
US
A simple question for you Java users:

Is there any significant difference between Jscript and JavaScript? I realize Jscript is Miscosoft and JavaScript is Sun, but is the implementation the same? I realize there is a good bit of difference from Java and J++, and J++ may be headed out to pasture, but what about the scripting versions?

I am looking to supplement my knowledge base with a 'hands on' understanding of 'J' scripting. Does it matter if I look at Miscrosoft or Sun?

Thanks for your opinions...
Cod
 
There is a long sermon behind this question. Here is the short answer.

JavaScript (originally called LiveScript but changed at the last minute for marketing reasons) is the product of Netscape, who is now (incidentally) affiliated with Sun. JavaScript has no relation to Sun's Java except the name and some shallow syntactical resemblences.

Meanwhile Microsoft has implemented JScript in its browser, (to stay competetive) and for the most part JavaScript and JScript are the same thing.

There are important differences, especially in how the two scripts implement DHTML. (I think I like JScript better) Not even the most knowledgable web developer could enumerate them all, and this has been a thorn in the web developing community's collective side for several years.

If you are a purist and don't want to take sides, call it ECMA Script. This is the universal standard for what JavaScript and/or JScript ougth to be.

I am not a Microsoft hater, their browser kicks Netscape's butt, but J++ was one of the more pathetic things to hit the computing world. It was basically Microsoft's challenge to Java.

Sun is very strict when people implement Java into their products, and since Microsoft wanted to introduce proprietary features into their version of Java, they had to call it something else. They chose J++.

The web development community was not fooled, and I think you're right, J++ has failed. Java just makes too much sense because it provides a universal development platform for the internet.

Okay, I'll get off my soapbox now.

Petey
 
Thanks Petey... Much appreciated.

Do you find the market leans more toward JavaScript or Jscript? Is Jscript more prevelent in intranet apps rather than internet apps? (that is Jscript paired with DHTML more often then JavaScript)



 
Microsoft's latest JScript kicks the butt of Netscape 4.7, but honestly, that's Netscape 3 years ago, with Javascript 1.3. Netscape 6 is now based on Javascript 1.5, which is totally integrated with DHTML, and almost completely EcmaScript-compliant.

Admittedly it was kind of crazy for them to totally scrap all their source and redo the browser based on Mozilla ( but now that it is nearing completion (yes, Netscape 6 is not complete Mozilla), it's implementation of Javascript is amazing, not just in performance, but in capability. Of course the design philosophy between Microsoft and Mozilla is a little evident: Microsoft gives you more of a high level API, with easy 'non-programmer' access to all kinds of functionality, while Mozilla is a little more low-level. You can do more serious programming tasks with Netscape, and it's fairly easy to build your own API to imitate the more high-level IE stuff.

has some good tutorials on this subject.

There is also a very interesting 1K DHTML API that is supposed to be completely cross-browser, even between version 4 browsers. (
By the way, there is a book just out which tries to do the impossible task you mention above. Wrox's Javascript Programmer's Reference. This is a nice thick book which tries to ennumerate the differences for every major browser and platform. See
 
Codfish - regarding your question about the market for JavaScript vs JScript, that is anybody's guess. Generally, nobody calls it JScript or ECMA Script, just JavaScript no matter which platform they're writing it on.

rycamor is rignt in that Netscape's new browser is compliant, but the truth is that few people actually use it because of it's tendency to crash the system it's running on.

In the short term, therefore, the ability to program JavaScript fluently in Internet Explorer is probably more valuable, but in the long term a solid knowledge of standards-compliant ECMA Script will pay off much more.

Petey
 
As I was saying, Netscape 6 is not a complete piece of software. It is actually based on Mozilla version 0.8, I believe. However, anyone who wants can go straight to and download Mozilla version 0.9, which is already MUCH smoother and faster than Netscape 6, and has not crashed my system once. Also, with Mozilla, you don't have to put up with all the AOL-style commercialism shouting at you.

I highly urge users to forget about Netscape and it's marketing-centered aproach to the browser and get your copy of Mozilla today.

And yes, petey is right; for the short term, IE-specific coding might bring you more immediate value, but as the variety of web-connected devices increases, we are finding more and more of them using DOM-compliant, EcmaScript-compliant third party browsers. Several of them are already using Mozilla's core rendering engine, which is available to all browser developers as an open-source project.

Yes, I have enjoyed making use of some of the "neat features" available in IE, but I find it only workable in an intranet setting, where the company specifies the same browser for every desktop. Microsoft keeps adding these proprietary features to its browser in the hope of driving users away from any other browsers, even to the point where Microsoft's own browser is sometimes not compatible with itself, as you can see with IE5 for Mac vs IE5 for Windows (hint: the version for Mac is more DOM-compliant). Am I the only one who finds this laughably ridiculous? Also, many of these clever features include BIG security holes, that have cost many corporations millions of dollars in computer downtime.
 
Another thing about JScript is that it is also a scripting engine along with VBScript for Windows Scripting Host and is a complete alternative to VBScript to script windows with it's FileSystem Object. Klae

You're only as good as your last answer!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top