Today's Question:  What does your personal desk look like?        GIVE A SHOUT

The four key figures behind the success of JavaScript - Douglas Crockford

  sonic0002        2023-05-07 06:42:30       4,068        0    

JavaScript's success can be attributed to at least four key figures:

  • Brendan Eich, the creator of JavaScript
  • Douglas Crockford, the creator of JSLint and JSON
  • John Resig, the creator of jQuery
  • Ryan Dahl, the creator of Node.js.

We are already very familiar with Brendan Eich and the invention process of JavaScript, so let's start with Douglas Crockford, the second in command of JavaScript.

Alliance

In the 1990s, Microsoft's dominance overshadowed the whole world.

At this time, two challengers emerged, one was the IT giant Sun, and the other was the IT upstart Netscape.

Sun believed that Java programs could only see the JVM, as for the underlying operating system? Whoever cares.

Netscape was even more radical: in the future, all applications would be web-based, as long as there was a browser, who cares about the operating system?

The common goal of "shielding the operating system" brought the two together, successfully forming an alliance to challenge Microsoft's dominance.

After the two sides formed an alliance, the first thing they did was to run Java in the form of applets in the Netscape browser. Applets quickly became popular, making Java a star in the programming language world.

However, the two sides of the alliance were not close. Netscape was actually developing a language called LiveScript.

Sun: Brother, didn't we agree that Java is the last language everyone needs? How come your Brendan Eich is developing LiveScript? Our unbreakable friendship is starting to crack!

Netscape: No, no, no, the JVM is too heavyweight. Web programming needs a scripting language that allows beginners to quickly get started. How about this, we compromise and rename LiveScript to JavaScript, okay?

Sun: It looks like a subset of Java, a trimmed-down version of Java, Java's little brother. Okay, that's it.

The Metaverse of the Last Century

At this time, our protagonist, Douglas Crockford, was still in entrepreneurship, and his company was called Electric Communities, right next to JavaSoft.

The company's entrepreneurial project was very impressive: the Metaverse.

Yes, in the 1990s, there was already an amazing virtual world where you could have an Avatar and walk around in a 3D world. You could also be instantly teleported from one place to another, talk to other people, buy and sell items, and build things.

Perhaps because it was so close to Java, Doug chose to implement it in Java.

But this concept was too advanced, and the network speed in the 1990s simply couldn't support it. Java was also super slow to start, and it took three minutes for the "Metaverse" to load the environment.

Around 2000, the dot-com bubble burst, and the Metaverse died a natural death.

To survive, Doug took on a project for Turner Broadcasting System: an online card game.

Turner Broadcasting System required that the game must run in the browser and not require users to click to install anything.

Doug looked around and found that only JavaScript met this requirement.

But the company's programmers didn't like this "lousy" language and didn't want to work on it. So Doug had to find JavaScript: The Definitive Guide and do it himself.

In the process of development, Doug gradually realized that JavaScript was not a subset of Java at all, but a completely independent programming language.

The excellent parts of JavaScript have far more capabilities than Java, and it is the first language to provide us with Lambda, which is a great breakthrough.

Once he understood this, Doug instantly transformed from a Java fan to a JavaScript fan.

He wrote an article called JavaScript: The World's Most Misunderstood Programming Language, saying that JavaScript is a Lisp disguised as C, and thus embarked on the road of preaching JavaScript.

JSLint

After completing the project, Doug had nothing to do and began to spend his time on JavaScript newsgroups, answering all kinds of questions.

For example, "This is some JavaScript code I wrote. I don't understand why it's not working. Can anyone tell me?"

After answering these kinds of questions many times, Doug decided to create a tool: JSLint. This was also the first JavaScript syntax analyzer.

Just put the problematic code in, and it will find the problem when you run it.

Doug discovered that certain ways of using JavaScript can easily lead to bugs. If these forms are not used, errors are more easily detected, and the program will become better.

So Doug proposed a principle: if there are two ways to do something in JS, choose the one that is less likely to cause errors.

For example, use semicolons to eliminate syntactic ambiguity; Do not use ++, use +=1 instead.

But in that "wild" era, people were not very receptive to Doug's principles, and even felt that such requirements offended them. They still did things their own way and wrote code however they wanted.

Starting a New Business

After some time off, Doug suppressed his inner impulses and decided to start a second business.

This time, he and his former colleagues founded a company called State Software, and they wanted to use JavaScript to create something called a "single-page application."

At that time, web applications were mostly implemented using ASP and JSP to create pages, and users had to jump back and forth between pages. The concept of a single-page application was unheard of, which shows how advanced Doug's ideas were.

Single-page applications inevitably involve data interactions between browser JavaScript code and server interfaces. What format to use?

At that time, XML was the most popular format. Microsoft, IBM, Sun, and HP were all promoting Web Services, and the core technologies such as SOAP and WSDL were all described using XML.

However, XML is a very heavy format, and it requires a lot of tools to parse and validate it.

Doug invented a new data format: JSON (JavaScript Object Notation).

Doug used the single-page application and JSON to convince clients: "Look at our system and technology stack. JSON is the most convenient way for browsers and servers to interact."

Client: "We use Web Services, SOAP, XML! What is JSON?"

Doug: "JSON can directly convert data into JavaScript, which is very convenient!"

Client: "Is JSON a standard? If it's not a standard, I won't use it!"

JSON is not a standard, and there is no endorsement from major companies.

Like the "Metaverse," Doug's business failed again because it was too advanced.

However, this business left behind an important legacy: www.json.org.

The AJAX Revolution

In 2004, Google released Gmail. In 2005, it released GMap.

Asynchronous calls and partial refreshes, along with novel user experiences, attracted worldwide attention.

User experience designer Jesse James Garrett coined a term in an article to describe the technology behind Gmail and GMap: AJAX(Asynchronous JavaScript and XML).

AJAX quickly became popular worldwide.

The X in AJAX stands for XML, but people soon discovered that XML's complex format and semantics were not the best choice for transmitting data.

XML data needs to be parsed by complex parsers before it can be used, while JSON format is very similar to JavaScript objects and can be easily converted, making it simple and clear.

Programmers began to awaken, and more and more people adopted JSON, while the RESTful style added fuel to the fire, and RESTful+JSON formed a perfect match, launching a fierce attack on the complicated SOAP+XML.

XML's domain continued to shrink, and it ended up in the territory of configuration files, continuing to generate residual heat.

The development of the Internet is so magical. To control and make money, the giants often jointly develop standards and push them to programmers through powerful marketing.

This approach can win for a while, but it won't win forever.

Standards that are arbitrarily formulated will soon be defeated by the best practices of the people and thrown into the historical garbage heap. SOAP and EJB are typical examples.

The Preacher

At the invitation of his former colleagues, Doug joined Yahoo! as a true JavaScript preacher.

He traveled around the world to participate in various conferences, teaching people how to use JavaScript correctly, use semicolons, use JSLint, use functional programming, and not use eval...

Doug showed everyone that if used correctly, JavaScript would be a powerful language.

He even visited MIT because there is a famous book called "Structure and Interpretation of Computer Programs" that uses Scheme as the programming language. This is also the source of JavaScript's functional programming design. Doug went to MIT to describe how JavaScript works and how to execute closures.

Years later, MIT released Structure and Interpretation of Computer Programs in a JavaScript version.

Doug wrote a book called JavaScript: The Good Parts which is only 150 pages thin, but it stripped away the ugly outer shell of JavaScript and showed us the true face of JavaScript: a concise, elegant, and expressive language.

Doug went to the IETF(Internet Engineering Task Force) to fight for JSON's rightful place: MIME type went through a painful process, and he got application/json instead of text/json.

Doug was puzzled. JSON is just a text format, not an application. This may be the work of some XML fans who are not satisfied with JSON.

The Second in Command of JavaScript

Years ago, Brendan Eich invented JavaScript in ten days to meet the company's requirements. Its hasty design has always been burdened with various criticisms, such as no namespaces, uncontrollable global variables, magical plus operators, counter-intuitive ==, etc., all of which have caused beginners to fall into countless traps.

But JavaScript can be so popular, and there must be excellent components in its language.

Doug had a keen eye and picked out the essence from a pile of ugly JavaScript features, showing it to the public and making us realize that JavaScript can also be so concise, efficient, and flexible.

The "spiritual leader of JavaScript Lambda programming," the second in command of JavaScript, Doug deserves his reputation!

Sorry! Everyone! This article is already too long, so let's stop here... Next time, we'll write about John Resig.

Reference: JavaScript成功背后的四个关键人物

JAVASCRIPT  HISTORY  DOUGLAS CROCKFORD 

Share on Facebook  Share on Twitter  Share on Weibo  Share on Reddit 

  RELATED


  0 COMMENT


No comment for this article.