1. 程式人生 > >Ask HN: Would you buy a book on using modern JavaScript with legacy web apps?

Ask HN: Would you buy a book on using modern JavaScript with legacy web apps?

For essentially my whole career I've been working for companies with MVC-ish web applications. There's been a few common things that I worked to resolve such as:

- script tags on every page

- copy/pasted code

- multiple versions of the same dependency (such as a different version of jquery on every page)

- ad hoc approach

- reinventing the wheel

- no testing

- no linting

Over the last few years I've honed an approach that I feel could benefit other developers who are in the same boat. It's basically a set of steps for modernising front-end code and taking back control of your codebase.

I plan to cover things like:

- code bundling

- effective folder structure

- refactoring inline scripts into the bundle

- code execution using location/hash parsing

- introducing view engines like react/vue

- choosing the right language (vanillaJS, es6, typescript etc)

My gut says that there are plenty of teams working on applications like what I have described above and yearn for a better process. My question is... would anyone buy it?