What Has Javascript Ever Done For Us?

11 December 2016

1531 Original

Alongside HTML and CSS, Javascript is a fundamental component of our digital world. Skilled Javascript developers are in huge demand worldwide… but what does Javascript actually do, and why do we need it?

It’s the third of the three ‘holy trinity’ elements of front-end design, but Javascript is notorious for being the least understood. While ‘sturdy’ HTML provides content and structure and ‘stylish’ CSS brings visual treatment, Javascript is where the real magic happens: cool stuff like movement and interactivity.

What is Javascript?

Javascript is a programming language or script which adds behaviour to static webpages. It can change visuals according to user behaviour (rollovers, menu clicks, animations), provide live editable elements (like drag-n-drop), or update page information without the need to reload your page (sports results, form fills).

Plus, with the recent rise in popularity of Node.js, it’s now possible to create whole applications in Javascript. Built on Chrome’s Javascript runtime, Node.js is increasingly being used to create fast applications for cross-device use.

All that cool functionality… it’s no wonder Javascript is one of the hot skills our clients snap up. In fact, around a third of all developer jobs require some Javascript knowledge, and 90% of front-end developers use it. It’s a skill that can send developers’ value skyrocketing.

Top Javascript developers can truly create magic with the technology. Whilst the language has often been written-off as a ‘toy’ – and it certainly can be used for some grossly tacky purposes! – Javascript has enabled some of the internet’s greatest creations.

So let’s take a tour. What exactly has Javascript ever done for us?

Javascript… Helped build Facebook, Google & YouTube


Almost all of the world’s websites use JavaScript in some form. Javascript can be found everywhere from the smallest blogs to the largest mega-portals like Facebook, Google and YouTube. Usage is sustained and growing, and since its early usage, the language has evolved to meet the needs of its users.

In fact, Javascript is used by 94.4% of all websites worldwide, far outstripping its partial-namesake Java (on which more below!) Javascript can be found in every sector from business to education, social media to eCommerce. It's truly a workhorse of the web.


Javascript… Speeds up users' internet experiences by processing browser side


In the internet’s early days (think of those dial-up horrors) every single click required a new page to be loaded. Click > *Pause* > Blank screen > *Pause* > Loading > *Pause* > New page > Repeat. For every user action, a new page of HTML had to be requested and retrieved through your sluggish, pre-broadband connection.

Javascript revolutionised this process by allowing such ‘actions’ to take place browser side, rather than requiring a new interaction with the server. Content could be hidden, shown or modified in response to a click or action. This vastly sped up user experiences by eliminating the need for a sluggish page load delay. Phew!

Javascript… Enables autocomplete, collapsible menus and live sports results

Masters of Javascript can use the language to conjure up all kinds of tricks:

  • Make forms and data entry elements respond to user activity in real-time.

     

    Maybe your user’s typing questions in a search, and you’d like to suggest helpful answers before they’ve even clicked go? Or perhaps you want to alert them to a skipped field before they encounter an error? Javascript can help!

  • Tidy up lengthy content into neat, slick menus. 

    Since Javascript can hide or show HTML / CSS elements browser-side, it’s a great way to keep content tucked away until we need it. As we’ve migrated to smaller screen devices, this has become ever more important.

  • Update sports fans, stock traders and news junkies in real-time.

     

    Javascript can deliver live information directly into pre-loaded pages. Javascript powers live results tickers, share price indicators and trending stories.

     (Pictured above: One of Sportradar's live interfaces.)

Javascript… Made this awesome, award-winning story-scroller


Well, we had to include at least one cool, flashy-looking thing, didn’t we? (Find more at CreativeBloq.)


Javascript… Builds websites, apps, software, even drones!

Hardware is everywhere. Each year, tech manufacturers launch 1000s of new phones, laptops, gadgets and gizmos, all with different operating systems and user interfaces. For developers, it can be a struggle to keep up with – let alone master – the coding languages that fuel all these new devices.

Javascript’s versatility, though, has enabled it to be harnessed throughout the tech world, everywhere from Android to iOS, from games of chess to drone flights. The language’s popularity with developers has led to its digital dominance.

JavaScript... Confuses hordes of people by naming itself after Java

Why, oh, why, are two completely different languages named so similarly? It’s a trap that trips up tech novices time and again.

Without getting too technical, Java and Javascript are completely different programming languages, but share some commonalities. Key differences are found in both creation (writing the code) and usage (interpreting it).

Originally, the creators of JavaScript meant it as a complementary language to Sun’s Java – then the industry leader. The name was seen by many as a canny marketing tactic, piggybacking on Java’s success. The languages then drifted apart before, more recently, straying into each others’ territory with significant functionality overlaps. Confusing or what?!