4 ms·
I get Javascript fatigue, and all the criticisms aimed at the language, and while it's not totally ideal, I feel frameworks have helped tremendously by either b
by ezzzzz 7y ago
I get Javascript fatigue, and all the criticisms aimed at the language, and while it's not totally ideal, I feel frameworks have helped tremendously by either being opinionated enough that you can do things in a predictable way (angular/vue) or are flexible enough to design complex flows and views as small, easy to reason about components (React/Redux).
I have seen some horrible stuff as an enterprise dev, from poorly constructed jQuery projects, to old frameworks like Struts/Stripes that just get out of hand. No real way to test, full of side-effects and bad choices, TONS of dependencies (outdated/unmaintained UI libraries etc). I often wonder if people complaining about JS and Frameworks have any experience developing or maintaining legacy web applications from the days of yore. Back when the web was young, there just wasn't a good blueprint for how complex web applications should be designed. We've come a long way, and for better or worse, the JS community has made improvements to the language, frameworks, etc, all of which make our jobs SO much easier.
- doublement 7y agoI work with JS as a low percentage of my total work, and recently tried to bring a 2-year-old Vue-based project up to date with the latest versions of everything. I failed in my task. With these frameworks, given enough time, there ends up being a lot of "deprecated boilerplate" code, either directly or via dependencies. E.g. Vue is closely coupled to Webpack, and Webpack deprecated so many things between versions 2 and 4, that there's essentially no mechanical way to migrate the code. One must figure out every detail of the auto-generated Webpack config from version 2 and figure out how to do the same thing in version 4. (I'm looking at you, CommonsChunk and splitchunks!) Legacy applications from the days of yore didn't "bit-rot" like this.
- ezzzzz 7y agoNot saying that this isn't a problem, aka dependency hell. And giving some hand-wavy solution like 'well, be more careful about what packages you pull into your project' or 'well, f it, just don't upgrade your version of Vue or Webpack' is also not ideal. There is another type of hell, where changes to modern browsers or the JS language itself cause the (long abandoned) library code that your entire application is coupled to to break completely. At that point, your only options are to tell your users they have to run the website in 'legacy-mode' in IE, or rebuild an application from scratch, teasing a decade's worth of business logic out of poorly designed code (i.e. business logic in JSP/php tags etc).