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

  • Vue.js Quick Start Guide
  • Ajdin Imsirovic
  • 346字
  • 2021-06-24 18:23:54

Vue, a jQuery successor

The famous jQuery library appeared in 2006. When it came out, it did a few things beautifully:

  • It made writing cross-browser JavaScript a lot easier, which was a big plus at the time since it dramatically decreased the need for developers to mess with various browsers' quirks and inconsistencies
  • It had a simple syntax that made it easier to target and manipulate specific DOM nodes, which is beautifully phrased in their motto write less, do more
  • It was an excellent entry point to learning JavaScript in general
  • It had a great API that made working with Ajax simple and easy

However, a lot has changed since then—for the better.

Arguably, the biggest improvement that happened in JavaScript-land between 2006 and today is the virtual DOM. 

The virtual DOM was a paradigm shift: we no longer had to write procedural, spaghetti JS to instruct the browser on how to traverse and manipulate the DOM. Instead of telling the browser   how  to update the DOM, we can now simply tell it   what  to update. Or, to be more specific, we tell a framework what to update—a framework like View or React. The actual implementation of the virtual DOM is framework-specific and not really something to be concerned with at this point.

We can now work with the DOM indirectly, by using declarative code that deals with the virtual DOM implementation of the underlying framework. This abstraction is the one thing that more or less made jQuery redundant.

Of course, since so many apps are still powered by jQuery and since legacy code has a tendency to stick around, jQuery will be alive and well in the years to come. 

However, the paradigm shift in the way we think about DOM manipulation makes Vue a strong contender to jQuery's throne as the most popular game in town.

Vue also has other advantages: it is an excellent starting point to learn present-day frontend development. The barrier to entry is really low.

主站蜘蛛池模板: 滦南县| 灯塔市| 毕节市| 寻甸| 宜春市| 当雄县| 西贡区| 永州市| 英吉沙县| 青铜峡市| 通州市| 遵义市| 扶沟县| 永宁县| 东乡县| 阿拉尔市| 临沧市| 任丘市| 安阳县| 梓潼县| 大名县| 衡南县| 长垣县| 突泉县| 凌源市| 洛南县| 广南县| 南丹县| 乌兰县| 温泉县| 宜章县| 苏州市| 玉屏| 日喀则市| 河间市| 延吉市| 沙坪坝区| 介休市| 双柏县| 龙山县| 方正县|