Hacker News new | past | comments | ask | show | jobs | submit login

Web dev has so thoroughly revised the definition of 'API' it's not even funny.

Desktop, embedded, video games, HPC suddenly cried out in terror and were suddenly silenced.




It's become just a word that means "interface endpoints". And frankly that's fine, it's what it is in the end. Whether in an OS, a website, or another platform.


It is even weirder to me how business has latched on to the term "APIs" like some kind of rabid dog biting into your ass

Like, this is a fundamental aspect of how I interact with my job and business has taken the term and elevated it into its own distinct thing


I died a little inside the day a new hire, some kid fresh out of who knows where, shook my hand and asked "so are you an API developer?"


The same way they latched onto agile, Agile, Scrum, DORA, and a bunch of other keywords.


> Web dev has so thoroughly revised the definition of 'API' it's not even funny.

What leads you to believe that a HTTP API does not meet the definition of a API?


The other way around, the meaning of API standalone has been narrowed to mean HTTP APIs, as if it were redundant. Specially tedious if you're searching for non-HTTP API design notes.


> The other way around, the meaning of API standalone has been narrowed to mean HTTP APIs (...)

I don't think so. The pervasiveness of web apps and applications consuming web services means there's a lot of work involving web APIs. This doesn't mean the definition of API was narrowed. It's all about context. If your bread and butter is developing web services, you don't waste time with context-free definitions of your API. You talk about the API and everyone is on the same page.


If all anyone ever talks about is APIs in the web services sense then, yes, the definition of API has been narrowed. When everyone will assume you mean web services API when you refer to an API and have to use extra words to describe non-web APIs then the definition has narrowed. That's how English works: the definitions of words depend on their usage and dictionaries describe how words are used.

You even admitted "The pervasiveness of web apps and applications consuming web services means there's a lot of work involving web APIs" and "If your bread and butter is developing web services, you don't waste time with context-free definitions of your API" which is acknowledging the common use definition of API has morphed into Web API. It's only in the context of technical documents or documents that are explicitly referring to non-web APIs that use API and it is understood to mean something other than a web API.


In the trade we call this being "API go lucky". It doesn't work well in conversation.


Almost all my development has been in the fields I mentioned. I prefer to think of HTTP 'APIs' as end-points instead: you query a URL for some fields, and you receive some data—whether it be plaintext (JSON), or binary. That's essentially it. I feel narrowing the definition of an API to just 'HTTP end-points' is very reductive. The word stands for 'application programming interface', but I don't really need to program anything to use a HTTP end-point: I can navigate to it using a Web browser, if I want.

For me, an API is a lot more concrete: a set of data structures (whether they be classes, objects, pairs, tuples, lambda functions, etc.) with extensible functionality (member functions, pure functions accepting those data structures, etc.) that developers can use independently, or together, to produce some new functionality, i.e. program using interfaces.

So what I'd traditionally think of APIs are the .NET API, the C++ STL, the Java API, the Windows API, the Linux headers, Qt, GTK, even React.


I always thought of API in the sense of POSIX Or NFS etc. A common interface that existed across different libraries regardless of the vendors. Designed for interoperability.


One place I worked was unable to differentiate between libraries, SDKs and APIs - they just called all of them "an API". Infuriating.


Well, to be fair, libraries and SDKs do have APIs, it's what you mainly interact with when you use them, the defined interface that you programmatically use in your application.


So like a kind of Application Programming Interface?


You create a "web-service" and then describe it by describing its "interface" you are in fact creating that interface. That is how it is on the web because the web-tech does not give us a language in which to describe service-endpoints.

In non-web development the APIs can be described formally as function-signatures in any statically typed programming language.

Or is there some simple language in which to write descriptions of web-services?


Of course, there are tons, they're generally called IDLs (interface description languages), common examples are Protobufs, Avro, Thrift, etc.

They're not hugely popular for web services largely because the web was designed to avoid exactly this kind of a priori contractual requirements between communicating parties. But that's a much bigger conversation.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: