Why is modern web development so complicated? Part 1

Modern front-end development leaves a polar impression: some love it, others despise it.



I am a big fan of modern web development, although it reminds me of some kind of “magic”, with its pros and cons:





I recently had to explain “modern web development workflows” to people far from this, and ...



I really had to explain a lot!



Even a superficial explanation is quite long. But still try to trace the evolution of web development:



Part 1: How we got from static sites to babel






The easiest site: static



Let's start with the "classic" web development, which everyone should understand.



In classic development, we directly modify HTML / CSS / JavaScript files. To view the result of the changes, open the HTML file locally in the browser, and as we develop, we refresh the page.



The working process



The workflow is as follows:



  1. We edit HTML / CSS / JavaScript in a text editor such as Atom.

  2. Save the file in a text editor.

  3. Open or reload the file in the browser.




Editing JavaScript, saving the file, updating the page



Deployment



When you want to publish your site on the Internet, we just upload these HTML / CSS / JavaScript files somewhere.



With a service like Netlify, you can simply drag and drop a file folder to publish a page on the Internet. Here is an example of a published page .



It is so simple! Why did everything complicate ?!



If you understand how the “classic” workflow works, then you can say: hell, it’s really simple and convenient. Why did you need to change it ?! Why is modern web development so complicated?



The short answer is ... Okay, two short answers.



Two short answers:





To understand the tools we need to understand the challenges of modern web development. In these articles, we will consider each of them individually, starting with the old web development problem that has existed for decades:



Old issue: JavaScript limitations



Until recently, JavaScript and the Web API had many limitations (for a variety of reasons that we omit).



Here are some of them:





Browsers can only execute JavaScript, so you cannot overcome the limitations using another language.



Separately: What is the difference between JavaScript and the Web API?



You may have noticed that I said “JavaScript and Web API” above. These are two different things!



When you write JavaScript for a web page, any API call that interacts with the web page itself represents the Web API (which happened to be written in JavaScript), but it is not part of the JavaScript language.



Examples:





, Node.js, JavaScript , , , document.querySelector



( ).



: jQuery



2006 jQuery, JavaScript Web API.



jQuery API, -, DOM, , - .



, : JavaScript Web API, , . , , JSON, jQuery jQuery API.



: JavaScript



2006 !



JavaScript Web API , jQuery , !



JavaScript â€” . , , JavaScript .



, “ES6”. “ECMAScript 6” 6- ECMAScript. ECMAScript — JavaScript. “ECMAScript” , “JavaScript” — .



(, : JavaScript / ECMAScript; “HTML” / « HTML». , ! , ! JavaScript ECMAScript â€” ).



ES6 ( 2015 ) , JavaScript, const



, ( ES8 : async



).



Web API 2006 , document.querySelector, fetch classList hidden.



jQuery 2019 , , JavaScript Web API.



… !



- :



JavaScript, ( Web API, JavaScript).



, 1)  ; 2)  ; 3)  ( ).





: JavaScript? ( )



. , JavaScript, . , - , , , .



Babel.



Babel â€” JavaScript, JavaScript … JavaScript! , JavaScript, JavaScript, , JavaScript, .





Babel JavaScript,



: Babel Web API



, fetch



JavaScript, babel ( «»), fetch



 â€” Web API, JavaScript ( ).



, Web API! .



: + babel



, , babel. - ?



, ( Parcel webpack, ).





  1. * Babel

    (* CLI, , npm. babel npm dev , )




  1. -.





    : JavaScript src




, «» JavaScript, JavaScript, .



, :



  1. JavaScript babel, :







    , JavaScript :





    : Babel “script.js”,

  2. JavaScript HTML CSS:





    * , , , babel .



    • babel: / script.js

    • babel: / script.js


    (*! Debug Release, !)








, «» «» ():





, :





- Babel.



! :





, -.



( , Debug Release , - -. , , - - Debug/Release).



, :





, !



: npm



npm ( ) ( ), .



All Articles