CodeGym /Java Course /Module 3. Java Professional /Brief overview of JavaScript

Brief overview of JavaScript

Module 3. Java Professional
Level 7 , Lesson 0
Available

1.1 The advent of JavaScript

The JavaScript programming language has been around since the 1990s. He and his interpreter were written in just a few months. And the main purpose of this language was to add primitive animation to HTML pages.

This language is terrible, absurd in places, and of course, in it a crutch on a crutch and a crutch drives. But at the same time, it is one of the most popular programming languages ​​in the world. Not because he's good. No. It's just that it's the only language that runs inside the browser .

And of course, the Internet is full of memes that only confirm what has been said:

1.2 JavaScript is not Java

The first thing you need to know about JavaScript is that it has nothing to do with Java at all. Yes, their syntax is similar in places, but this is simply a consequence of the fact that in the early 90s the most popular programming language was C ++ and both languages ​​took it as their basis.

JavaScript was originally called LiveScript - a scripting language for animating pages. But due to the rapid growth in popularity of Java in the late 90s, it was renamed JavaScript.

JavaScript is a scripting language, it is designed to write small scripts inside HTML pages . It lacks variable typing, classes, scopes, standard collections. No standards.

JavaScript is very handy if one person is working on the code - you can easily write the code however you want . But it becomes simply unbearable if several people work on the code. The lack of standards makes it very, very difficult to understand another person's code .

The speed of reading someone else's JavaScript code is somewhere between 10-50 times slower than reading someone else's Java code. And it's not a joke. Sometimes it’s impossible to understand someone else’s code at all, especially if it’s already a couple of years old and several dozen changes have been made to it.

It is about such a case that there is a meme “here you need to delete everything and rewrite”

1.3 The popularity of JavaScript today

But the harsh reality, as discussed above, is that JavaScript is the only language that runs inside the browser. And the browser is the most popular platform on the Internet today. Therefore, the demand for frontend developers is constantly growing.

Moreover, their salaries have already reached the salaries of backend developers. But there is nothing to envy here. Any frontend project turns into hell after a year. But in the frontend there are also restrictions on the size of the code, because the code is loaded by the browser and this affects the page loading speed.

In order to somehow reduce the mess in their projects, front-end developers are constantly writing new frameworks that simplify their lives. And of course, these frameworks become obsolete literally in 3-5 years. If 5 years ago you decided to write your project on an ultra-modern framework, then today they will say about it that! It is as old as mammoths and how you can even use it.

But there is good news: a new language has been invented to replace JavaScript - it's TypeScript . It is very good, it has typing, classes, scopes. And besides, there is a special compiler that can compile TypeScript to JavaScript.

All major frontend projects use TypeScript instead of JavaScript . In addition, many modern frontend frameworks use TypeScript instead of JavaScript. For example, Angular, on which the CodeGym front-end is written.

But that's a completely different story.

Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION