官术网_书友最值得收藏!

The evolution of the web – time for a new framework

In the past couple of years, the web has evolved in big steps. During the implementation of ECMAScript 5, the ECMAScript 6 standard started its development (now known as ECMAScript 2015 or ES2015). ES2015 introduced many changes in JavaScript, such as adding built-in language support for modules, block scope variable definition, and a lot of syntactical sugar, such as classes and destructuring.

Meanwhile, web components were invented. Web components allow us to define custom HTML elements and attach behavior to them. Since it is hard to extend the existing set of HTML elements with new ones (such as dialogs, charts, and grids), mostly because of the time required for consolidation and standardization of their APIs, a better solution is to allow developers to extend the existing elements in the way they want. Web components provide us with a number of benefits, including better encapsulation, better semantics of the markup we produce, better modularity, and easier communication between developers and designers.

As we know, JavaScript is a single-threaded language. Initially, it was developed for simple client-side scripting, but over time, its role has shifted quite a bit. Now, with HTML5, we have different APIs that allow audio and video processing, communication with external services through a two-directional communication channel, transferring and processing big chunks of raw data, and more. All these heavy computations in the main thread may create a poor user experience. They may introduce freezing of the user interface when time-consuming computations are being performed. This led to the development of web workers, which allow the execution of the scripts in the background that communicate with the main thread through message passing. This way, multithreaded programming was brought to the browser.

Some of these APIs were introduced after the development of AngularJS had begun; that's why the framework wasn't built with most of them in mind. Taking advantage of the APIs gives developers many benefits, such as the following:

  • Significant performance improvements
  • Development of software with better quality characteristics

Now, let's briefly discuss how each of these technologies has been made part of the Angular core and why.

主站蜘蛛池模板: 花莲县| 黔西县| 德昌县| 咸阳市| 辽中县| 黄梅县| 灵丘县| 余姚市| 岱山县| 镇江市| 清涧县| 淳化县| 武安市| 天柱县| 新郑市| 绍兴县| 白银市| 仁化县| 东乌珠穆沁旗| 西林县| 咸丰县| 巴楚县| 蒙阴县| 读书| 罗江县| 克拉玛依市| 南平市| 噶尔县| 白玉县| 安新县| 瑞丽市| 霍州市| 鄂伦春自治旗| 衡南县| 甘洛县| 砚山县| 乌恰县| 梓潼县| 南岸区| 徐汇区| 临猗县|