|
Authored by: Anonymous on Wednesday, April 25 2012 @ 06:29 AM EDT |
APIs are nothing but rules about how to communicate and what that communication
means (e.g. you call my Math.avg function with a list of numbers, I give you
back the average). The API can be implemented by code and described by
specifications or other documents, including some automatically generated by
scanning the source code, but they're really something rather abstract in
nature.
I wouldn't say that APIs don't exist, rather it's more like the APIs are facts
about what the code does and how to use it. The API is the interface which
allows you to get the program that implements some API to do things for you. I
think you're trying to say that they have no independent existence and that's
sort of true. I mean, something, whether code or documentation or whatever has
to describe the API for it to even exist, but you don't actually need a working
implementation. You can make up all your rules and do your design before
writing any code. This tends to be a bad idea, but people sometimes do things
that way. And APIs aren't something you can easily change once people start
relying upon them.
That was the whole worry about "fragmentation." You don't want 10
versions of "Java" where code only works reliably on certain versions.
You want to write Java code and have it work everywhere.[ Reply to This | Parent | # ]
|
|
|
|
|