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

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.
主站蜘蛛池模板: 惠东县| 阿克| 志丹县| 瑞安市| 孟州市| 贵阳市| 三穗县| 桂平市| 万州区| 集贤县| 界首市| 兴国县| 鄢陵县| 绵竹市| 邳州市| 克山县| 合山市| 和平县| 五峰| 南岸区| 清徐县| 丽江市| 建瓯市| 萨嘎县| 景东| 桐庐县| 汉川市| 芦山县| 左权县| 汝城县| 巴青县| 余干县| 千阳县| 拉孜县| 梧州市| 南江县| 金堂县| 梁平县| 岚皋县| 石泉县| 临颍县|