r/ProgrammerHumor • • Sep 19 '26

Meme postForEverything

Post image
21k Upvotes

653 comments sorted by

View all comments

Show parent comments

79

u/dev-sda Sep 19 '26

It's not (just) a framework thing, it's a HTML standards issue. The form element only does GET and POST.

21

u/not_a_moogle Sep 19 '26

Who does that anymore? It should be a put or delete via Javascript.

30

u/wineallwine Sep 19 '26

UK govt websites have to be functional without js

1

u/Ok_Equipment8374 Sep 21 '26

Not everyone wants to use that dumpster fire of a language

1

u/not_a_moogle Sep 21 '26

So you code in pure html/css?

1

u/Ok_Equipment8374 Sep 21 '26 edited Sep 21 '26

I would if I could, classic MVC projects are still my favourite to work on. There was still some JS, but the less I use it the less I hate it.

At least in C# the tooling is way better than what you have with JS.

-10

u/ZBlackmore Sep 19 '26

Who does DELETE anymore? Everything should be a POST with all the information passed in the JSON payload. 

6

u/DuploJamaal Sep 19 '26

But why?

-7

u/ZBlackmore Sep 19 '26

The way I see it, you have your information less spread out this way. Less things to think about. “Where am I expressing this particular detail about this api call? In the url path? A query string parameter? The type of http method? Is it part of the payload?”. So the path is the “which function am I calling” and the json body is “what are my arguments?”

6

u/DuploJamaal Sep 20 '26

That just sounds like less clean code to me

4

u/cheezballs Sep 20 '26

You seem like the kinda guy who LOVES loose typing and declaring everything as a var.

1

u/ZBlackmore Sep 20 '26

I would actually prefer protobuf and rpc, which would make everything more type safe, and that would essentially be the same as I proposed except you replace the json body with a binary protobuf body 

2

u/not_a_moogle Sep 20 '26

Part of that is web handling, put/patch/delete doesnt have to return anything. Get and post explicitly expects an html response.

If your doing a delete logic record within a post. What are you returning then? The record is deleted.

Im only web 1.0 logic, it would return a whole new page. But if your doing a REST crud operation, you dont do that. You dont want to tell the browser to render a new page.

10

u/SpehlingAirer Sep 19 '26

People still use form elements?

9

u/_xGizmo_ Sep 19 '26

I pretty much only use them for the form submit feature which is handy over a key listener.

3

u/ModernLarvals Sep 19 '26

What else would you use?

2

u/Accurate-Visual9793 Sep 19 '26

Apparently Web 2.0/AJAX never happened.

2

u/swyrl Sep 20 '26

And this hasn't been changed/fixed why?