![]() As I explained, GraphQL servers can see which requests should be collated and deduplicated and puts them all into one request. Reinventing the wheel has to be done on occasion, but you need to ask yourself if it has to be you that makes it happen,and whether it already has been. That, and over abstractions (any piece of code which branches based on the context of "who's asking").Īnd frankly few things any me more than someone who felt the need to implement their own logging implementation, especially in C# (yes I know we're talking about React, but people do the same stupid crap in that case as well). This frequently means dead code, unused dependencies, comments that don't make any sense, properties on objects that are never displayed or referenced by business logic, and multiple classes/services which accept the same inputs and produce the same outputs but do the job just differently enough you can't be sure it's the same. Over 5-10 years this can have a shockingly large impact on the code base in ways engineers frequently notice but don't understand how the code got to the state its in. ![]() Inevitably something will get left behind. ![]() But some of them will fail to be completed, and someone has to back out the changes that shouldn't go to prod. These initiatives may occur one at a time, or be competing with each other for priority while being incompatible without anyone noticing. The exact initiative, and how valid the request or decision is doesn't matter. Maybe they want to use a "better" authentication library, or add a material framework that has capabilities they need. What I mean is that even if you've followed a specific set of programming principals, code practices and design patterns consistently across the life time of the application, there will still have been initiatives to change how things are done. I primarily agree with you, but his primary point is mainly regarding the tendency for projects at large organizations to have a substantial number of unfished attempts to rework existing applications, which often results in serious headaches for whoever owns the code. Setup resources/transformers as needed on the backend instead of littering the frontend with that logic. Just have your backend API provide the contract. But if they aren't aware of this, then you get a lot of dupe code. ![]() They need to build some new component and go - ok I got the data from the API and now I need to do the thing that's already been done by another frontend dev for another component because we've allowed the frontend to be responsible for transforming the data. It requires way more discipline to ensure that frontend devs aren't recreating the wheel and writing duplicate code as the app and components evolve, and it's worse for larger codebases of course. These are the ones where the frontend devs are getting data from the API and creating new structures, transforming it, conditionals everywhere, etc. Seen too many frontends with a lot of data logic and it becomes extremely brittle, harder to test. It gets data and reacts to it as simple as possible. I like my frontend to be as dumb as possible. Some part of your organizations chaos is going to reflect in code, and honestly I'd rather it be in a big ball of frontend than in the data models, infrastructure, etc.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |