r/ProgrammerHumor • • 21d ago

Meme everyNetworkAPIOnThePlanetToday

1.4k Upvotes

377 comments sorted by

1.3k

u/Yctallua 21d ago

Oh no, a standard has established among the developers.

Time to bring about the new standard that everyone will surely use instead.

152

u/Western-Anteater-492 21d ago

OP wants to push the next js framework. I'd get react as a lot of apps would work better without it. But json? What he wants instead? XML?

142

u/ProfBeaker 21d ago • Helpful

I encode all my API calls as images and stream them back and forth with dynamically-generated <img /> tags, like Satan intended.

(Although really, tons of other network APIs are used. Just not so many in the browser.)

38

u/Sulungskwa 21d ago

all of my webapps use ftp to get the html files

→ More replies (2)

6

u/xanhast 21d ago

nice, i assume you send each call through zlib

12

u/ProfBeaker 21d ago

I heard brotli was more secure. And also ideal for image content. Or something.

31

u/larsmaehlum 21d ago

Probably one of the toml freaks

10

u/wsheldon2 21d ago

I kinda do like toml

and bare feet

18

u/TheRealKidkudi 21d ago

Brb writing a serialization library to encode/decode data in feet pics

→ More replies (4)
→ More replies (1)

9

u/sagetraveler 20d ago

When do we get a standard that merges JSON and XML? That will be one ugly bastard love child.

5

u/Western-Anteater-492 20d ago

Behold! My overnight Claude repo incoming

Edit: 3m downloads on npm and 15 cves? Thank you guys! ☺️♥️

6

u/mxmcharbonneau 21d ago

Plain text to be read by an LLM

2

u/qpqpdbdbqpqp 20d ago

I once wrote an api that responded in hex

shudders

2

u/SameThingOnADiffAcct 20d ago

There's an argument for binary. Protobuff. ASN.1. Whatever.

JSON is just so much easier to deal with, though.

→ More replies (10)

379

u/rixinthemix 21d ago

*There are now x + 1 standards.*

10

u/ddnomad 21d ago

The REST part is more of a vibe, than a standard tbh 🤗

3

u/Training-Chain-5572 18d ago

My favourite part about REST is that you can still work with solutions that fuck it up. "What do you mean I can't do a GET to /api/<resource>?" Dev: "oh no you have to do a POST to /api/<resource>/GetData"

4

u/No-Information-2571 20d ago

a standard has established among the developers

Standard or smallest common denominator. You decide.

I don't even know if the average developer there does at any time really consider options. It's there, it works, and most devs only need to worry about it when it breaks.

3

u/Perfect_Gold_6967 18d ago

What exactly is the issue with using something that works?

→ More replies (3)
→ More replies (4)

417

u/a3dprinterfan 21d ago

You like SOAP or something? 😐

190

u/QCTeamkill 21d ago

I wish more people would too, especially in the subway

51

u/Skyswimsky 21d ago

Had me in the first half.

7

u/Legitimate_Payment49 21d ago

or prison shower stalls?

4

u/Western-Internal-751 21d ago

In prison you don’t drop the SOAP

5

u/Angel429a 21d ago

Unless you don’t want to REST

13

u/TinyLebowski 21d ago

Emotional damage!

12

u/SE_prof 21d ago

I did my MSc on SOAP. Back in my day REST lacked the necessary structure to support tools. But my pet peeve is that people name any RPC REST which is totally incorrect!

11

u/ElectrSheep 21d ago

WSDL, my beloathed.

→ More replies (1)

10

u/meekinheritor 21d ago edited 21d ago

I've actually been reading a bunch about HTMX/hypermedia systems/HATEOAS lately, which is sort of a return to form of Web 1.0. I have a project that it would be pretty well-suited for and I'm interested to try it.

EDIT: Although I guess HATEOAS is part of the original "RESTful" definition, and there's no reason I couldn't use JSON provided I adhere to the central idea of the server responses providing hypermedia links that let the front-end be dumber. So it's actually more like a lot of modern architectures kind of "cheat" full RESTfulness a little bit, and this architecture is trying to go back to the OG Roy Fielding paper and be even more RESTful... I'll just use HTMX rather than JSON though lol

5

u/lobax 21d ago

For a BFF, sure. But most API’s are not consumed by UI’s

→ More replies (1)

5

u/diegotbn 21d ago

It is a beautifully rich standard but unnecessarily complex. In the wild, I have seen very few well written WSDL and XSD packages to APIs that actually conforms to them.

ReST is beautifully simple, leveraging HTTP methods and response codes, and URL patterns, to describe CRUD operations. The Open API spec is pretty good, and overall a decent substitute for WSDL. There are still plenty of badly designed ReST APIs in the world but it's easier to implement and maintain and most of them do a half decent job.

The one thing that SOAP has over ReST, at least in practice, is schema enforcement. I have rarely dealt with a ReSTful JSON API that had legit JSON schema files instead of just JSON examples in their spec.

1

u/DeadlyVapour 21d ago

Erm. gRPC?

2

u/Kaelthas98 21d ago

I believe in gRPC supremacy

3

u/UnspeakablePudding 21d ago

I really liked the wsdl convention. In my completely anecdotal experience handing someone a wsdl to write to generates fewer questions than sending somebody a link to swagger.

I know XML is a sub-optional over the wire data transfer format and I think there's some issues with SOAP and ESBs but i have nostalgia.

→ More replies (6)

274

u/DrCthulhuface7 21d ago edited 21d ago

“Noooo, you can’t use something everyone in the industry understands by default! You need to use this hyper-specific bullshit that provides a 1% increase in efficiency!”

50

u/Blue_Moon_Lake 21d ago

"... and has no easily available dependency to handle it for you, also the doc is only in incomplete russian."

→ More replies (1)

13

u/CutlassRed 21d ago

As an example, protocol buffers are more like 5x performance with half the data being transmitted, actually.

That's a no brainer whenever there's big data.

6

u/thefatsun-burntguy 19d ago

sure, but id argue that 95% of integrations have a data transfer level that does not justify the added complexity of protobuf. if all im doing is setting up a diagnostics endpoint, an on off endpoint and a config upload endpoint, why would i use something kore complex than REST

→ More replies (1)
→ More replies (5)

69

u/ryaaan89 21d ago

What are we supposed to be choosing instead??

7

u/DeadlyVapour 21d ago

gRPC is a pretty good general all purpose protocol.

Parquet is insanely efficient for tablular data.

I don't know. Maybe use nuance?

7

u/Gasp0de 20d ago

Why would I be dealing with protobuf definitions when all I need is a CRUD API?

→ More replies (2)

24

u/w-j-w 21d ago

If you don't need the performance, picking something other than JSON over REST is premature optimization. Almost nothing needs it. Why sink the time into setting up the additional build tooling when you're probably going to get way more bang for your buck fixing shoddy database queries or shrinking bundle sizes.

JSON over RPC is good enough for almost everything. Its a sane default, and its pragmatic to always use sane default technologies unless they're ruled out by requirements.

→ More replies (8)

2

u/KrakenMcCracken 19d ago

I feel gRPC is better for server to server communication. Having apps and webclients use it is a recipe for massive headaches disproportional to the performance benefits.

→ More replies (6)

93

u/neurohero 21d ago

Open a direct socket and return comma separated values in clear text. Obviously.

25

u/jess-sch 21d ago

comma separated values

I have severe trauma from this. Is there an RFC for CSV? Of course there is! Is Microsoft Excel able to parse an RFC-compliant CSV file by default? Depending on your locale, the answer is either "no" or "only if it's ASCII".

Whoever invented the UTF-8 ""BOM"" (a nonsensical term, given that UTF-8 specifies only a single valid byte order, making its marking hypothetically unnecessary) should be punished for their crimes. And whoever thought file parsing should be locale-dependent deserves the same fate.

15

u/sisisisi1997 21d ago

The encoding is a surprise of course.

3

u/HeKis4 21d ago

Entire memory sections piped through ssl and then through /dev/tcp/remotehost/port.

32

u/Pocok5 21d ago

SOAP with XML

65

u/YeOldeMemeShoppe 21d ago • Heartwarming

How do I delete someone else's comment on reddit?

6

u/Stickyouwithaneedle 21d ago

I absolutely love this response

→ More replies (1)

24

u/don_mumrik 21d ago

Your post gave me PTSD, thanks.

8

u/TheMaleGazer 21d ago

Just imagine someone giving you a wsdl on a Teams call and asking you to "just call the endpoint" while you're sharing your screen.

"Don't you have SoapUI installed? It's in the wiki! No, not Confluence. No, not ADO. The other one. To hell with it, just generate the client with wsdl.exe. What do you mean you don't know where that is? This isn't hard."

6

u/don_mumrik 21d ago

I worked as freelance programmer for some excentric guy as my first "real programming job" making a jobsite and later a piece of recruitment SaaS. I had to talk to governmental SOAP APIs for posting and retrieving jobs from EU databases, as well as getting candidate CV and resume data from their "jobnet" accounts - The WSDL was horrible, it was some kind of EU standard and on top of that a danish specification, so everything was super contrieved - I recall having to wrap every job posting in like three different "envelope" tags and all sorts of strange stuff. Didnt help that I had to use PHP.

→ More replies (5)
→ More replies (1)
→ More replies (13)

9

u/Kevadu 21d ago

It's all MCP now!

→ More replies (1)

15

u/Neverwish_ 21d ago

Depends on the use... For externally facing endpoints, REST is the best - easily consumed, readable...

For internal tools, inter-service communication, you can use REST too, but depending on you use case, gRPC might be a much better choice.

6

u/anovagadro 21d ago

Smoke signals, duh

3

u/GradSchoolDismal429 21d ago

CSV of course 

2

u/Bad_brazilian 21d ago

Fixed width text files.

2

u/Kaelthas98 21d ago

well, obviously RS-232. 19200 baud, 8 data bits, Odd parity and 1 stop bit, and you read it byte by byte like a civilized person

2

u/Ok_Tea_7319 21d ago

For protocols: gRPC, Cap'n'proto, Websocket

For encodings: BSON, CBOR, flatbuffers, protobuf, Cap'n'proto, netCDF, Ion, Parquet...

2

u/GiToRaZor 19d ago

I ask myself the same question. I don't like REST. My pet peeve is that GET calls should allow me to pass parameters in a payload, I hate the entire idea behind URL parameters. If you look closer you realise REST not an API at all, it's a database transaction interface. But an API can be a lot more than that obviously.

But here is the other problem: REST is like the M-16 of the internet. Everyone knows it, it gets the job done and any improvement is so minimal, it does not justify a refactor. So why change? This is backend development and infrastructure. We don't have time here for the antics of the gazillion frameworks that plague the front end world. Anything here needs to be stable and simple.

3

u/solaris_var 19d ago

That's why QUERY is a breath of fresh air to all of us

→ More replies (1)
→ More replies (5)

21

u/jediorange 19d ago

TBF, REST/JSON is actually a good fit for most things. Simple to interface with, works with everything, easy to comprehend.

Alternatives like the various RPC, and webservices are really complicated, and have a tendency to expose the inner complexities of the underlying systems.

An API is an interface. Just like a user interface (GUI, CLI), it should hide the underlying complexity where possible, and be easy to work with.

1

u/DeadlyVapour 19d ago

Never said it is bad. I'm saying there are other protocols that should be evaluated first before going straight in the square hole.

5

u/PepperLuigi 19d ago

Bro if it is not broken don’t fix it

→ More replies (1)
→ More replies (2)

17

u/VergilPrime 21d ago

The only thing they taught me besides json was XML. The only thing they taught me besides REST is nothing.

6

u/DeadlyVapour 21d ago

You should at the very least learn about gRPC.

There are various extensions to REST as well, such as GraphQL, OData etc. If you do do REST, I will hunt you down if you do the classic 200 Error.

There are also the various ASN.1 wire protocols.

There is MessagePack and BSON if you want JSON but actually want to have an efficient parser.

2

u/besi97 19d ago

As a REST enthusiast, I also want to hunt down developers who introduce 200 errors.

8

u/throckmeisterz 21d ago

And xml is painful to use.

9

u/dpoggio 21d ago

I don’t find it painful, maybe because of being used to it, anyways some usages are better with xml. Its slower at parsing and gives bigger payloads, but you can use XML schemas to validate your input and combine standards, it’s more structured and can contain raw document data easily. In banking, XML is still a strong format, many applications will not switch to JSON anytime soon.

3

u/don_mumrik 21d ago

Thats because you never had to use someones elses XML. I had to integrate with governmental SOAP services and I still have PTSD, Some of the governmental SOAP interfaces are absolutely rediculous, contribed clusterfucks of envelope wrappers and WTFs. Just mentioning SOAP gives me PTSD, gray hair and anxiety.

→ More replies (1)
→ More replies (8)

2

u/therealjohnidis 20d ago

So you know REST but not the rest? *bang ting pisssssss*

15

u/Skyswimsky 21d ago

I remember the last time I saw someone memeing and hating on REST and JSON there was this guy in the comments making multiple comments of paragraphs about rpc and how that's the one and proper way to do it.

1

u/DeadlyVapour 21d ago

I assume you mean gRPC.

gRPC is a very good protocol from an efficiency point of view. But there are hundreds of protocols to choose from.

If you want an efficient parser that looks like JSON there is BSON and MessagePack.

There is Arrow and Parquet for tablular data.

The PROPER way is, "It depends".

I'm not going to fucking design my NVMe RDMA protocol over fucking rest am I.

1

u/slaymaker1907 21d ago

For efficiency, some of these formats are COU hungry on very fast NVME drives. Saturating them basically requires dumping structs to disk without doing any fancy schema stuff, and I did my testing in Rust. Avro needed 4 threads IIRC to get to only 2x the time of the dump structs to disk method.

1

u/DeadlyVapour 20d ago

Right. Using the correct trade off for the job.

I don't think Avro is the right job for everything.

But it pisses me off that there are Devs out there that reach for JSON for everything.

3

u/DiamondDramatic9551 21d ago

It's not bad, can be useful for performance or streaming. 

→ More replies (1)

13

u/masp3270 19d ago

Rest/json is so much easier than soap/xml.

3

u/730463628 19d ago

I've gone my entire career never encountering SOAP. Was it widespread in the past? I only ever hear very old engineers discussing it. I've tried learning it because they make it seem like it is a viable option when designing something, but it has never made any sense to me and I don't see why it would ever be chosen when REST is so obvious.

1

u/DeadlyVapour 19d ago

Soap/XML is the only alternative?

2

u/masp3270 19d ago

No, you can also use Edifact over MQ.

→ More replies (1)

24

u/Eleina_Edelweiss 20d ago

Well what else? gRPC is for internal, and graphql is too complex for a simple request. Soap is obselete, websocket cant scale due to the need of persistant open connection. By process of elimination rest is the default

3

u/Shehzman 20d ago

Websockets are more of a different thing. Imo most apps that think they need they need websockets probably just need server sent events.

→ More replies (1)

5

u/--Aim 20d ago

Me using GET / POST for every api

1

u/DeadlyVapour 20d ago

I will DELETE you

4

u/chad_dev_7226 20d ago

I have a POST API for deleting things

→ More replies (1)
→ More replies (2)

8

u/sakkara 21d ago

Everyone using one standard way to do the same things is somehow bad now. Would you rather learn a new technology every time you wanted to communicate with a new service?

→ More replies (2)

330

u/snoopbirb 21d ago

it's all POSTs... even the GETs...

Once it was all GETs... even what should be POST... Crazy times dudes.

Lots of credit cards in some nginx log out there

125

u/carcigenicate 21d ago

I can't wait for QUERY to be widely supported and used.

43

u/mrdarkcookie95 21d ago

I love QUERY! Had an issue with exposed PII in a GET lately in work that it would have perfect for, but it's not supported by our backend rest client.... so POST it is!

11

u/invalidConsciousness 21d ago

Does anyone know what the holdup is?

It looks trivial to me (who knows nothing), but apparently it is not, or it would be widely supported already.

20

u/GRex2595 21d ago

POST and GET are widely supported mostly because POST is required to keep data secret (not really, but I'm not getting into it) and GET is the age-old standard. The other verbs are typically not allowed because of some issues with server configurations in the early days where people were able to use the other verbs to upload, change, or delete files on the server. So now many companies have security policies that haven't been reviewed that restrict verb usage to GET and POST. There's probably no other reason for its lack of support.

→ More replies (1)

9

u/tajetaje 21d ago

Probably some considerations for caching support

7

u/TheRealKidkudi 21d ago

Technically your server almost certainly supports it already (it’s just a different verb on the header line of an HTTP message), but parsing it might be easy or might be a PITA depending on what you’re using.

But you can send QUERY requests in JS today. You can really send anything you want as the verb and JS will happily send it. 

12

u/WingZeroCoder 21d ago

I prefer “GIVEMEMYMUTHAFKINGDATA”. It’s faster than GET.

→ More replies (1)
→ More replies (2)

7

u/Rikudou_Sage 21d ago

Why don't you just use it? You can use UNICORN and the http server doesn't care. I started using QUERY a few years ago and it just works. Sometimes you have to configure the whatever backend to not throw on unknown verbs, but that's it.

7

u/PhatOofxD 20d ago

API Gateways of various varieties don't support it

→ More replies (1)

29

u/Flat_Initial_1823 21d ago

PATCH or bust baby!! It's the mystery of how it will behave this time that's keeping it fresh 😌

17

u/ancalime9 21d ago

Lowest common denominator, everything is DELETE. Especially the GETs.

6

u/spartan117warrior 21d ago

It's POSTs all the way down... until you hit turtles.

→ More replies (4)

123

u/BeMyBrutus 21d ago

Just open up some sockets like a real man and yolo your packets.

54

u/Western-Anteater-492 21d ago

I suggest the UDP standard and unencrypted sessions. That would finish your stack to perfection. HTTPS is also just for pussies.

47

u/fjurgo 21d ago

I was gonna tell an UDP joke but you might not get it

4

u/IslayProgrammes 21d ago

Do you pronounce U with a soft u?

→ More replies (3)
→ More replies (1)

9

u/kratz9 21d ago

When I first registered for college classes, their system was a single EXE serving web pages. It was built by the CompSci dept.

14

u/BeMyBrutus 21d ago

The way God intended

117

u/deus_ith 21d ago

So, Whats the HTTP method to send new info? that's right, POST
And the method to obtain data? that's right, POST
And the method to delete data? that's right, POST
And the method to update data? that's right, POST

47

u/Ok-Dot2551 21d ago

What response code do you get for success? that's right, 200 What response code do you get for errors? that's right, 200

37

u/deus_ith 21d ago

status: 200, message: error

37

u/renke0 21d ago

status: 200

{ “status”: 500 }

16

u/MallAgreeable5538 21d ago

Nope its always status:400. its never the programm always blame the user

→ More replies (2)
→ More replies (1)
→ More replies (1)

16

u/Hola-World 21d ago

Status: 200
{message:”Error 400 Bad Request”}

→ More replies (2)

9

u/hullabaloonatic 21d ago

And the method to get data with exceptionally complex queries? That’s right, POST

because it’ll be a decade before QUERY is widely adopted.

4

u/deus_ith 21d ago

Correct. A paginated POST 💪🏽

4

u/ReplacementLow6704 21d ago

Wanna find love? Believe it or not, POST!

5

u/TheDiscoJew 21d ago

The body of the post request?

{"method":"GET", ... }

4

u/vadeka 21d ago

I see you use graphql as well

2

u/Specialist_Dust2089 21d ago

This is the second reason I don’t like graphql. The first one is that in practice it always resulted in much more code and complexity in the end than a simple straightforward rest api.

→ More replies (3)

3

u/PhantomThiefJoker 21d ago

There's an internal API at work that is called "GetSomethingSomethingDoesntMatter" and it's a fucking post, get the hell outta here who made this garbage

→ More replies (8)

31

u/Sheepreak 21d ago

I'd rather use Rest than Graphql right now... Believe me

15

u/AnEvanAppeared 21d ago

Why? (but without the downvotes)

→ More replies (3)

83

u/IslayProgrammes 21d ago

I hate that every endpoint return it’s own version of a status code in the body

I hate it even more when it’s different from the response header.

Fuck do you mean 200, but wait I have to parse the body and to find out it’s actually a 403 and my credential have expired

Bullshit

24

u/Blue_Moon_Lake 21d ago

"200 there is no network error, but the backend rejected your request for reason 1121"

15

u/joonty 21d ago

"Execute POST /api/errors to get a list of error codes and their descriptions"

5

u/IslayProgrammes 21d ago edited 21d ago

On the RARE occasion you have a system so complex you have internal codes I’m okay with that as long as you still return it in the header.

You can shove any int in the status header you want, I love to use 418 while in testing.

Recently left it on staging and almost sent it to production but still

We have a standard for this that saves cycles.

You can even return a cache and expiry header on the custom list so if you’re writing shitty code on the client it’s till not calling out every time

BUT WHAT WE HAVE IS EVEN SHITTIER CODE ON THE SERVER

I personally blame Google and facebook and the success of angular and react

→ More replies (1)

5

u/jess-sch 21d ago

At least you get a response. I'm particularly enjoying the situation where sometimes the backend just (connection closed)

7

u/RyanFromQA 21d ago

So I know we’re all joking here, but I ran into the real reason for this just the other day and I hated how much it made sense. 

Working with a spring boot stack, security best practices say to hide stack traces in production so that you don’t leak your implementation details for attackers. However, this means you can’t throw a non-200 status code with a meaningful message because spring redact it and all you get back is the response code. 

So if you want to return 400 with hints or a 401 with an expired token reason instead of a bare 401, you’re almost forced to return a 200 with a body that says it’s unsuccessful. 

13

u/IslayProgrammes 21d ago

THEN WHATS THE POINT IN USING SPRING BOOT

When I started my career I took the correct path C# instead of Java.

But my understanding for using spring boot was that it handled everything and did it properly for you

2

u/dschramm_at 21d ago

@ControllerAdvice, @ExceptionHandler and the ProblemDetail class should help. You can also return your own static or template pages.

2

u/LieutenantNitwit 21d ago

I can't "this" comment hard enough. Applications intercepting/returning/interpreting server codes make me want to vomit.

50

u/Thisbymaster 21d ago

It all goes into the POST hole.

40

u/Stummi 21d ago

Most APIs are JSON, but I think if you are pedantic, the least of them are REST

→ More replies (1)

12

u/LogicBalm 20d ago

I don't know what y'all are integrating with but I'm gonna pick the one that the developers on the other end of this API are familiar with as well.

We were forced to use SOAP once about ten years back and spent a large portion of implementation explaining to the product engineers on the far end how SOAP worked and how they had screwed it up when integrating it into their own product.

Especially as the only option, it was hilarious how poorly they did it. But you just know it's because it was started by one developer who only knew SOAP and finished by another who didn't know it at all... Standards are useful.

2

u/ShineProper9881 19d ago

We are still forced to use SOAP everywhere and it sucks so much. Its just so much work for no good reason.

21

u/T-J_H 20d ago

It does the job, everything supports it, relatively easy to implement. JSON strikes a good balance between human and machine readability. If there’s no specific requirements for other techniques, why not?

→ More replies (5)

12

u/Mission_Friend3608 21d ago

GraphQL is not without its issues, but it improves on a lot of shortcomings.

Clean separation between query and updates (mutations)
Types everywhere
N+1 issues moved to the server.

The main downside is that it's a lot harder to call a GraphQL endpoint, so for simple public APIs it's not great.

6

u/card-board-board 21d ago

GraphQL in my experience is the team trying to choose between a monolith and microservices and rather than pick one they pick both

3

u/dallenbaldwin 20d ago

It's also easy to trick yourself into thinking your users will "only request what they need" because you also have to remember to build out/enable the middleware that actually makes your db queries not select * when they only request a single field.

2

u/DiamondDramatic9551 21d ago

How does GraphQL move N+1 issues to the server? It seems to me either can have N+1 issues or avoid them. 

→ More replies (8)
→ More replies (4)

4

u/Natural-Ocelot-6009 21d ago

They call everything ‘REST’, most APIs don’t actually conform to REST

4

u/PulpDood 20d ago

No. I REST my case 🤪

4

u/AutoGibbon 18d ago

I remember hearing about this thing called graph or ql or whatever... it was gonna be this whole thing and change the world. It didn't. REST/JSON 4 LIFE.

2

u/liproqq 18d ago

Idk if it's graphql itself or architects but every microservice that uses it has so much boiler plate

→ More replies (1)

1

u/drowningincats97 21d ago

OP just shilling GRPC in the replies. Just use the right tool for the job 🙄

1

u/DeadlyVapour 20d ago

I'm not shilling gRPC. I advocate the right tool for the job. Sometimes that's gRPC, sometimes that's Parquet. Sometimes it's JSON.

But I've seen too many people reach for JSON first. Then act like XML is the only alternative.

It's literally the meme. There are so many different holes. Why use the square hole every time?

→ More replies (1)

3

u/srb4 21d ago

Clearly we should go back to CORBA for APIs.

2

u/joestr_ 21d ago

Oh no. Not CORBA 😭

3

u/Silly_Guidance_8871 21d ago

It beats the fuckery that is/was XML

3

u/CinCoutMagus 20d ago

AJAX stands for Asynchronous JavaScript and JSON

2

u/JAXxXTheRipper 16d ago

Oh fuck, I haven't seen AJAX in at least a decade, maybe two. I remember when that was the hottest shit and our IE6 apps constantly exploded. Fuck yeah conditional comments.

!Good times

5

u/notexecutive 21d ago

they are NOT using WSDL lmao

2

u/VoidZero25 21d ago edited 21d ago

Are there even other options?

20

u/bjorneylol 21d ago

yes, SOAP instead of REST, and XML/binary formats (e.g. protobuf) instead of JSON

Both are absolutely terrible to work with

9

u/DiamondDramatic9551 21d ago

At least protobuf has a performance argument. 

→ More replies (2)

3

u/gregorydgraham 21d ago

I mean, JSON is terrible to work with too, it’s just more common now

1

u/Helpful-Educator-415 21d ago

I'm experimenting with Protocol Buffers and ConnectRPC. Buf's tooling is pretty top tier.

2

u/daffalaxia 21d ago

REST and JSON are fine. Using POST for everything tho? Nah.

2

u/FabioTheFox 21d ago

Is OP a graphql glazer or what's with the REST hate

2

u/Capital-Garbage 21d ago

Had a PM ask me to make an API that uses “Markdown instead of code” so “agents can chat with it easier”. I used to be proud of working in tech and excited for new things. Used to be.

2

u/telas100 20d ago

Want some soap to reduce the burn?

2

u/Lurdekan 20d ago

I entered here to dunk on this complete shit opinion from perhaps a non developer or complete green novice but I see the good work has already been done

2

u/JAXxXTheRipper 16d ago

You are right, let's go back to the classics, SOAP and XML

3

u/RTSUPH 21d ago

When your post json includes method: “get”

5

u/Yctallua 21d ago

Reinventing soap, I mean graphql, one step at a time.

2

u/bugo 21d ago

Better than graphql

1

u/Dillenger69 21d ago

SOAP 4 life!!!

1

u/Extreme-Edge-9843 21d ago

I'll take rest over that shitshow soap anyway

1

u/AaronTheElite007 21d ago

If by that you mean every api has a complete lack of documentation, then you’re correct.

If your customers have to learn how to use your api through trial and error and analysis of what little error messages are thrown, you have a problem

1

u/FoleyX90 21d ago

As opposed to....?

Please don't say SOAP

1

u/BoBoBearDev 21d ago

I love JSON, because I don't have to make sure the parser matched 100%. If I only use 10 out of 100 properties, I only need to care the 10 properties remains the same, the rest can change.

1

u/StochasticTinkr 21d ago

Yeah, we should all go back to binary protocols over TCP. Who needs all the infrastructure for http and parsing text protocols that are easy to understand and inspect.

/s

1

u/Sulungskwa 21d ago

Of all the bad/annoying/overused things in webdev, hating JSON is the weirdest hill I've ever seen anyone die on.

1

u/JunkNorrisOfficial 21d ago

Standard practice is to follow standard practices

1

u/TurdOfChaos 21d ago

Oh no why would developers insist on a simple and understandable protocol.

Let’s all invent our own shit for each specific scenario so we can pretend we’re smart!

1

u/gandalfx 21d ago

Wait till you get to deal with protobuf, then you'll be sobbing for some good old json.

1

u/billabong049 21d ago

I come from lots of other bullshit protocols + SOAP, I’m thrilled to use REST + JSON given how simple it is.  No libraries needed (usually), no goofy deserialization logic, it’s lightweight, it’s easy to read (when formatted), and it has decent security mechanisms.  HTTP can be pretty gross, but I’ll take that over yet-another overly complex bullshit library.

1

u/rover_G 21d ago

Just POST the JSON to the /api endpoint bro

1

u/StatisticianNo5402 21d ago

Rpc with proto-validation

1

u/Canon40 20d ago

Everybody should use Rusty Object Notation (RON). Even for projects not written in Rust.

1

u/TheNakedGabeNewell 20d ago

Api for monke, use mcp

1

u/deadmazebot 20d ago

What you want some SOAP, some XML, hell let's just go CSV get rid of repeating the field name when have 20 objects, super optimised

1

u/henke37 20d ago

I don't get it.

1

u/LibrarianOk3701 20d ago

Me choosing Rust with Leptos instead of JS:

1

u/eW4GJMqscYtbBkw9 20d ago

As opposed to... ?

1

u/MaleficentMode4222 19d ago

It's this thinking that gave us internet explorer.

1

u/ConsiderationLow2941 19d ago

It's not REST though. It's just rpc and for some godforsaken reason we started calling it REST

HTML for a human is REST, MCP is REST, but your average JSON API is not, and it wouldn't make sense if it was because REST requires that the client has agency 

1

u/jolharg 18d ago

would you rather.... graphql

1

u/Just_Information334 18d ago

So, programming language go through a hype cycle from "no type" to "strictly typed" being the way. Takes around 10 years to go from one to the other then back.

JSON is the data equivalent of "no type", you can put everything in and something will happen. Every derivative of json is the same. If you have the concept of truthy or falsy values, you're there.
Getting burned by shitty data people will start requiring more strictly typed formats. It starts with things like json-schema which are just a bad fix. But it will either come back to xml or to some new very strict format.

Then those will be misused, many new people will be frustrated about how strict it is and how it could be made simpler and 20 years from now a new json will be there.

Unless LLM make all those discussions obsolete.

1

u/thenofootcanman 17d ago

It just works

1

u/Hi-Im-Bambi 14d ago

Because frameworks and datastructures exist to fix a certain problem and while there might be multiple for one and the same problem and sometimes even a more optimal one, maintenence, complexity or in short KISS are still a big factor.

1

u/CutlassRed 21d ago

OP is absolutely right and most of you are clowns.

When moving lots of data json sucks.

"Oh but what do you suggest?"

Protocol buffers are a good place to start