decoration decoration
Stories

GROKLAW
When you want to know more...
decoration
For layout only
Home
Archives
Site Map
Search
About Groklaw
Awards
Legal Research
Timelines
ApplevSamsung
ApplevSamsung p.2
ArchiveExplorer
Autozone
Bilski
Cases
Cast: Lawyers
Comes v. MS
Contracts/Documents
Courts
DRM
Gordon v MS
GPL
Grokdoc
HTML How To
IPI v RH
IV v. Google
Legal Docs
Lodsys
MS Litigations
MSvB&N
News Picks
Novell v. MS
Novell-MS Deal
ODF/OOXML
OOXML Appeals
OraclevGoogle
Patents
ProjectMonterey
Psystar
Quote Database
Red Hat v SCO
Salus Book
SCEA v Hotz
SCO Appeals
SCO Bankruptcy
SCO Financials
SCO Overview
SCO v IBM
SCO v Novell
SCO:Soup2Nuts
SCOsource
Sean Daly
Software Patents
Switch to Linux
Transcripts
Unix Books

Gear

Groklaw Gear

Click here to send an email to the editor of this weblog.


You won't find me on Facebook


Donate

Donate Paypal


No Legal Advice

The information on Groklaw is not intended to constitute legal advice. While Mark is a lawyer and he has asked other lawyers and law students to contribute articles, all of these articles are offered to help educate, not to provide specific legal advice. They are not your lawyers.

Here's Groklaw's comments policy.


What's New

STORIES
No new stories

COMMENTS last 48 hrs
No new comments


Sponsors

Hosting:
hosted by ibiblio

On servers donated to ibiblio by AMD.

Webmaster
What is an API? Well, it varies... | 237 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
oops, one more thing...
Authored by: Anonymous on Saturday, April 21 2012 @ 10:57 AM EDT
One sort-of-related thing I forgot to mention in the parent post.

Suppose you're looking at a pile of library code and trying to decide "which part is the API, the interface"? The question you should ask yourself is "which parts can I change, without possibly breaking somebody else's program that is using my library?" In the java.io.File.exists() example, maybe one day Oracle will decide to re-write the implementation of that method, to use a better technique. But to make sure old programs still work, they can't change the interface (the API), they can only change the private implementation parts. They can't change the name of the method to "fileExists" (they could add a new method called fileExists, but they can't remove the old "exists" method, because removing "exists" would break any program that was using it). They can't change the signature of the method (the return type, or the parameter list), for the same reason: it would break existing programs. That's why you hear phrases like "extending the API" ... because adding new things to the API is usually safe, but other kinds of changes (removing or changing things) are not safe.

This is why designing good APIs is so important, especially if lots of programmers are going to be using your library to get things done. The better the API, the easier they will find it to use your library correctly. And if you make bad design choices in the API, you will probably be stuck with them forever, and the programmers who have to use your library will either constantly pay that price, or just give up and not use your code at all!

[ Reply to This | Parent | # ]

What is an API? Well, it varies...
Authored by: Anonymous on Saturday, April 21 2012 @ 01:07 PM EDT
So, if I have a box filled with hundreds of jumper wires and resistors I don't
need that panel. I can program the airplane by going to the back of the panel
and directly fly and land the airplane by applying the correct currents to the
circuit boards and wire bundles. The API is not necessary although no one flies
an airplane or programs in Java without one for obvious reasons.
If I freely give permission to use the Java Language but not the Java API,
then here won't be many pilots flying using free Java.
Java would crash faster than the airplane.

[ Reply to This | Parent | # ]

Groklaw © Copyright 2003-2013 Pamela Jones.
All trademarks and copyrights on this page are owned by their respective owners.
Comments are owned by the individual posters.

PJ's articles are licensed under a Creative Commons License. ( Details )