5 ms·
Cool. Project Manager: Now add 3 checkboxes, one being 'N/A' and when you select N/A the other checkboxes are disabled and unchecked. And update the labels, an
by benbristow 5y ago
Cool.
Project Manager: Now add 3 checkboxes, one being 'N/A' and when you select N/A the other checkboxes are disabled and unchecked. And update the labels, and have additional form sections showing depending on which checkbox is displaying.
Probably not that difficult, and probably a bad example, but with React/Vue/etc. it's a lot easier to deal with complex states than manually manipulating the DOM.
From experience trying to be clever and anti-framework ends up just creating another framework that's worse in every imaginable way.
- edem 5y agoAnd they also end up with a lot of useless framework knowledge they'll never use again after the project goes up in flames.
- lawwantsin17 5y agoThis comment is the reality. Everything else is marketing.
- marcosdumay 5y agoHum... Your new function reads all the checks, calculate the new values and enabled conditions, and applies them. It's called by the onChange of all of the relevant elements. Reactive frameworks do make your life simpler (at least once you pay for the large one time cost of using them), but the change isn't enormous.
- benbristow 5y agoOr you just use React and it has that function already built for you... All you need to do is call setState
- marcosdumay 5y agoYou certainly doesn't mean that React has your business rules builtin.
- benbristow 5y agoNo, but it'll deal with changing the UI depending on your state once you've wired the rules in.
- mattgreenrocks 5y ago> clever Virtual DOM qualifies as clever in my book. :) Better question to ask is why so many libraries/frameworks proliferate in webdev and not as much in native apps. JS is a suitably powerful language these days. Also, the attitude of “just use jQuery like everyone else” (paraphrasing the last paragraph and substituting for React) would have precluded the development of React.
- benbristow 5y agoThe cleverness is abstracted from you as a developer and the cleverness is maintained by an open-source community and a huge corporation (Facebook). With native apps you definitely have frameworks available now. React Native for an example. But the languages and toolkits available basically serve as a framework anyway.
- mattgreenrocks 5y agoIs cleverness only allowed for the FAANGs of the world? I cannot subscribe to such a nihilistic view of computation. SICP should be required reading for any serious dev if only to expand their imagination beyond an industry that is intensely focused on boiling the difficult and creative endeavor we call software development into a discrete, repeatable process.
- benbristow 5y agoI mentioned the open-source community in my comment. So a collective of knowledge of many talented developers from the public, and also the stewardship of a FAANG and their developer talent pool also.
- _nub3 5y agois that how react was invented?