- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I wonder if was frist something else that devolved into this mess we got.
Admin
Anyone care to explain why we hate it? I do this quite frequently in my Razor View code.
Admin
Well, it works. It does nothing on Javascript side and sets a variable on PHP side. But indeed, it does not work as the author expected...
Admin
Blurring your state across front-end and back-end is just bad separation of concerns. It makes everything harder to test and debug.
Admin
I think the author used a conditional PHP once to generate a Javascript code and it worked. So they tried in reverse...
Admin
Balzor is different because it's designed to let you write server-side looking code that runs on the client. PHP doesn't.
Addendum 2025-04-21 11:06: Blazor*
Admin
Using a template to generate JavaScript code that injects parameters into a page is not completely intolerable. Doing it the point of parameter use, with inline calculation logic, entangles and obscures the content of the page and the logic of the calculations. Every effort should be made to consolidate parameter calculation in one code block, leaving the page to consume them without question.
Now, maybe you have lists on your page that are generated from particular database queries, and you think it would be cool and efficient to generate them in a stream from the database cursor, but I suggest that a template that generates more than one such list probably isn't getting the benefit from it that you assume, or it should be subdivided.
Admin
They must not have code review or any testing. If I try to check in code like that it won't be accepted or fail the QA process. It most definitely would not be deployed to production and lead to a host of tickets on the backlog.
Admin
What fascinates me is the bizarre persistence of the offending developer. Like I just find it wild that they keep pumping out the same non-working code without trying a different approach...