Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
ars140632yNothing better than 5 nested levels of stringified html to start your day with. Of course, each is at least around 300 characters long, not counting concatenation functions. All courtesy of the company CEO.
-
nitnip18142yI'll never defend an enormous switch statement but using a fetch or xhr request to get html back instead of json is a perfectly valid approach.
One drawback is of course, the response size will be heavier. -
wicho25632y@jcbbb
First of all SWITCHES ARE EVIL
IT's 2023 USE FUCKING CLASSES
NEVER PASS CONTENT THROUGH PHP MEMORY, THAT"S HOW YOU AUTO DDOS YOURSELF
If no FE framework is avail. create an empty html and fill it accordingly just by pulling the right variables NOT FUCKING HTML -
wicho25632y@nitnip They save the buffer into PHP and spit the variable back, that's memory raping
-
Never work for a company where a director or manager wrote the code.
You’ll be powerless
Related Rants
Hours spent figuring how a select (dropdown) was created plus the whole flow of an app.
Me: "They won't be so stupid to get the whole html via ajax"
Me: *facepalms" they did
Me: Discovers the ajax call is handle via a giant switch statement
Me: All html is handled in memory
Me: Discovers the now Director of Development did it
Me: *Dev Rants*
You: Check my previous rant and confirm it
devrant
html
php
ajax