JAVASCRIPT IS NOW EVERYWHERE

JAVASCRIPT IS NOW EVERYWHERE

A High Level Definition

JavaScript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2D/3D graphics, scrolling video jukeboxes, etc. — you can bet that JavaScript is probably involved. It is the third layer of the layer cake of standard web technologies, two of which (HTML and CSS) we have covered in much more detail in other parts of the Learning Area.

No alt text provided for this image

  • HTML is the markup language that we use to structure and give meaning to our web content, for example defining paragraphs, headings, and data tables, or embedding images and videos in the page.
  • CSS is a language of style rules that we use to apply styling to our HTML content, for example setting background colors and fonts, and laying out our content in multiple columns.
  • JavaScript is a scripting language that enables you to create dynamically updating content, control multimedia, animate images, and pretty much everything else. (Okay, not everything, but it is amazing what you can achieve with a few lines of JavaScript code.)

So what can it really do

The core client-side JavaScript language consists of some common programming features that allow you to do things like:

  • Store useful values inside variables. In the above example for instance, we ask for a new name to be entered then store that name in a variable called name.
  • Operations on pieces of text (known as "strings" in programming). In the above example we take the string "Player 1: " and join it to the name variable to create the complete text label, e.g. ''Player 1: Chris".
  • Running code in response to certain events occurring on a web page. We used a click event in our example above to detect when the button is clicked and then run the code that updates the text label.
  • And much more!

What javascript doing on your page

Let's briefly recap the story of what happens when you load a web page in a browser (first talked about in our How CSS works article). When you load a web page in your browser, you are running your code (the HTML, CSS, and JavaScript) inside an execution environment (the browser tab). This is like a factory that takes in raw materials (the code) and outputs a product (the web page).

No alt text provided for this image


How do you add javascript to your page

1] Internal Javascript

2] External javascript

3] Inline javascript handlers

4] Script Loading stratgies

5] async and defer

Top companies using javascript !!

1] Twitter

No alt text provided for this image

In April 2017, Twitter released Twitter Lite, a mobile app with minimum functionality that can work with slow Internet connections. The app minimizes the data usage, is resilient on unreliable mobile networks, and takes up less than 1 MB on any device.

The Twitter team used Node.JS to build, test, and deliver this application. Before Node.JS, the company had a different technology on the back end and spent lots of time-solving the operational issues.

2] Trello

No alt text provided for this image


Trello is a project management tool trusted by 25 million people worldwide. It needs to rely on event-driven technology that can handle many open connections at a time. Trello is among companies that use Node.js for its server-side and as a prototyping tool to build a single-page web application.

3] Linkedin

No alt text provided for this image

The Ruby on Rails app was a synchronous app that the clients used to make several calls for a single page. All of the calls occurred sequentially, with each thread handling a single request.

Node.JS allowed LinkedIn developers to move to an asynchronous event system where the client made a single request per page.

That is it from my side hope you like the blog:)

Happy Learning!!



Mashfooq Ahmed

Senior Associate, Infrastructure Specialist

3y

Congratulations Gupta

To view or add a comment, sign in

More articles by AJAY GUPTA

Insights from the community

Others also viewed

Explore topics