Timeline for Mixing JavaScript and server-side scripting
Current License: CC BY-SA 3.0
20 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
S Apr 16, 2018 at 13:02 | history | suggested | Grant Miller |
Add 'javascript' tag
|
|
Apr 15, 2018 at 6:06 | review | Suggested edits | |||
S Apr 16, 2018 at 13:02 | |||||
Jul 21, 2017 at 8:14 | history | tweeted | twitter.com/StackSoftEng/status/888311320101007361 | ||
Jul 4, 2017 at 0:36 | answer | added | John Scattergood | timeline score: 3 | |
Jul 3, 2017 at 21:58 | answer | added | Ubernator | timeline score: 0 | |
Jul 3, 2017 at 20:27 | comment | added | jinglesthula | Put another way, if I commented on or downvoted the answers on the other question because they didn't say why it's bad, I'd mostly likely be told to ask "why" as a separate question. | |
Jul 3, 2017 at 20:21 | comment | added | jinglesthula | @scriptin "get out of hand" is very general. I'm really looking for specifics. If I'm to convince the ship to change course, saying what I did above would only prompt the question about measurable benefits or clear and specific well-validated principles being violated. I intuitively feel it's a bad approach, but am looking for help articulating more concrete specifics. | |
Jul 3, 2017 at 20:17 | comment | added | jinglesthula | @amon "Try decoupling" is suggesting a remedy, not answering why it's bad. "Comprehend separation of concerns and progressive enhancement" is the same. "Not as simple as you would hope" answers why but is mighty vague. "For organizational purposes" is better. XSS risk is orthogonal (though related). "bad enough...(IMO)" doesn't speak to why. The main point is that the OP in both cases asks different questions (even if some answerers on the other question supplied a few bits of "why"-ish material). | |
Jul 3, 2017 at 19:44 | comment | added | Tulains Córdova | +1 Good question and good writing ("the bog of eternal stench" ;)) | |
Jul 3, 2017 at 19:43 | comment | added | Tulains Córdova | @scriptin But you can certainly incur in an anti-pattern. | |
Jul 3, 2017 at 19:42 | history | edited | Tulains Córdova | CC BY-SA 3.0 |
edited body; edited title
|
Jul 3, 2017 at 18:56 | comment | added | scriptin | And there is no such thing as "violation of a design pattern". You either use them (appropriately or not) or you don't (appropriately or not). | |
Jul 3, 2017 at 18:55 | comment | added | scriptin | You answered your own question when you said, "I could see (and have seen) this willy-nilly mixing get out of hand and create maintenance issues and debugging headaches." This is exactly why it is a bad practice. | |
Jul 3, 2017 at 18:54 | comment | added | amon | The proposed duplicate does answer your "why is this a bad practice?" question: (a) "Try decoupling the two languages by making data their only interface – don't mingle the code." (b) "What you're supposed to do is comprehend what Seperation of Concerns and Progressive Enhancement mean. This basically means you have dynamic HTML and static JavaScript" (c) "escaping inside a javascript context is not as simple as you would hope [...] risk of a XSS bug slipping through" (d) "just for organizational purposes, this can get very annoying. It's bad enough to mix html and php (in my opinion)." | |
Jul 3, 2017 at 18:34 | comment | added | jinglesthula | I edited to indicate the distinction between the two questions | |
Jul 3, 2017 at 18:33 | history | edited | jinglesthula | CC BY-SA 3.0 |
indicated why this question is not a duplicate
|
Jul 3, 2017 at 18:28 | review | Close votes | |||
Jul 21, 2017 at 3:02 | |||||
Jul 3, 2017 at 18:26 | comment | added | jinglesthula | @gnat that one asks if it's considered a bad practice. This question asks about design patterns the practice violates, and about specific arguments against the practice, so I think this one builds off the other. Kind of an "is it bad?" "yes - ok, why?" followup. | |
Jul 3, 2017 at 18:10 | comment | added | gnat | Possible duplicate of Is it considered bad practice to have PHP in your JavaScript | |
Jul 3, 2017 at 18:02 | history | asked | jinglesthula | CC BY-SA 3.0 |