3 ms·
Search? Interaction? Collapsable sections? It's 2021.
by coldtea 5y ago
Search? Interaction? Collapsable sections?
It's 2021.
- Klonoar 5y agoNone of these require a framework.
- coldtea 5y agoWe don't use frameworks because they're required, we use them because they make dev lives easier and provide some common ready-made structure and functionality. Strictly speaking, nothing ever requires a framework: after all, any framework is just code - and you could always write vanilla code to achieve the same functionality (up to re-implementing the whole code of the framework yourself from scratch).
- Klonoar 5y agoThis comment does nothing except state the obvious. ;P The parent I'm responding to listed very simple examples that in no way necessitate a framework; of course frameworks can be useful for larger scaffolding and the like. Where exactly do you think you're commenting...?
- Zababa 5y agoRust has all of them with vanilla JS. The code is clear and easy to understand, and could be reused by other people easily. Here's an example: https://doc.rust-lang.org/std/vec/struct.Vec.html https://doc.rust-lang.org/std/vec/struct.Vec.html
- ironmagma 5y agoThere is no way anyone in their right mind would call main.js[1] easy to understand. It's basically complete chaos. Guillaume is making a good effort to clean up this inherited code slowly, but the interactions are still kind of broken and will be until this code is rewritten in a sane pattern such as MVU. FWIW, I have been working towards this for the past year. [1] https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/static/main.js https://github.com/rust-lang/rust/blob/master/src/librustdoc...
- easrng 5y agoLooks easy to understand to me, it would be better if it was set up as modules instead of a single file full of IIFEs but it looks pretty good as is.
- Zababa 5y agoYou're right, as a whole it's not trivial. I remember reading the search part and found it not particularly hard, but I missed the big picture. Thank you for your work!
- coldtea 5y ago>Rust has all of them with vanilla JS. Which is neither here, nor there. Since JS is required for those features (in the absense of a dynamic server backend), who cares whether it's bundled Vue.js or some hand-rolled vanilla JS? I'm sure some care. I'm not sure many care, and I'm even less sure that they have any valid reason to care besides a knee-jerk "bloat" reaction.
- akiselev 5y agoThere is a quantitative difference between a folder with some HTML + other assets and a project that requires a specific v8 runtime wrapper and its own build pipeline to generate the aforementioned artifacts. My grandmother knows how to (and does) use the former. The latter guarantees I'll always have a job.
- coldtea 5y agoIt's a documentation generation tool whose only goal target is official macOS development enviroment, on which all of this is handled automatically via the "compiler" bundled in XCode. It's not some generic tool handed over for random projects to write their documentation on... But even if it was, setting up a build pipeline is trivial for developers including grandmothers who code (it's not intended for their non-coders, whether they are grandmothers or not). Most teams already have similar pipelines for their documentation anyway, whether it bundles JS or not, and are already processing it with Node (e.g. JSDoc), Python (e.g. Sphinx), Java equivalents, and so on.
- Zababa 5y agoIf you look at the chain of comments, I'm saying that you can do with vanilla JS what you can do with Vue, so you don't "need" Vue. You're free to use it of course, but it's not "necessary". That was my main point. > I'm even less sure that they have any valid reason to care besides a knee-jerk "bloat" reaction. I totally agree! Especially if the team is already used to Vue or React or whatever and it will help them produce a higher quality product than going with something they don't know. I do value light software, but not to the point of stupid light [1], and not implementing feature because "Vue is bloat" would be an example of stupid light software. [1]: https://www.arp242.net/stupid-light.html https://www.arp242.net/stupid-light.html
- est31 5y agocollapsible sections are possible using css only, or using the details tag (not even css needed). As for search, you don't need a framework for that.