3 ms·
You might nod near internet, heck, you many not need staying alive, but here we are. Seriously, after some minimum complexity the ability to create functions a
by notgood 10y ago
You might nod near internet, heck, you many not need staying alive, but here we are.
Seriously, after some minimum complexity the ability to create functions and loops its extremely important. As in you don't need a spoon and a knife to feed yourself, but it sure fucking helps.
- thomasahle 10y agoYou can also read the title as: You Might Not Need JavaScript for that specific thing. If this simplifies the codebase, and gives a more uniform user experience, it's harder to argue against.
- pmlnr 10y agoI remember a time when the coolest thing you could do with JS was mouse trailing bouncy balls. Since then, a lot changed; one of these is that people see JS as salvation from a special hell that doesn't even exist. That giant ball JS that is included in most sites is absolute nonsense and is not needed in 99% of the cases. We include complete libraries where is should only be a portion. I'm aware that this is changing, by "compiled" JS - putting together only the required elements - but usually those still have massive overheads. In my opinion, you should use the tools for what they are the best for. Provide a static, readable HTML first from a backend code - that will run on anything, anywhere; it's accessible, and you've served the main purpose: serving content^1. If you need, add the styling and the animation with CSS. Only after that add the JS layer, which, in my opinion, should mostly be used for data exchange and change triggering. ^1 There are exceptions, there always are; application within the browser, where the main purpose differs from the content delivery. In certain numbers, such as domains, these are the minority; in actual use, it's a different story. ( Imagine a world where the data exchange is not tied together with JS and that we could but other UIs in front of the backends of webapps.. )