What is JavaScript and why do we need it?

 The only programming language that operates natively in browsers is JavaScript (interpreted language without the need for compilation). As a result, it is used in conjunction with HTML and CSS to build web pages.

Coding

What is JavaScript?

JavaScript is the programming language in charge of providing more interactivity and dynamism to web pagesWhen JavaScript runs in the browser, it doesn't need a compiler. The browser reads the code directly, without the need for third partiesTherefore, it is recognized as one of the three native languages ​​of the web together with HTML (content and its structure) and CSS (content design and its structure).

You should not confuse JavaScript with Java, which is a very different programming languageThe confusion comes from the name, registered by the same company that created Java (Sun Microsystems). JavaScript (JS) was created later, and what the North American company did was simply change the name that its creators had given it when buying the project (LiveScript). The Java programming language has been oriented too much more than the web since its inception.

What is JavaScript for?

With this programming language on the client-side (not on the server) we can create effects and animations without any interaction, or by responding to events caused by the user, such as buttons pressed and modifications to the DOM (document object model). Therefore, it has nothing to do with the Java programming language, since its main function is to help create dynamic web pages.

JavaScript is a programming language that runs in browsers, whether they are on a desktop or a handheld device, such as an Android or an iPhone. No matter what kind of system the browser is running on, it does the same thing. JavaScript can detect errors in forms, create beautiful sliders that fit any computer, perform efficient mathematical calculations, and change elements of a web page in a simple wayBut JS is also responsible for the existence of tools such as  Google Analytics,  Google Tag Manager, Facebook Pixel, and many others, which are clear examples of JavaScript.

There is a technology called AJAX that allows information to be exchanged with the server without having to reload the pageThat is, we only load what is necessary from the page. One of the most significant advancements in web development has been the technology built-in JavaScript. Although we do not know how to recognize it, it is responsible for us to get more messages, tweets, emails ... just by pressing a button, without having to reload the page.

JavaScript is now the most commonly used programming language. In fact, for years a version has been created that is capable of being executed also on the server-side (Node JS)Therefore, JavaScript is running right now in browsers and servers, creating around it a very large community of almost full-stack developers. Server-side JavaScript competes on a level playing field with PHP, for example.

Like almost any programming language, we can do object-oriented programming in JavaScript. Without a doubt, the way in which objects are created, modified, and displayed in the browser has been one of the great causes of its rise.

Currently, there are some practices, not highly recommended by SEOs, where JS takes care of many style functions. For example, many WordPress themes and plugins use scripts to make web design responsive. Modern browsers interpret this without problems, but the Google spider may think that it is not the best way to do it.

The most widely used JavaScript library in history, and which is still in use today, is jQueryWith jQuery we could do more, writing less. With a much simpler syntax, we could modify our website, create plugins, animate video games, and much more. Currently, jquery has lost space in favor of other more model technologies such as React or Angular.

JavaScript history

JavaScript history


The history of JavaScript begins in the early 1990s when users reach the Internet and access the Web thanks to browsers. The connections between the users and the webs are made through very slow lines. When the user wants to send information to the server, if it is incorrect, it takes a while to know ... and he loses the information.

Programmers try to get validations in the browser and thus always have positive posts and minimize the loss of information. This was one of the first motivations to create JS, to validate the forms.

Programmer Brendan Eich begins putting server tasks into the browser in a new version of Netscape Navigator 2.0 (from the year 95). This task became more and more ambitious and was called LiveScript. Sun Microsystems later purchased Netscape and renamed it JavaScript, which is similar to the name of the server-side language (Java) and has nothing to do with it.

The relationship between JavaScript and Java is purely commercial, there is no relationship at the programming level, they have nothing to do with it. Simply, the confusion arises from the purchase of the Java creators of the Netscape browser.

Right at this moment, the Browser Wars begins, where everyone begins to have their own version of LiveScript, like Microsoft (JScript) that was not supported. The beginning of the end of the war occurred in 1997 when the ECMAScript standard was created by several companies.

However, Internet Explorer begins to empower your browser with JavaScript, to apply it to games, to improve the user experience, to facilitate the tasks of programmers ... but outside the standard.

However, to make this compatibility task easier, libraries such as jQuery and others very similar have emergedThe jQuery library made it possible to program JavaScript in a simple and compatible way for all browsers.

Little by little, all browsers adopted the standard (Internet Explorer, mainly), and JavaScript became a programming language compatible with all browsers, and the need to use jQuery was less.

Later, JavaScript began to be used on the server-side (NodeJS) as a substitute for other languages ​​such as Java or PHP. To this day, much progress is still being made in this technology.


Post a Comment

0 Comments