this post was submitted on 20 Nov 2024
49 points (96.2% liked)

Programming

17565 readers
272 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 2 years ago
MODERATORS
top 14 comments
sorted by: hot top controversial new old
[–] [email protected] 17 points 1 week ago (1 children)

This is sorta funny for me because as a non cs major who went into it it seems like all the api's I work with are called rest apis and I was always wondering what a non rest api would be.

[–] [email protected] 14 points 1 week ago (2 children)

SOAP, which is basically dead, or GraphQL.

[–] [email protected] 11 points 1 week ago* (last edited 1 week ago) (2 children)

Hahaha, don't underestimate jank ass vendor systems. My workplace has at least one business critical thing using SOAP. We've been spinning our wheels on deprecating the damn thing for three years.

[–] [email protected] 4 points 1 week ago

Lol, I probably should have said "legacy". Would hope no one is writing new SOAP APIs in 2024!

[–] [email protected] 1 points 1 week ago

Our government a few years ago made a cool new system to ~~sniff on small businesses because they don't have enough money to defend themselves properly in court~~ track cash transactions and it was so hip and new that it used SOAP. That was the first* time I worked with SOAP, until then I managed to avoid it.

* I technically worked with SOAP once before but the part I worked on was like ten abstractions away from the protocol.

[–] [email protected] 2 points 1 week ago

see. now I have seen references to soap but never really got that to. when it comes down to it my biggest concern is things just work.

[–] vzq 5 points 1 week ago (2 children)

This is all very “old man yells at cloud”.

Interesting historical note, but things change.

[–] [email protected] 25 points 1 week ago (2 children)

I'd Agree in most cases, but not in this one.

Rigor in definitions allows us to express a lot of complex things in a compact form. this allows us to treat "Cars" as something different than "Motorcycles" while both a motorized vehicles.

the same is true for REST-API and other API-Types, while all of them are just a means to allow services to exchange data, they tell us a lot about how this exchange happens and what to expect, but only if we use the words in a way that they represent the concept they were meant to represent. Otherwise we end up with meaningless buzz words like "rest", "agile", "scrum", "artificial intelligence" and so forth, instead of meaningful terms found in the jargon of other engineering disciplines like "magnetism", "gravity" or "motor".

[–] [email protected] 18 points 1 week ago (1 children)

We're well past that. I would probably care more if the original idea behind REST solved a real problem, but it doesn't. It's architecture astronaut stuff.

If REST is just about using HTTP verbs and status codes smarter, and sending the payload in JSON, I'm good to leave it at that. It's useful.

[–] vzq 16 points 1 week ago

Besides, the original definition is not reflective of real world needs - which is why it’s morphed to something else.

[–] [email protected] 7 points 1 week ago (1 children)

Rigor in definitions allows us to express a lot of complex things in a compact form. this allows us to treat "Cars" as something different than "Motorcycles" while both a motorized vehicles.

Meh. There's plenty of room in the gray zone between "car" and "motorcycle" where things like this or this can exist. The botanical world has worked very hard to create rigorous definitions of fruits and vegetables only to be completely ignored by cooks. The culinary world in general has done just fine for centuries without rigorously specifying whether taco's are sandwiches and cereal is a soup.

As long as it is generally understood what people mean by a word when they use it everything will be mostly fine. REST is an understood term, whether the inventor of the term meant something else by it is immaterial.

[–] [email protected] 8 points 1 week ago* (last edited 1 week ago) (1 children)

my problem is not with words changing there meaning its with words losing meaning.

rest api today means any api ontop of http where response bodies are json, but nothing more, we can't get much more general when talking about web apis than that, "rest" is almost meaningless and we don't have a new word describing APIs that adhere to the constraints of what restful meant, but those are a useful tool for building web applications that can easily be used by a web browser. no matter if you like fielding-rest-style-apis or not, you lost the ability to call them by a name and gained murky mumbo jumbo for it.

[–] [email protected] 5 points 1 week ago

I'm my observation, as a nearly-30-year-vet in the field, it's due to the same factors as always. The technology doesn't enforce the standard. So people do any fucking thing they want because they honestly don't know any better.

I'm working on an app right now. On one of the controllers there is a single endpoint, out of about 30 (which should fucking tell you something right there) that conforms to restful standards. Every single other one of them is wrong. Because folks didn't know better and leaders didn't lead/teach/know any better themselves.

[–] [email protected] 6 points 1 week ago

A cargo cult doesn’t change airplanes by building mock runways - they rather miss the point entirely.