Where JavaScript is Used?

栏目: IT技术 · 发布时间: 6年前

内容简介:From an almost-dead to a thriving,With that said, its success wouldn't be possible without expansion intoHowever, for beginner programmers, it might not be so obvious. And so, I'd like for this article, to be a little, beginner-friendly showcase of JS

From an almost-dead to a thriving, omnipresent language, JavaScript has come a long way. Thanks to the growth of the World Wide Web (WWW) and a lot of new features being added, JS is currently one of the most popular and in-demand programming languages out there.

With that said, its success wouldn't be possible without expansion into new territories . As many web developers probably know, JS is no longer bound by the browser window.

However, for beginner programmers, it might not be so obvious. And so, I'd like for this article, to be a little, beginner-friendly showcase of JS use-cases and possibilities .

Server-side

Currently, the most developed area of JavaScript outside the browser is surely the server-side . And it's all thanks to Node.js - a JavaScript runtime , which uses the same, super-fast V8 engine like any Chromium-based browser out there (e.g. Chrome, latest Edge and Opera). Not only it allowed JS to be used for simple server tasks like database access and website hosting, but also far more complex ones, which is why it's currently utilized by big companies like Netflix, Uber or PayPal .

Node.js also played a crucial role in the creation and rapid expansion of Node Package Manager ( NPM ). Its repository currently houses over 1M of both Node.js and browser-compatible open-source JS tools and libraries - all serving the good of the JS community.

Desktop apps

While Node.js is primarily used on pure server-side, its capabilities stretch far beyond that. Its success went on to inspire others to make use of JS in different areas of the programming industry. And so, the Electron framework is a tool using both Node.js and Chromium, which lets you create full-blown desktop apps with the website-like toolset, i.e. HTML, JS, and CSS.

Electron apps are quite easy and fun to create. You can pretty much take a usual website and make it into an Electron app. That's all thanks to it being, to put it simply, just a Chromium web browser, with some additional Operating System (OS)-level features.

Furthermore, you might be using an Electron app without even knowing it. That's due to it being used by really popular apps such as Skype, Discord, and Slack .

Mobile apps

Because Electron is for desktop OSs only (Windows, Mac OS, Linux), mobile apps require their own category.

Hybrid mobile apps

There are multiple ways of making a mobile app in JS. The first one involves the so-called hybrid mobile apps . These, in simple terms, are just usual "native" apps with a WebView (a limited browser-like embed) inside them, running the provided HTML, CSS and JS code. So, essentially, it's very similar to the Electron on the desktop, although here, the framework's name is Apache Cordova . However, hybrid mobile apps, although easy to create, have no performance benefits over a usual website. Thus, on a mobile device, where computing resources are limited, such apps can often underperform. That's probably why they're currently being cast aside in favor of a new technology called PWA .

PWA

Progressive Web Apps (or PWAs for short) are nothing more than usual websites, with some performance and offline-mode enhancements included. If the user's browser provides such functionality, they can be pinned to the main screen and be opened without the search bar, giving them a feeling of usual native apps. And as the same technology works also on desktop , developers can simply create compatible web apps and enjoy all the benefits of PWA without much additional work.

But, if you want your app to have even more "native feel" through increased performance, and availability on the local app store (PWAs are only starting to be allowed there), then there is one more option.

Real nativity

Frameworks like React Native and NativeScript aim to allow developers to write mobile apps with web technologies, but with the feel and performance of native apps. They achieve that by converting your code into a more platform-optimized version while retaining the ease-of-use of JS and related technologies. This approach to creating mobile apps is much more widely-used, with some really prominent apps like Facebook, Messenger, Instagram, Pinterest, Skype, Tesla and many more using the technology.

Embedded devices

It might seem like JS, as an interpreted programming language, is not suitable for small, resource-conscious embedded devices . Surprisingly enough, it made it even there!

Projects like Johnny-Five and others use the power of V8 engine and Node.js to bring JavaScript into the fields of robotics and the Internet of Things (IoT), so essentially everywhere! You can even use it on devices such as Arduino, Rasberry Pi or Intel Edison.

Other applications

So, we've pretty much covered most of the programming areas already, but JS stretches even further. No, we cannot make a whole OS using this language, but if we look closer, we can see start noticing smaller use-cases appearing.

Take Adobe Creative Cloud software for example. Even though e.g. Photoshop isn't written entirely in JS, you can still use this language to write expressions and plugins that can accelerate your productivity and comfort of use of the tool!

Final thoughts

In the end, it seems like JS is pretty much everywhere . Surely it's not true, but the sheer number of areas that it has expanded into is very impressive. And with this expanding ecosystem of tools, libraries, and frameworks, and ever-growing community, it seems like JS isn't going anywhere anytime soon!

If you like the post consider sharing it and following me on Twitter , Facebook , or through my weekly newsletter . If you're interested, I also recommend checking out my YouTube channel . Again, thanks for reading this piece and have a nice day!


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

运营攻略

运营攻略

陈辉 / 人民邮电出版社 / 2017-12 / 59

《运营攻略 移动互联网产品运营提升笔记》深入浅出地告诉大家什么是运营,梳理了移动互联网时代各类运营方向的工作重点与工作方法,结合实例指出了每类运营方向的提升要点;结合作者的亲身经历,解答了无数运营人与产品人纠结的运营与产品到底有什么异同的问题;指明了运营人的核心竞争力,并对处于不同阶段的运营人提出了相应的建议与要求;尤为难得的是,《运营攻略 移动互联网产品运营提升笔记》中还阐述了内容型产品与工具型......一起来看看 《运营攻略》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器