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

The early days of JavaScript development

To start, you need to dive back into the past of dealing with JavaScript code in the frontend. For a long time, you would end up with these JavaScript files that you'd just download off of a content delivery network (CDN) somewhere, throw into your frontend code, write a bunch of extra JavaScript code in front of that, and call it a day.

This was nice in the sense that you had your dependencies locked down to whatever version you downloaded and stuck on the server, and whatever you deployed was pretty easy to develop against because all of the dependencies were already there and ready to go. Unfortunately, it introduced a ton of problems in many other ways. For one, you would run into issues constantly where one of the libraries you downloaded was completely incompatible with a specific version of one of the specific versions of another library, and often that was a complex and difficult process. The way most people solved that problem was divided into a few camps:

  • Going through and finding all of the incompatibilities and fixing them
  • Writing complex glue code that would make the libraries behave together by wrapping one of the libraries and providing a means for the two libraries to work together
  • Downloading a different version of the library just for another library and storing them separately, resulting in giant JavaScript bundles when you load the web page because you're probably downloading two to three different versions of something, such as jQuery
Yes, that last bullet point is a real thing that real developers did! You can probably see why this is something developers tried to move away from as soon as they could.
主站蜘蛛池模板: 徐汇区| 泌阳县| 乌兰察布市| 晋城| 新邵县| 泗水县| 额济纳旗| 万盛区| 富阳市| 内江市| 巢湖市| 罗江县| 泗阳县| 湄潭县| 大同县| 揭东县| 广德县| 榆林市| 永新县| 巢湖市| 光山县| 甘肃省| 璧山县| 裕民县| 桃园市| 台中县| 黄平县| 曲麻莱县| 射阳县| 东方市| 普兰县| 武邑县| 营口市| 凤城市| 姚安县| 东莞市| 洛宁县| 丁青县| 陆河县| 丹江口市| 霍城县|