JavaScript: como chegamos até aqui? - Curso JavaScript #02
Introduction to JavaScript Course
Understanding Client and Server
- The instructor poses fundamental questions about the difference between a client and a server in internet infrastructure, emphasizing their roles.
- Questions are raised regarding the distinctions among HTML, CSS, and JavaScript, including their specific functions and specialties.
- If students struggle to answer these questions, it indicates they may not have fully engaged with the previous lesson.
Welcome to Lesson 2
- The instructor welcomes students to the second lesson of the JavaScript course, sponsored by Google.
- Gustavo Guanabara introduces himself and addresses common misconceptions about JavaScript and Java, highlighting their differences despite similar names.
Clarifying JavaScript vs. Java
Addressing Common Misconceptions
- The session aims to clarify whether JavaScript and Java are essentially the same or different due to naming conventions.
- Students are encouraged not to skip this lesson on "The Evolution of JavaScript," as understanding its history is crucial for grasping its future developments.
ECMAScript Relation
- The instructor mentions another common question: the relationship between JavaScript and ECMAScript, promising answers throughout the lesson.
Historical Context of Internet Development
Timeline of Evolution
- A timeline will be presented detailing the evolution of programming languages without overwhelming details.
Origins of Internet Technology
- The discussion begins with a historical overview starting from the 1970s when early forms of internet technology emerged during geopolitical tensions (the Cold War).
ARPANET: Birthplace of Modern Internet
DARPA's Role in Technological Advancement
- In response to fears during the Cold War, President Eisenhower established DARPA for technological research aimed at military applications.
Creation of ARPANET
- DARPA developed ARPANET as a network designed for secure communication between military centers; if one was attacked, data could still be preserved elsewhere.
Transition from ARPANET to Internet
Growth Beyond Military Use
- As ARPANET expanded beyond military use into universities like UC Berkeley and MIT, it underwent several name changes before becoming known as "the Internet."
Key Developments in 1993
The Birth of HTML and the World Wide Web
The Creation of HTML and HTTP
- HTML was created by Tim Berners-Lee and his team, along with the HTTP protocol, forming part of the TCP/IP protocols that constitute the Internet.
- The World Wide Web (WWW) was founded in 1993, allowing users to access information via web browsers.
The Emergence of Browsers
- In 1993, a browser called Mosaic was developed by Marc Andreessen at NCSA (National Center for Supercomputing Applications), which adapted an earlier protocol known as Gopher.
- Mosaic became significant as it was the first browser to support HTTP and display web pages effectively.
Netscape's Rise
- Marc Andreessen co-founded Netscape with Jim Clark after leaving NCSA; they built a browser based on Mosaic that quickly gained popularity.
- Within Netscape, development teams humorously named projects; one such project led to the creation of "Mozilla," a nod to Godzilla.
The Evolution of JavaScript
Development of Mocha
- In 1995, Brandon Eich joined Netscape from Silicon Graphics with the task to create a more functional language than static HTML.
- Eich initially named his new language "Mocha," coinciding with the rise of Sun Microsystems' Java programming language.
Renaming to JavaScript
- Due to Java's media success, Netscape decided to rename Mocha to "JavaScript" for marketing purposes despite their differences.
- The name change aimed at leveraging Java's popularity rather than indicating any technical similarity between Java and JavaScript.
Distinction Between Languages
- Despite some syntactical similarities due to both languages being influenced by C, JavaScript and Java are fundamentally different languages.
Microsoft's Response: JScript
Microsoft's Entry into Scripting Languages
- Microsoft recognized JavaScript’s potential and sought to create its own version called JScript while developing Internet Explorer based on Mosaic’s codebase.
The Evolution of JavaScript and ECMAScript
The Standardization of JavaScript
- Netscape standardized the JavaScript language in 1997 by collaborating with ECMA, a European standardization organization, leading to the creation of ECMAScript.
- When studying JavaScript today, it is often referred to as ECMA, indicating the standardized version of the language.
The Browser Wars and Mozilla Foundation
- In 2002, the competition between Netscape and Microsoft culminated in Netscape's decline due to Internet Explorer's integration into Windows95.
- Following its decline, former Netscape employees established the Mozilla Foundation, which developed Firefox as a new browser alternative.
- Despite gaining popularity, Firefox lost market share after Google Chrome was introduced in 2008.
Rise of Google Chrome and V8 Engine
- Google Chrome quickly became the most popular web browser within two years of its launch, capturing nearly 50% of the market share.
- Chrome features a powerful internal JavaScript engine called V8 that compiles code Just-In-Time (JIT), enhancing performance significantly.
Node.js: Expanding JavaScript Beyond Browsers
- Node.js emerged in 2010 from modifications made to V8's open-source code, allowing JavaScript to run outside browsers on servers.
- This development marked a significant shift for JavaScript from client-side scripting to server-side applications.
Overview of ECMAScript Versions
- ECMAScript has undergone several versions since its inception; this timeline focuses on key developments rather than exhaustive details about frameworks like jQuery or React.
Key Versions and Features
- ECMAScript started with version 1.0 in 1997; subsequent updates included minor changes until version 3.0 introduced regular expressions and error handling blocks in 1999.
- Version 4.0 faced delays and never materialized; however, ES5 launched in 2009 became widely adopted due to compatibility with JSON and enhanced array methods.
Evolution of JavaScript and Its Frameworks
Overview of JavaScript Versions
- The evolution of JavaScript began with ES6 in 2015, which was the last version to be numbered. Subsequent versions are named by year, starting with ES2016.
- Each new version introduced significant features: ES2016 added exponentiation operator; ES2017 included async functions; and ES2018 enhanced regular expressions.
Importance of Learning JavaScript First
- Many learners seek courses on frameworks like Angular, React, or Vue.js without a solid understanding of JavaScript itself.
- jQuery is highlighted as an essential library that simplifies interactivity in JavaScript but has seen a decline in popularity.
Key Frameworks and Libraries
- Angular, created by Google in 2009, facilitates web application development with a declarative approach compared to traditional imperative programming.
- React offers similar functionalities to Angular but provides greater flexibility. React Native allows for mobile app development using React principles.
Additional Tools and Technologies
- Vue.js emerged in 2014 from an ex-Google developer seeking improvements over Angular. It’s recommended after mastering JavaScript.
- Electron is crucial for building graphical user interfaces (GUIs), powering applications like Visual Studio Code and WhatsApp desktop.
Mobile Development and Game Creation
- Ionic serves as an SDK for mobile app development utilizing Node.js. It evolved from PhoneGap/Cordova technologies.
- Various game development libraries exist within the JavaScript ecosystem, such as Phaser, PixiJs, ImpactJS, MelonJS, and CraftyJS.
Conclusion and Next Steps
- The speaker encourages revisiting this lesson after gaining more experience with JavaScript to better understand its evolution and relevance.