by mg · 4y ago · 0 comments
My projects are usually either in the form of "User enters data, sends it to the server, server sends a new page back"
Example: https://www.gnoosic.com/faves
Or in the form of "User changes parameters on screen, Javascript updates the screen accordingly".
Example: https://www.productchart.com/laptops
In both cases, I don't see the benefit I would get from a framework.
If you have built a project that is public and benefits from using a framework, I would love to see it!
The real value of public frameworks comes into play when you have more than one generation of developers working on your project.
It's much easier to onboard a new developer onto a react app than it is to get them to understand the weird bespoke nuances of the conventions you came up with while hacking on your site at 3am 5 years ago.
That is why I proposed a discussion based on real life examples.
The other thing is that frameworks change. You picked React for your example. A currently popular framework. Chances are, the next developer will not come on in 5 years, but in 15 years. And does not know anything about React. Or about React as it is today. Then they might have a harder time understanding React than to understand a well written, minimalistic piece of Javascript.
That doesn't seem likely to me at all. More likely in the next 6 months than in 15 years. Why are you planning for 15 years out? The company you are working for might not be around in 15 years. Code might not even be recognizable in 15 years. All of our programs might be written by AI in 15 years.
Optimizing for the short term makes way more sense to me. 2 or 3 years out, not 15.
Sorry but a “framework” used by one project (especially not broken out into a separate subproject) is not a framework. That’s just infra code.
I think your point still stands that the value is developers understanding a framework can more quickly get to work—I’m just triggered by your exceedingly liberal usage of the word “framework”.
Infra code that over time, as your app grows, takes on more and more of the features of a framework
Once this gets a bit more complicated you have a bunch of state to keep track of and you have to make sure to re-render only the parts that have changed, and deref that parts that should be GCd. I'll happily take on a reactive UI framework dep if I can avoid writing my own diff pipeline.
Not endorsing react by any means though.
- transpiling JS back into the stone age for compatibility
- accessibility
- seamless localisation
I have found I just can't keep track of all of these things as well as React does.
At the same time, I think React is a huge, dependency-laden mess, very difficult to learn (because it's changed its mind on how to do things about 100x, so no responses to issues on SO apply to your version of React, Redux, React Router, etc), slow as hell and probably overkill for most projects...