What is the difference between a high-level and low-level Java API?
Asked Answered
A

2

21

I'm learning about Google App Engine and Googles datastore from here and they keep mentioning "low-level Java API."

What exactly is a "low-level Java API" and how does it differ from a "high-level Java API" (which I assume must also exist since there is a low-level one?"

Google searches yielded poor results for this question.

Armistead answered 17/6, 2015 at 16:14 Comment(2)
@user3360241 did you read my question? i am asking what the difference between a low-level and high-level api is (or if it even exists)Armistead
Its written in documentation. Fyi i have not down-vote you as the question is not bad in itself.Kenlay
K
20

Let us first see what documentation says about this -

The Java Datastore SDK provides a supported low-level API for the Datastore. In the documentation for the Datastore we use this low level API for the sake of simplicity.

However, for your convenience, the Java SDK also includes third-party implementations of the Java Data Objects(JDO) and Java Persistence API (JPA) interfaces. Note that these are provided for your convenience only; they are not supported by Google. In addition, the Java SDK includes other third party frameworks designed to simplify Datastore usage for Java developers.

When somebody refers to low-level and high-level, they usually talk about abstraction level.

Abstraction

is a technique for managing complexity of computer systems. It works by establishing a level of complexity on which a person interacts with the system, suppressing the more complex details below the current level. The programmer works with an idealized interface (usually well defined) and can add additional levels of functionality that would otherwise be too complex to handle.

To give direct example, language C offers you lower level API to computer resources than Java. In C it is possible to do garbage collection in real time at will of programmer, however it is most likely that majority programmers will shoot themselves in a foot with this than get concrete benefits.

In other words, google offers you officially low level API which is powerful but not as trivial to use. There are third party solutions which abstract google's low level API into high-level API and make it simpler to use the API.

Kenlay answered 17/6, 2015 at 20:31 Comment(1)
ah, so then a high-level API is something that is easier to use (i.e. simpler for the user/computer programmer). And a low-level API is a very close-to-the-metal API that is more verbose so to speak or more complicated. I had it backwards in my head for some reason.Armistead
K
12

Simply put, a low-level application programming interface (API) is generally more detailed and hence allows you to have more detailed control to manipulate functions within them on how to use and implement them while a High-level API is usually more generic and relatively simpler and provides more functionality within one command statement than a lower-level API. High-level interfaces are comparatively easier to learn and to implement the models using them. They allow you to write code in a shorter amount of time and to be less involved with the details. Hope it helps to get the general idea.

Kill answered 10/10, 2020 at 5:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.