3 ms·
And suggesting to simply “write the calculators as JavaScript” vastly understated the effort required to make a reactive form that performs calculations, drives
by lloydatkinson 4y ago
And suggesting to simply “write the calculators as JavaScript” vastly understated the effort required to make a reactive form that performs calculations, drives graphs, renders tables, all as the user types (just like Excel or Google sheets).
This is literally the reason frameworks exist: to handle user input, managing state over time, and then updating the UI in response to changing of state.
By suggesting a framework like I did, allows OP to focus on writing the actual calculation code and and to build their site - not spending time writing user inputs and bindings and manual DOM updates.
- throw1234651234 4y agoThe problem with React & Angular is that junior devs can't see the line between the framework and the raw JS/HTML/CSS. You genuinely do need to understand the basics of the former to use the latter. You do make a good point (perhaps accidentally) about libraries for output. As a backend dev, the opening poster should be able to understand the concept of magicLibrary.drawGraphyThingy(wowSuchValues);
- lloydatkinson 4y agoFortunately OP doesn’t appear to be a junior, so I imagine he would be able to use the frameworks (and learn why they exist to begin with) much faster than learning raw DOM just for some purity argument.
- throw1234651234 4y agoI think we understand each other and are going down an argument rabbit hole here. I will just state what we agree on - OP shouldn't learn to write responsive pages through raw DOM. My side of the argument is that he/she doesn't need to go past let value = document.getElementById("foo").innerHTML and form submission. Your argument is that they should just learn a framework or something that can render React components. My counter-argument is that it's basically learning modern front end design, and there is nothing simplistic about it. tldr: DOM bad. Simple form submission and using server for heavy lifting is alternative. Using full power of modern tools is another alternative. Definitely mutually exclusive.
- ecshafer 4y agoI don't see any need for state management in these requirements. You have form that performs a calculation and prints out an html table in the results or a single value. All of this can be done with dead simple html and js, and it would probably be 10000x faster than a react hello world page. I have made little tools like this in pure html and JS before. Its really quite straight forward and using a framework is overkill.