Netscape and Sun announce JavaScript (1995)
web.archive.org
web.archive.org
As long as this stays in the browser, and is not also used server-side, I don't think there's much to worry about. Since it's designed to be Java like, I suspect most developers would opt to use server-side Java, and this in browser. This probably won't change.
It’s only $50,000 but surely everyone making real web apps can afford that. It’s a rounding error compared to what you’re paying Sun for your server hardware.
I looked at PHP/FI for my own homepage before, but it's really nothing more than a rudimentary template language, a slightly more powerful version of httpd's Server Side Includes. Rasmus (the developer) seems to be quite happy with keeping it simple. Perhaps you'll be lucky and he'll change his mind and convert it to a full scripting language. Heh, maybe we'll even get two frustrated undergrad students who hate Perl to rewrite the parser so they can use it to write their computer science project. Maybe you'll even be very lucky and somebody will decide to write a popular system for writing web journals in PHP/FI that would take over the world (but how many people would be so self-absorbed as to maintain a web journal anyway).
And you still don't have the database and hardware side covered. PHP/FI seems to support mSQL. mSQL is cheap for commercial use, but still not free, and it doesn't even support JOINs! And you also need a server. You also need a server. httpd used to be cool, but NCSA is no longer maintaining that. There's a serious of patches running around, so you could just run a patchy version of httpd, but how far will that take you? Next you need a proper OS to run that thing on, but while we're all waiting for GNU Hurd, there's a guy from Finland who made a free *nix OS that's been gaining quite some traction recently. These Scandinavian guys are full of surprises. Maybe you'll be lucky again and there's yet another guy in Finland waiting to unleash a free software SQL database with joins, who knows.
I don't know if you've heard of CPAN - it was introduced less than 2 months ago (October '95) and it's fantastic: you can browse and download modules off the world-wide web without hunting down tarballs on obscure FTP servers! The number of Perl modules on CPAN is growing daily! Any functionality a webmaster may want can be achieved using Perl CGI scripts - I highly recommend the latest CGI.pm (v2) whixhbyou can get from CPAN
[outside of kayfabe, Java was really first released in May 1995, only a few months before this press release, and was mostly used for applets and desktop applications (building a web browser!) - server side usage came a while later]
It looks like this is exactly what they intend to do at some point. From the article:
> A server-side JavaScript script might pull data out of a relational database and format it in HTML on the fly.
I don't see how this would work, tbh.
I’ve been playing around with this new language called Python. The indenting syntax takes a little getting used to, but the code is way more readable than Perl. Just be sure to set indent-tabs-mode: nil if you use Emacs.
JavaScript is obviously meant as a glue language. Component-based programming is quickly replacing binary files as the method of deployment with technologies like CORBA and COM (the base technology for OLE 2.0). Java Applets are Java's answer to portable, client-side UI component. But in order to integrate them with a static web page or with each other you need some glue code, and this is where JavaScript stands: write reusable components that unleash the full power of Java, and tie them up together using JavaScript glue code.
I expect that in the near future Sun will introduce a server-side component model to accompany Java applets. It'd be cool if they use some coffee-related name for that, idk, maybe Java Beans? This is going to revolutionize servers and everybody is going to throw away their cgi-bin/ folder with hacky perl scripts and move to components. Think about it! Instead of writing your own code, you can wire up mature components developed, each developed by an industry leader:
- Advanced Forms Applet by Microsoft - Server components for converting submitted forms into Excel spreadsheets, also by Microsoft - Database client developed by Oracle - Automatic stock ticker from Bloomberg - Integrated website search from Lycos - News applet from CNN
Sun is graciously aware of the great danger posed by the first company on this list, but in their great foresight they are going to define generic interfaces for every common type of component, and insert clauses into their license that will allow them to sue companies which try to extend these interfaces in an anti-competitive manner. Now, if you want to switch from Excel to Lotus 1-2-3 or from Oracle to Sybase or Informix you're also free to do so. The same goes for your OS, as all Java components are fully platform-independent. This is truly the future!
But why create a new language just for the browser? It clearly makes more sense to use Java in both the server and the browser. We could write little Java applications inside the browser; say we call them "applets"?
I'm kind of breaking the immersion here, but I'm quite sure at some point Netscape was selling a Javascript powered web server.
1. http://www.java.sun.com/products/archive/hotjava/index.html
I saw that link elsewhere in this thread after my reply, and I also thought that this might have been what was being referred to.
Then to get interactive content; you just pipe the content of each page to the pita daemon using UNIX sockets and write the output to a file descriptor in the /dev/screen directory (just compile and mount the "interactive-wp" filesystem on /dev/screen first, of course).
The only gotcha is to ensure compatibility between these components, but someone shared a compatibility matrix on IRC a while ago, Sio it's common knowledge at this point.
Really these companies "innovations" are a joke.
JavaScript is a scripting language and therefore much easier to use. No slow compilation and build step, no complex and rigid type system yelling at you, no dependency hell. Just type the code in notepad and press f5 in the browser to see it run. You dont need to understand advanced concepts like classes or packages or exceptions. It is as simple to write as an Excel macro.
Java on the other hand requires professional programmers, which are a lot more expensive than web designers, and less fun.
You mean those graphic design people who try to make the whole page as a GIF, like they're making a print brochure, and just don't get hypertext?
Don't worry, they'll clue in or get left behind.
The power of a global distributed hypertext for free sharing of information is so superior that it can't be subverted.
The Internet sees these advertising-type designers as damage, and routes around them.
> Don't worry, they'll clue in or get left behind.
Time traveler here. People with this same mentality are still working in 2023, but instead of making the whole page an image, they're making the whole page a "web app". Almost three decades later, they still don't get hypertext.
There are already scripting languages available. Why not just use something like Tcl which is lightweight and easily embeddable? Why re-invent the wheel?
That (marketing) worked out pretty well. At least for me it took years to figure out what kind of language Javascript really was. Seeing jQuery for the first time was kind of revelation.
[1] https://auth0.com/blog/a-brief-history-of-javascript/ [2] https://2ality.com/2011/03/javascript-how-it-all-began.html
This just begs the question: why are there already multiple scripting languages available.
And this further begs the question: why are people still "re-inventing" the wheel by building new languages?
"There was once a dream that was Rome. You could only whisper it. Anything more than a whisper and it would vanish, it was so fragile. And I fear that it will not survive the winter."
Sounds like I can blame whoever translated to English in a 1581 text of Aristotle’s Prior Analytics, the wrong usage of “beg”.
At the same time, I intend to use the phrase correctly in the future!
Anyone arguing that you can't use words to mean what they obviously mean and that everyone takes them to mean, but instead must only use them to refer to obscure logical fallacies is clearly nuts and should be ignored.
These kinds of dual usages come up pretty often, but in that spectrum I find this one very interesting because it is somehow very good at scratching some sort of intellectual/elitist itch in all of us. Both usages are fine, but one is more rare (but not too rare) and "came first" so is ostensibly more "correct." Which makes it very satisfying to bring up in these kinds of conversations :-)
I hope Microsoft comes up with something like it, so we are not forced to learn java in order to add scripts to html pages.
Surely this will avoid a lot of mistakes when switcing between the two languages.
It sounds like pure Java will get us part of the way there thanks to applets – which are also supported in Netscape 2.0 – but JavaScript gives much more control of the whole page. I played with it in an early beta when it was called LiveScript and wrote a crossword puzzle that didn’t need to reload the page at all. Amazing! Now if I can write the backend part in Java and have it work the same way…
I can’t wait for the Java and JavaScript syntaxes to unite and make web page development simpler. Netscape and Sun HQs are just a handful of miles apart, so come on folks, don’t drag it out! Could we get this before the end of the year?
1) Introducing scripting to the web can introduce security concerns, but this is the wrong way to think about interconnected systems. By far the greater security concern is trust models built over anonymous connections. When you can eliminate anonymity or the security implications therein most of the security issues that arise from the availability of scripting are like wise mitigated.
2) The greatest difference between JavaScript and Java is that Java will force OOP on you, in JavaScript functions are first-class citizens, and the scope model is always lexical. I abhor OOP and completely avoid the ambiguity of inheritance and keyword pronouns when writing JavaScript. Always choose composition over inheritance. When I see people intentionally do otherwise I immediately assume they have no idea what they are doing.
This, when read using 2023 political correctness caused me to have to wipe coffee off of my laptop screen. I'm picturing HR paying me a visit because my last commit misgendered the Person object.
That sounds more like a marketing stunt to me.
> A server-side JavaScript script might pull data out of a relational database and format it in HTML on the fly.
They must be joking. Who runs a server in a browser?
Lisp is so obviously the future of the web, so this seems like a backward step to me.
Well, MDL has < > conses and ( ) conses. These have a different type tag, but are otherwise identical. MDL uses that to give the two different semantics, situationally.
As this has no relevance for serving and requesting pure documents there will be no need for us to use a java-script capable web browser if all we want is to read websites.
Source: I was there
I'm here from the future to tell you there's never been much difference between an app UI and a document.
> Adding scripting to it could cause security problem
Everyone eventually gets their shit together after witnessing the catasrophically bad security issues caused by idiots desperately avoiding javascript with even worse ideas and implementations.
The web is what we make it. If we want apps running in browsers (say, email clients) then that's what the web will become.
Now do the Netscape open sources Mozilla announcement on /.
You're all making me remember what it was like to delve into the weird and wonderful world of httpd, perl cgi-bin, and Slackware 3. (My first Linux!! I kept wondering why the system was so aggressive because it said it wanted to bash me for making mistakes: "bash: syntax error"!)
I have fond memories of working on Sony Broadcast's Linux-based digital interactive TV servers in London. Then packing everything up and transporting it to Amsterdam for IBC 1999 (I think?). Setting everything up was a real slog, but I got to see a trade show spring up from a bare floor into an amazing variety of booths. The construction was crazy complex and I'm astounded that it came together in time.
Thank you all, from this old dude, for the huge nostalgia trip :)
Back in the day, some of us were programming snobs. Personally guilty of making comments downplaying the value of HTML and JavaScript.
Quick look at bank account says no.
Something I didn’t know was a consideration in the original spec of JavaScript: some sort of Java applet interop. I really thought the name was just a nod to it being a curly-brace object-y language! Does anyone know what that looked like? I know of <object> to embed applets into the document, which you could pass arguments to via attributes set by JavaScript, but the wording in this doc sounds like JavaScript could somehow use Java object instances?
Here you go: https://docs.oracle.com/javase/tutorial/deployment/applet/in...
I remember using it to implement hardware key security for a website. A Java Applet loaded a JNI library, after exploiting a JRE security bug to escape confinement, which interacted with the hardware key. The JavaScript then handled all the "browsery" stuff like setting cookies.
That was in 2001...
this video shows netplay between tabs but i also tested it on a lan in a house (physically moving between computers): https://www.youtube.com/watch?v=vcwPOfVXRc0
https://github.com/fuz/jspkmne
the java applet: https://github.com/fuz/jspkmnengine/blob/master/JSPKMNe.html...
netplay code that Java applet calls: https://github.com/fuz/jspkmnengine/blob/master/netplay.js
here's the java applet calling the Javascript of the game: https://github.com/fuz/jspkmnengine/blob/master/server/Clien...
https://github.com/fuz/jspkmnengine is the correct URL to the repository.
Am I reading this correctly meaning you send a "some_variable_that_i_know_about=deleteAll()" via Javascript and it will just run `deleteAll()` method on a Java applet that has god knows what access it has to things on your machine?
The early web boom was wild.
<applet> was never removed from HTML, but it was deprecated by HTML4.01 - but only because they wanted to use <object> as a single replacement element: https://www.w3.org/TR/html401/struct/objects.html#h-13.4
Looks like <applet> was officially obsoleted sometime during the switch from HTML4.01 to the Living Specification version: https://html.spec.whatwg.org/multipage/obsolete.html#other-e... - but the spec still permits using <object> or <embed> for Java applets: https://html.spec.whatwg.org/multipage/iframe-embed-object.h...
That fact it could be used equally for components written in other languages, if they were ever supported by object tags in common web UAs is why it had a more generic name initially.
Sweet summer child ;)
At first, people weren't worried about security. It was just a bunch of us nerds on there. You interacted with real people that didn't seem like they were trying to swindle you. The world still used paper checks for anything big, and credit/debit cards were there, but not like today. It wasn't that uncommon to write a check and ask the shop owner to cash it next week, at least in my poor household.
There wasn't "online banking" or "online identities" to steal, so it didn't seem all that important. The worst thing that would happen is you would lose access to a chat handle.
The result was a "zero-touch" installation, with seamless login experience. It was a really crazy time.
How many dialog prompts are there to launch signed downloaded exe?
The first example is quite illustrative I think. You’d call custom methods on a Java applet the way you call DOM methods on a div.
Invoking JavaScript Code From an Applet - https://docs.oracle.com/javase/tutorial/deployment/applet/in...
It depended on a bit of other libraries installed (the live connect specification which really meant "just Netscape" - https://www.oracle.com/java/technologies/javase/plugin2.html... ).
This is exactly what we do with server-side rendering today, huh. So the originally intended uses of JavaScript included servers too.
> Java programs and JavaScript scripts are designed to run on both clients and servers, with JavaScript scripts used to modify the properties and behavior of Java objects
This, not quite so.
Modules written in JavaScript and run on the server were called AppLogics (bad name, IMO).
> This, not quite so.
Well, technically, one can (and often does) use Javascript to send an asynchronous request to a server that -when programmed using a Java based framework- will probably modify the properties of one or more Java objects, i.e., some entity, etc.
I suspect Java applets fell out of fashion because they could only manipulate a rectangular area of the screen and not the DOM. Did the DOM even exist in 1995?
So in the end it was security nightmare.
Jobs finally killed it, by declining to support Java on iPhones. So from that point it was doomed.
WASM is part of the browser. Browser vendors figured out how to keep their browsers evergreen. You don't need to install anything, it just works. It works on iPhones.
So, yes, idea was the same, but implementation was actually good and supported by everyone.
It's also not the fact that users rejected the idea of apps that are restricted to a rectangle inside the web browser - after all, Flash and even ActiveX (to a limited degree) managed to churn out popular apps running inside a (badly) sandboxed rectangle. Some of the popular use cases (e.g. games) did not die, and are now faithfully served by WASM. Rectangle-constrained applets are obviously not good for every use case, but Java applets failed to succeed even at the places where Flash shined later.
Looking back, I think what killed Java applets was that they were just slow, ugly, hard to interact with and had bad developer experience. Developing HTML pages was easy - just a change/reload cycle. The same goes for cgi-bin scripts. Java applets required compilation, packaging and then testing, at the time when automated building tools were not there. IDEs with RAD designers that tried to improve the experience did come, but at least most Java IDEs I tried back then were quite cumbersome to use compared to incumbent native RAD tools like Delphi or Visual Basic.
In addition to that, Java applet support was initially spotty during the browser wars, and features such as JAR files and different JDK 1.1 (and later JDK 1.2) APIs were not evenly supported across Netscape Navigator and Internet Explorer[1]: https://www.infoworld.com/article/2076251/applets--still-ess...
And then there's the slowness and ugliness. You really only had AWT available for your UI and graphics, and it sucked. It was ugly, buggy and slow. In theory, it shouldn't have been so, but the technology just wasn't ready and just wasn't mature enough.
I think Flash was so wildly successful because it took an entirely different (and less ambitious) route at the beginning. Flash started as a multimedia player with user-friendly authoring tools. They later added ActionScript and Flash itself become the RAD tool that could penetrate the web frontend.
I remember just sitting around looking at these Java Applets loading whole applications. While Flash games were snappy.
The moment you hit some webpage and it shows you a Java Applet loading bar you knew the website was useless basically.
I think this had quite a bit to with Java and the way it implemented UIs. Also just serving a whole bunch of unnecessary stuff. To be fair this eventually became an issue with JS as well, but not the the same degree compared to the network speed.
Flash loaded quickly and seamlessly, but otherwise had all the same problems.
Some info about the LAYER API (which Netscape eventually killed, as the MS/W3C DOM prevailed):
http://web.archive.org/web/19971015223701/http://developer.n...
Also, a DOM compatibility guide can be found here:
Remember that even after JS was released it still took many years until it became fast enough to use for big applications. If I'm not wrong, Google Chrome was made partly with the explicit goal to have super fast JS.
Also no the DOM did not exist until 1998.
While the limited facilities provided in the first generation of JavaScript and JScript for detecting events and manipulating HTML elements eventually came to be known as "DOM Level 0", it wasn't until 1998 that the first DOM specification was published. Source: https://en.wikipedia.org/wiki/Document_Object_Model
Of course when one's chosen tech is too new, and/or moving faster than the book publishing process then one is stuck with Stack Overflow, random blog posts and insufferable YouTube vids. Which all also go out of date within a year.
How long have you been in the industry?
They don't make a lot of sense now, reference material is generally kept in electronic form, often online not locally, both because it saves resources (paper, space to store it) and because things change and online content is so much easier & cheaper to keep up to date. That and things change faster ATM in most tech fields.
But think back to the late 90s when many, even devs, had little more than a slow and expensive (per-minute phone call costs) dial-up connection that blocked other calls while active, and having a local resource that you could flick through to find details makes a lot more sense. Also not having convenient easily portable devices with which to store and read the information makes a huge difference. Even if you did have a laptop it was bulky and the screen was not particularly nice to read from. Heck, desktop screens were headache inducing compared to modern kit (imagine a goldfish-bowl like CRT, 14" diagonal, less because you shrunk the display to avoid the really rounded bit at the edge, 15" if you were lucky, 17" if you were rich, displaying at 640×480 or maybe 800×600 resolution (maybe 1280×1024, again: if rich), in 16 or 256 colour depth so no font smoothing, with a pretty low refresh rate) making reading the information from the book much more pleasant even if you did have a local online copy at your fingertips.
Those books tended to have three parts and you weren't expected to read them all cover to cover:
1. Fundamentals, which you would probably read fully unless you had a fair amount of relevant experience of similar languages/environments in which case you'd skim to pick out the key differences.
2. Specific parts in detail, which you would read some sections of but ignore others until you needed them later. This might include worked examples of using common parts of the standard library and so forth.
3. Reference detail. This might be half the book or more, maybe two thirds in some cases. This you would not read as such, you would use it like a dictionary or mini-encyclopedia. That is the part that makes least sense in the modern world.
If you want a really extreme example: I had a copy of the the MS's C/C++ compiler, the full documentation for included a printed reference to the Windows API of the time (Win 3.x era). IIRC that stack of books, piled on the floor, came up to noticeably more than half my height. The vast majority of that was tools and API reference material, though small chunks were intended for more end-to-end reading.
The huge books did seem to hang around beyond their really useful period. I don't think I bought a dead tree like that as late as 2010, so your “about 10 years ago” is probably when they were well past prime. Even in their prime there were some really terrible examples (poor tutorial sections, reference sections that were out of date before they were even published, and full of errors on top of that).
CGI.pm was king.
It's also worth pointing out that being able to skim comprehensive, reference-style documentation to get a general overview of a technology without getting bogged down in irrelevant-for-present-purposes detail is a useful skill to learn.
“As the art of reading (after a certain stage in one’s education) is the art of skipping, so the art of being wise is the art of knowing what to overlook.”
— William James[1]
[1] https://archive.org/details/theprinciplesofp00jameuoft/page/...
The framework obstacle course for developers took off. My particular path through it was POJS, YUI-ext, EXTJS, Dojo, jQuery, Backbone, Angular, React - probably about 2 years each give or take.
Uh, I did, in 1999. My parents would drive me to Barnes and Nobles and I sat there and read the definitive guide cover to cover.
First, Sun should really have implemented its own browser. They basically already had something that shared most of what a modern browser can do when they did NeWS. Basically NeWS that loads postscript over the internet is most of what a modern browser does. Sun should really have done its own browser, rather then do the deal with Netscape.
Second, Sun had developed Self and made it really fast. It shares a lot with Java Script and would have served perfectly fine in that roll. But instead it took 15-20 years until some of the same people who worked on Self and later Strongtalk to make JS fast at Google. Java Script could have been fast as soon as it came out if it was based on Self, rather then scripted together in a few weeks by Netscape.
I think Sun systematically messed up with the whole software division staring in the 80s and got worse in the 90s. Amazing things like NeWS were kill, tons of bad ideas were adopted that around Java/Corba that were clunky.
> HotJava (later called HotJava Browser to distinguish it from HotJava Views) was a modular, extensible web browser from Sun Microsystems implemented in Java.
Are you saying they should have added JavaScript to their Java based browser?
That browser didn't last long, and was terrible.
James Gosling tells stories of how hard it was and what it took to get basic demos running and then a little later its a product.
Implementing the browser itself in Java isn't a great idea, specially in the 90s.
Sun, like many of the other Unix vendors of the time, wanted not only to invent the new world but to fully own and charge for it. Self only got open sourced long after it was of any interest or relevancy, NeWS never was, and the OpenLook stuff generally only got really "open" after Motif "standardized" (itself a joke since it never got actually used outside of proprietary-land) and it wasn't until well into the 21st century that the JDK became properly open sourced.
But in fact the relative openness of Java at the time it was launched seemed like a bright spot in this, and in part this was why it was so ascendant through the 90s.
BTW I like Self, but I actually don't think it would have made a good JS-equivalent in a document browser. It really is, like Smalltalk, something that wants to rebuild the whole world in its image, and not much of a "glue" language, like JS was initially pitched as.
I think Self could be made into that, it just a challenge of API and how its integrated. And at the end of the day you want to have a full featured language fully integrated anyway, as JS basically became overtime.
What it doesn't share with JavaScript is the C and Java-like syntax.
They didn't want to risk yet another Lisp and Smalltalk disaster where something far superior was created and then almost nobody used it.
But even so, even with 'C' syntax Java Script wasn't used much for a while.
Then they got excited about Java and renamed it which confused generations of programmers.
No one understood the power of JavaScript when it first came out. For example at first hardly anyone understood Closures, and the full power of JavaScript being a functional language.
And when Google made Google Maps which was dynamic unlike MapQuest it was a revelation and influenced so many people in what JavaScript (and the web) could do.
> complementary to and integrated with Java
Was this ever true around the time, and if so was it ever really used? I know that now we have a couple of JS implementations on the JVM, like Nashorn, that would represent some level of integration (you could call JVM methods from JS) but the idea that Javascript was "integrated with" Java back in 1995 sounds a little far-fetched.
If one of its original use-cases was to facilitate some kind of browser/applet integration then fair enough. But in the linked article there are only vague references to this that sound a bit weird or confused, like "the scripts would glue together an assortment of Java applets" or like "JavaScript will allow us to easily create personalized applets for the Excite service".
I found some docs @ Oracle from ~2013 that demonstrate calling some applet methods, but I can't tell if that is a later addition or was present from the start: https://docs.oracle.com/javase/tutorial/deployment/applet/in...
edit: looks like Bill Joy himself said "JavaScript will be the most effective method to connect HTML-based content to Java applets" in the article, but I'm still curious how deep this connection is, or if it's just hand-wavy "our new tech is great and I have to tie it to another currently-popular tech somehow"
Anyway, I’m your age so I’m not 100% sure either but my understanding is that applets, for quite a while, were considered the software delivery platform of the future. Just open a webpage and get an entire end-user program running right there, no downloading or installing, nothing. It turned Netscape into something of a universal app store and people were very excited. JavaScript very much was intended to let the rest of the web page interface with the software program (the applet) running on it.
Your excite quote shows a key use case: ship a generic compile applet in a site which contains user-specific data, write a little JavaScript to send the data to the applet and poof, it’s personalized! Magic.
That success never happened though (and I’m not sure why), and most uses of applets I saw were of slow, ugly navigation menus with hover effects and stuff like that.
Of course these days with package managers and build systems and TypeScript, JavaScript is a lot more complex than Java ever was.
But they sort of ran "in a box", like Flash. So you have this particular rectangle in the page, inside of it something runs and works and does its thing... but outside of it, the rest of the page knows nothing of that.
What JavaScript was supposed to bring into the mix was that you might have a Java applet doing some "heavy-lift" stuff and then, you'd use the results of that to operate on other elements in the page. Like maybe you'd update a form, or some data in the HTML, or whatever. Also, obviously, the other way around. You might have some HTML controls that would then feed user data into the applet.
Yes, you could do everything inside the applet, but this offered an additional option.
It was certainly used, since I remember using it out of curiosity. I don’t think the use was widespread since it only worked in Netscape.
At first, closures weren't even available. I mean, in 1.0 and 1.1 you could only declare global functions. 1.2 introduced function expressions and closures. That was June 1997; the language was still changing quite a bit and it wouldn't be until ECMA standardization that things would become stable and clear enough for people to use. (Even though there would still be huge differences across browsers for years)
It's funny that Microsoft were the who were innovating with better features and a more coherent vision during the late browser wars, but they failed to capitalize on this innovation once they won the war and they could now just release IE6 with a shiny Media Bar and then fail to update it for 5 years. Nothing would ever go wrong, and no competitor could threat Microsoft, since all these toolbars everybody seem to adore are only compatible with Internet Explorer anyway. Yeah...
Especially that it wasn’t. JavaScript in Netscape 2 didn’t even have function expressions.
Er, it had everything to do with XML. It was introduced to give pages the possibility to fetch XML (typically feeds) and render their content dynamically; which is basically what it ended up being used for, except XML feeds were then replaced by simpler files.
Yes. XML was basically superceded by JSON, which was far less verbose and clunky.
The success of JSON has less to do with verbose/clunkiness but a lot with the available APIs in the JavaScript frontend.
JSON.parse() came a lot later. People started with eval(), which lead to quite some problems (executing code returned from some third party service, what could go wrong ....) and then various other attempts at parsing.
For years JavaScript was only used for very small stuff like changing the color of a button in a mouse over.
The inflection point began lately with the inclusion of XMLHttpRequest [1] which enabled to have web apps instead of static pages with basic transaction forms. Then obviously another inflection point was NodeJS (and Google Chrome launch with the V8 engine).
My point is that the launch of JavaScript in 1985 is independent from it success later.
Beyond this, my personal opinion is that launching a VM specification would be better than announcing a specific programming language. WebAssembly comes very late to the game.
NodeJS (which is just the V8 engine plus a server-side runtime environment) seems to owe a lot of its success to Google creating an actual fast, JIT-compiling JavaScript implementation in the form of V8.
In fact, the entire Cambrian explosion of new Javascript frameworks in the 2010s probably would not have taken place without V8 enabling them to run with acceptable performance.
What can today’s browsers do that web development hasn’t caught up to?
With WebGPU, WASM, WebXR, WebBluetooth, WebUSB, WebTransport and more already/soon enabled, I'm fairly sure we're just scratching the surface currently on what use cases can be built with today web technologies.
Also, things outside browsers are changing enough that the use cases also expand. Bandwidth, latency, availability and more are also improving, enabling fancy stuff we couldn't dream about some years ago. The other day one of the HN submissions loaded a multi-GB file for client-side evaluation of a Stable Diffusion model, as just one example.
We should also take into account that Flash [1] was the technology that ate the limitations of the web. Flash was really powerful. More in a moment with low bandwidths around the world. For example this late 90 animation would be impossible to stream [2].
[1] https://en.wikipedia.org/wiki/Adobe_Flash
[2] http://swain.webframe.org/zeek.html (SWF files) available for streaming in YouTube: https://www.youtube.com/results?search_query=zeek+locomotion
Wasn't OWA ("Outlook Web Access") the web app that XMLHttpRequest was made for?
Imagine if companies provided contact information on software releases today. You know, where you could call and a human being would pick up. Maybe you could even get some customer support!
"@TimeWarner! My connection is down! Help me NOW!"
Get in line, you privileged twit.
2023: java is to javascript like car is to carpet
Interesting to note the mention of servers!
I actually forsee a wave of JavaScript innovation within the concept of a traditional backend server coming soon, and it's interesting to see them mention a server here.
I've forever been from the school of "Rule number 404: thou shall never use JavaScript on the server side.".
But with React 18 and the serverless wave, I can totally see myself writing backend controller code in TypeScript that gets deployed by Vercel in the near future.
We got a nice boost on performance as well.
Love js for api server.
https://news.microsoft.com/1996/05/29/microsoft-internet-exp...
it was a real pita debugging JScript compatibility issues before the days of jQuery.
i guess we did get XMLHttpRequest later in IE 5.0. strange how things turned out.
IE 4's early stabs at CSS were also already superior to the existing:
<font face="arial" color="red" size="8">
The web back then was wild in all senses of the term.Be careful what you ask for.
Microsoft of the 1990s seemed to never be able to decide whether they want to follow "Embrace, Extend and Extinguish" or NIH, so they usually both implemented slightly-incompatible versions of popular technologies, and then shoved in their own in-house technologies alongside.
That's how you got both ActiveX Controls and Java Applets (both sucked). That's how you got both Visual J++ and Visual Basic (J++ was superior), and later both J# and C# (this time C# was superior, but could you expect anything less from Anders Hejlsberg?). That's how you got both VBScript and JScript running on JScript (a little know fact that made it possible for me to script Windows 2000 machines without running through a decade's supply of vomit bags).
If there was no JavaScript, I think Microsoft would have gone with something like ActiveX, instead of rushing to deliver their own a quick and dirty implementation of a scripting language. But we wouldn't get an almost-decent scripting language embedded in every windows machine, and I would have had to automate all these machines using BATCH files!
- language features like module loading, async, classes arrow functions etc. would be unnecessary or trivially implementable within the language
- libraries like React et al would be much simpler
- plenty of FP libraries would be either unnecessary or much simpler
- things like "hot reloading" during dev time would be much simpler and actually work out of the box
- simpler parsing and more cross pollination in terms of runtime performance
- type annotations could be implemented trivially in user space, the runtime could evolve into respecting them for performance gains
- tooling complexity would be much reduced because of all of the above
In the end, JS has been a net good for the industry. I don't work in it, but it's turned into something decent over the years though the frameworks around it are insane. But it took 15 years to get to this place and become a "grown up" tool, imho partially because of some odd choices early on.
Scoping: Especially initially, the scoping rules were really wonky.
OO: I am actually a fan of prototype inheritance (Self & LambdaMOO FTW) but the form implemented in JS was confusing for most people and they never understood it, esp given Java was ascendant at the time with its very strict and boring class-based model. I think some clarity was needed here. Lack of standardization around how to do objects, inheritance, encapsulation led to a total bizarre mixture of approaches and misunderstandings.
Essentially I just think having it passed over by some more sober minded language designer types who had research background in e.g. Scheme, Lisp, Self, etc. would have been good.
Going all in on JS instead of wasting time with the ill-fated Java applet stuff would have been good for the industry. It's what the industry ended up doing eventually anyways, but it took until the 2000s before this really clicked for people and they finally gave up on the various half-baked dynamic plugin solutions (Flash, ActiveX, Java applets, etc).
The "Java" in the name was/is a problem and led to a decade of stupidity. I understand how it happened, but it shouldn't of.
That void never really existed. There was the right way to do it, basically the same way that ES6's class syntax actually works today, and then there were a bunch of people fooling themselves into believing that the impedance mismatch that resulted from writing code against their own derpy metaprogramming system they'd devised themselves was acceptable. The attitudes associated with that mindset never really went away—it's what drives the demand for stuff like Webpack, along with NodeJS's CommonJS-inspired approach to modularization infecting everything and the README for create-react-app providing list of steps to get someone up and running requiring them to download half a gigabyte of packages to their disk before they can successfully complete the Hello, World exercise, not to mention the abstraction (and resulting boondoggle) that is React itself.
Actual "serious" uses of JS didn't really ramp up until the end of the decade, and by then people were doing what you're saying, yes.
Netscape releasing a style guide with the language, and a set of standard libraries that used them, that would have helped.
But everyone back then was too distracted with "Java is the Future of the Browser" (Narrator: It Wasn't)
Nobody could've known how bad things would become after Js was inflicted on the world... right?
Did you ever tried implementing a desktop UI using an object-oriented multi-platform toolkit like SWT or QT or GTK? There are good chances that all the dependencies you will need are already "there", you learn the widget toolkit bindings for your preferred programming language and you can start. It's so much more productive and fun (at least for me) and most of the time you don't need to mess up with colors, styles etc. etc. because you will want the operating system to take care of that.
On the Web you have so much more freedom, because the web page is almost a canvas, but at the same time (for me at least) it looks way less productive and everytime I think of it, I always wonder why nobody is proposing anything better for the Web and the industry keeps on building layers of complexity on top of JavaScript/DOM/CSS.
For a very loose definition of "need".
> Did you ever tried implementing a desktop UI using an object-oriented multi-platform toolkit like SWT or QT or GTK?
There's an abundance of desktop application code written in JS from the GTK+ folks themselves. They embraced SpiderMonkey (the Mozilla JS engine) years ago and have been shipping stuff on it for just as long. Anyone who has booted into the default desktop on Ubuntu—or any other installation running Gnome—has already come in contact with it, perhaps even today. That doesn't get a lot of attention, though, because it's not "squeaky": it isn't plagued by the same problems that people (stupidly) associate with "JavaScript" despite the fact that what they're really thinking of are problems with the NodeJS/NPM community in particular and its spectacular tooling + other webdev-oriented accomplishments. I.e., all the things it insists are requirements for the Modern Programmer—a mission which their detractors assist them on by perpetuating the story themselves (cf "need")...
And it sounds totally legit to me. If instead what you are referring to is something similar to Electron, that is something I "hate"; I understand it's a cheap way for a Web Developer to reuse the skills and build a desktop application, but the result is typically buggy, bloated, slow, and does not integrate properly with the desktop environment (fonts, colors, clipboard, accessibility are just the first things that come mind).
The things you're complaining about are not a JavaScript problem. They're a programmers-who-have-their-feet-firmly-planted-in-the-world-of-NPM-and-modern-webdev-tooling problem.
> something similar to Electron[...] is something I "hate"
Wait till you find out how Firefox itself (i.e. the UI and other application logic) is implemented: "DOM, CSS and plain JavaScript". Mozilla was doing Electron-style apps before Electron ever existed. Somehow it's a higher quality app than the sorts of things you had in mind when you brought up Electron. Again: that's because it's not a JavaScript problem.
https://corecursive.com/json-vs-xml-douglas-crockford/
Some really wild stuff about the genesis of JavaScript. I've never heard about HyperCard until now.
Great example of why it's so important to understand computer "innovations" with as much historical context as possible, so as not to fall into the pop-culture mindset, which completely ignores that which went before, and thus is extremely unlikely to create something new without that understanding.
Not only does it stir up the memories of the craziness, but it reminds me that most of the things we do today are not that ground-breaking. The young generation of engineers is just relearning the lessons we did - with faster CPUs and bigger screens.
P.S.: I could not stop watching Valley of the Boom: https://en.wikipedia.org/wiki/Valley_of_the_Boom
This was a watershed moment in technology for that alone
A lot of similar comments, too ;)
You monster!
Oracle Corporation Mark Benioff: (415) 506-7000
Maybe I should take that guy out to lunch.I believe Bud Colligan may have been speaking about ActionScript in this quote, the scripting language found in their yet to be launched Macromedia Flash product. Of course, Flash is no more... and neither is Macromedia. Time flies!
A Visual Basic for the Web is needed.
There were no hyperlinks?
ETA: I saw @mouzogu mentioned "JScript" ... that's what I remembered.
haven't heard that word in a while
For decades billions of processors have been burning watts to dereference JSValue *val, then switch() on the union tag (or something like that).
In fact once your static typing is sufficiently advanced, you run into many of the same problems in terms of optimizing.
What is actually baffling is that Sun had Self with super advanced compilation, the highest performant dynamic language and instead of using that, JS happened. And the people who did Self, then went off did Strongtalk HotSpot, then Java HotSpot then were bought by Sun again. And then eventually Google hired the exact same team to do the same thing for Chrome (and then later Dart).
So really just using Self would have saved a solid 10+ years of detours only to end up with what Sun had in its labs in 1992.
And one fact which annoys me the most: in all other areas we are free to choose any language to do the job. But in the web we're forever stuck with one language which was quickly concocted in a few days and still to this day many of the original flaws remain.
An alternative world could have existed where we have the same exact Javascript, without the culture of using "tens of thousands of tiny libraries" which change "several times a day". It was possible to avoid these faults while still keeping the language itself.
So I think it's unfair to say (as the comment you agreed with said) that Javascript is the worst thing to happen to the web, because all the cognitive load being pointed to comes from widespread human usage of the language rather than the language itself. That's on us.
JavaScript is fine, but JavaShit and everyone who partakes in it are a plague.
Where are those people promising slimmer and faster websites compared to absolute no JS?
> Development is a devilish entanglement of tens of thousands of tiny libraries, and almost every one of them is changing several times a day
Nothing to do with JS. Many libraries is a symptom of popularity and them being tiny is caused by trying (unsuccessfully though) to send the absolute minimum over the wire.
> I see how slow it became compared to the old good Web 1.0. Monster frameworks that require changing hundreds of files daily
What web 1.0 was doing is completely different to what the current JS apps are doing. Good luck implementing Figma with the good old web 1.0. I'd even say good luck implementing it anything other than the current web-app dev stack or some custom native UI library which would take a millennia to develop.
> sometimes front development is behind backend development because of this burden and cognitive load
backend and frontend dev have completely different constraints. Doing frontend dev for a native app is also cognitively nearly completely different monster.
> in all other areas we are free to choose any language to do the job. But in the web we're forever stuck with one language
I mean you could always compile to JS and these days there are many good webassembly frameworks.
> still to this day many of the original flaws remain
But also almost always easy to avoid. It's a necessary evil for backward compatibility.
The crowd that claims, that reloading the page is bad and therefore there must be JS involved to only generate parts of the page dynamically.
> Nothing to do with JS. Many libraries is a symptom of popularity and them being tiny is caused by trying (unsuccessfully though) to send the absolute minimum over the wire.
I think it does have to do with JS: JS did not offer much. Many things were missing. Other things were so bad, that people build abstraction layers on top, to hide the uglyness of JS underneath and then published those layers as libraries. So the language itself has at the very least historically directly contributed to the current state of affairs of thousands of mini libraries. Even JS developers themselves don't trust JS or their own ability to work around JS' quirks, so they include left pad and other funny things.
> What web 1.0 was doing is completely different to what the current JS apps are doing. Good luck implementing Figma with the good old web 1.0. I'd even say good luck implementing it anything other than the current web-app dev stack or some custom native UI library which would take a millennia to develop.
Not the GP, but I am also against the Figma pipe dream designs being pushed onto the frontend developer. In my opinion a good web designer should know CSS well and know the implications of their design ideas before pushing them onto others. Want to make a design that has something, that is difficult to achieve without JS? Better think 5 times about whether you really need it and whether that design addresses fundamental functionality of the website.
> But also almost always easy to avoid. It's a necessary evil for backward compatibility.
Only by writing code you usually would not have to write in other language, to plaster over JS' faults, or by including lots of tiny libraries as dependencies, dooming your project in the long run.
Back then JavaScript was to be used solely for non-critical, nice-to-have optional functionality that would regardless not inhibit the user; using JavaScript was contingent on your website gracefully falling back to a perfectly usable state in its absense. If your page failed to load without JavaScript, you were doing it wrong. If your JavaScript hassled your users, you were doing it wrong.
I lament that that philosophy got thrown out the window some time in the early 2010s, which subsequently led to the hellscape of websites filled to its armpits with JavaShit that serve no good purpose which we see today.
With the rise of mobile browsers, the ability for frameworks to solve cross-browser comparability, and the general acceptance that anything beyond trivial interaction required JS, catering to a tiny crowd that didn’t like having it turned on became very unimportant to most. I do agree that graceful degradation to a state that’s still functional is ideal and something I wish had stuck around.
There were warnings from the beginning (both with ActiveX and NPAPI), but for most engineers, getting things done took precedence over trust issues. Youtube, for example, would not have been possible until much later without Flash.
At one time? When? People have been executing arbitrary and malicious code since the moment they could share it between two computers.
But, it was easier to avoid this common error before every site depended on it.
I honestly can't see a much better compromise than JS to include the common users.
The problem with JS in browser has been security, specifically cross origin not that JS is code
I don’t blame Apple for that decision, honestly. And I’m sure security wasn’t apple’s only reason of course, I’m not going to be naive about that. All around, we may be better off without it. It will also be missed - both can be true.