4 ms·
You definitely don't want to go reinventing the wheel. The problem that I find, especially in the React community is the belief that everything should be done i
by richeyryan 6y ago
You definitely don't want to go reinventing the wheel. The problem that I find, especially in the React community is the belief that everything should be done in the framework. How do you make an API call in React? How do you change the page title in React? How do you convert a string to an integer in React? People create libraries that are closely coupled to React when 90% of what they're trying to achieve could be a plain Javascript module. This isn't just React, its most of the frontend Javascript frameworks.
I think the idea here isn't to abandon frameworks entirely but to use them judiciously and appreciate what can live outside the framework as much as what the framework already gives you:
"Nonetheless, we believe that a framework, when chosen, should be used responsibly throughout the life of the project. Continuously remind yourself that every tool has some kind of tradeoff.
Frameworkless means that you must give the right importance to the technological decision making and realize that the choice to develop a project or a single feature with no dependence on a framework is a real possibility!"
- pcl 6y ago> “ Frameworkless means that you must give the right importance to the technological decision making and realize that the choice to develop a project or a single feature with no dependence on a framework is a real possibility!” The thing is, following normal English rules “frameworkless” means “without frameworks”. It’s good to see that the authors know this, but sad to see that they are so blatantly tapping into confusing terminology right there in their pitch. I get it that this has been a bit of a trend (“serverless”, anyone?), but the fact that others do it isn’t a great excuse. Hey, they could even riff on the theme while staying true to the language by going with “Lessframework Movement”.
- richeyryan 6y agoI agree with you. I clicked the link being ready to object and leave a comment and found that it was much more in line with my opinions than the title would suggest. Literally the title isn't what the concept says it is. I think there is an element of marketing at play with it. Some of the alternatives seem tentative. Perhaps the Framework Skeptic Movement is better? Like Scully in the X-Files, which I've been re-watching lately, you don't go in blind wanting to believe things are as they seem but you look for the evidence and if there is no better explanation then yeah maybe it was a man with a regeneration gene that can't be killed. Maybe relying on the framework is the best way forward.
- yellowapple 6y agoI mean, it's the same idea behind stainless steel - i.e. steel that stains less, rather than being entirely impervious to staining. Whether most people will catch onto that is still a relevant concern.
- neolog 6y ago"How do I add two integers together with Twisted?" https://stackoverflow.com/questions/7313761/how-do-i-add-two-integers-together-with-twisted https://stackoverflow.com/questions/7313761/how-do-i-add-two...
- richeyryan 6y agoNice, I appreciate the example from another ecosystem.
- bshimmin 6y agoWhat a bizarre thing - that question is actually a thought experiment (or something) by the author of Twisted!
- void_mint 6y ago> he problem that I find, especially in the React community is the belief that everything should be done in the framework. How do you make an API call in React? How do you change the page title in React? How do you convert a string to an integer in React? People create libraries that are closely coupled to React when 90% of what they're trying to achieve could be a plain Javascript module. This isn't just React, its most of the frontend Javascript frameworks. This matches my experience as well. It feels kinda wild - lots of other areas have taught to separate concerns as much as possible, meaning React would just be a View layer that renders content but is unrelated to the rest of the application. In reality, everything seems to get stuffed into React, such that React becomes your entire application.
- richeyryan 6y ago"React would just be a View layer that renders content but is unrelated to the rest of the application" This is how I treat it. React or more generally the view handles form state and stuff like modal visibility. Things that a user can interact with so to speak. I have a lib folder that which is the library of my business logic. Concepts related to our domain, analytics, validation, captchas etc. Some of it is shared between client and server, some of it is specific to either. Then I have my data layer. From my experience a lot of the data handling is interacting nodes (or stores) that can update asynchronously and react to each other. I use Effector (https://effector.dev https://effector.dev) to declaratively map all this. For example when a user submits their details it triggers the recaptcha check which if successsful triggers the saving of a user and the creation of a lead and once we have a lead token we navigate to the next page in the flow. Handling logic like that in React can really complicate components and the primitives in React aren't really well suited to it. So I found Effector and its been great. The added bonus is it makes the React components responsible for one thing, which is capturing user interaction. They capture events and forward them into Effector. The React code is clean and if I want to drastically change the UI or alter the flow everything is loosely coupled. Overall I'm quite skeptical of anything that reinforces this all in one approach to things. I appraise the pitched value and figure out how it can be achieved in a more separate way. The answers might not be immediately obvious and it might not be as easy to get started but I feel the overall result has been great so far.
- pruski 6y agoBut it’s a problem with bad developers, not a framework. On the other hand, think of the code those guys could write without a proper “framework”