⬆️ ⬇️

Modern web development. How did we come to this?

The modern world of web development has become one big crutch. And a crutch, which, in order to at least somehow work, needs a couple of thousand more crutches glued together with tape.



Crutches await us everywhere: from server-side headers designed to provide security for applications (CSP), headers that allow interaction between applications (Cross-origin resource sharing), and ending with assembly tools.



Solving one problem, we create a couple of new ones and they are already rushing like snow avalanches, demolishing everything in their path. If in doubt, you can see the statistics of questions on the glassflow flow, where javascript is already the undisputed leader.



Are there people in the room who tried, for example, to write a project on Angular 2 and build it using a Webpack? This is hell.

')

For example, you decide to use ES6 syntax, but Typescript says that it cannot use your Map as an array until you set target = es6 (or rather, Google tells you so). Expose, but now Typescript swears on duplicate ads in es6-shim.d.ts. You remove these ads, but now uglify swears that he cannot understand what a let is (or rather, Google tells you that, because the error is something unintelligible and not related to let at all) ... You fasten babel. But now Ulgify has renamed [ngClass] to [ngclass] and Angular swears that he does not know such a property of the element ...



As a result, you get an assembly size of 2 MB (after minification 760Kb)! And you start to write a webpack-crutch, which will postpone the loading of any modules until the desired moment. And all this is solved terribly through the regulars.



And this nightmare repeats again and again.



The situation with frameworks and libraries is already reminiscent of the modern world of mobile phones. It makes no sense to learn something longer than a week, because after a year it is already morally obsolete.



Grunt, Gulp, Broccoli ...

R.js, Browserify, SystemJS Builder, Webpack ...

Flux, Redux, ... put your



And this also goes on forever. Some projects do not even have time to get out of beta, as they are hopelessly outdated or do not take off (Polymer for example). Some projects appear unclear why and duplicate what is already there (WebRX).



Webpack, as for me, is generally the ideal of a crutch. I thank him at least for collecting many crutches in one place. (The truth is now that npm is full of modules with ambiguous names such as raw-loader, base64-loader, it was difficult to prefix your loaders).



Writing documentation, apparently, has become no longer fashionable. What for? Open Source. A person can open the source, and there, you see, will understand and zaptribyuit.

Source: https://habr.com/ru/post/357660/



All Articles