Most of the companies that offer public api these days do it through a web service. What was used before web services were popular? For example, if a company wanted to release a c# public api would it have release the dll files implementing a remote database connection? Or did they do something different from my assumption?
3
There are a variety of ways that it could be done. First, don’t blindly assume web services are a recent idea. The idea of putting a service for other computers to consume on a web server seems to have been invented multiple times, some quite early in the history of the web.
Other alternatives included defining a protocol that could be used via a socket (my company did this for a service that one of our clients was considering launching in 1999), or publishing a dll (or, quite frequently, an ocx library) that implemented the api.
One alternative that became common in the world of stock quote provision is to provide an executable program that supplies data via the Windows DDE system. You can still get such systems today (e.g. from ADVFN).
Even today, the overwhelming majority of APIs are not webservices. The MS Word API, for example looked pretty much exactly like it does today both before and after webservices became popular.
3