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
Is this 1 minute concise definition of API Correct? | 451 comments | Create New Account
Comments belong to whoever posts them. Please notify us of inappropriate comments.
Is this 1 minute concise definition of API Correct?
Authored by: Anonymous on Thursday, May 03 2012 @ 10:53 PM EDT
Well, not the greatest definition, but I've heard two dozen
this week and none have been quite perfect :)

b) In this case, what is the program? Android?

Yes, the Android operating system. It uses APIs from, for
instance, the java.net package, to interface with the web
server from his example.

c) In this case, what is Dalvik? where does that come in?

Dalvik is what's called a 'virtual machine' (VM) ... it's
kind of like a virtual computer that runs... on your
computer. Java source code is compiled into byte code,
which the VM understands. The VM then has the know-how to
talk to your underlying operating system (Windows, Linux,
MacOS, whatever). Google wrote their own Java virtual
machine, that understands a subset of what the 'official'
Sun VM does.

d) Where, in this explanation, are apps for Android placed?
Are they extensions of the big program?

Not extensions really. Your app (AngryBirds) is a program
that runs inside Android OS (Ice Cream Sandwich or
whatever). All the apps that you can download from the
Android marketplace use all of the standard Java APIs as
well.

e) Can java be used if the original API were not there?

Tricky question, depends on what you mean by 'use java'.
Yes, you could use the Java syntax, and have complete new
implementations for programmers to learn e.g.:

java.util.List.add(java.lang.Object) vs
com.google.GList.addItem(com.google.GObject)

But really, to call it Java you have to be able to expect
that standard APIs will be there. The reason for choosing
Java as the platform was to entice the huge community of
Java developers to write apps for Android, and if you can't
use the APIs you're used to, it's not really Java.

f) Are the 9 lines of code the case keeps dwelling on in
Java's API?

Nitpicky but no it's not in the API, it's in the -
implementation- of the API. In this case it's something
like (this is not accurate code):

private boolean java.SomeClass.checkBounds() {
// Line 1
// Line 2
...
}

so the first line (private boolean...) is the API -- the
"method signature" of this block of code. The 9 lines in
question are the lines of code inside this "method" that
actually do the work to check the bounds of the array. In
this case, ironically the APIs are different :)
(java.util.Arrays.rangeCheck() is Oracle's API,
java.util.TimSort is Google's)

[ 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 )