What do the words platform and api mean?

I bought the book Learning the Java 6 SE Platform. I wonder what the word platform means. the reason is not just a bunch of classes that I can use. JDK 1.6 node in Netbeans libraries.

What is an API? it is not the same as the platform. But doesn't a library mean the same thing ... a bunch of classes with some superclasses, etc.?

+6
java api terminology semantics
source share
4 answers

The term “platform” is used to mean any set of software, services and resources that are considered defined in a certain context, so they can be used as building blocks for application software (or to create a higher-level platform on top of this - something is considered platform in a different context)

API is an abbreviation for application programming interface. This usually means collecting conditional calls (function signatures, etc.) that can be used by the application (the program you are writing) to view functions that are inside the library or platform.

An API is not the same as a library - the term Interface conveys that it indicates only what you can name and how it works. The actual library that implements the interface can decide for itself how it provides the specified functionality.

A good example of an API is, for example, the JDBC API, a standard way for Java programs to interact with databases. Each database provider has its own protocol for connecting to the database, binding variables, etc. To database commands, but the JDBC API abstracts all this and defines a common basis, which allows all Java programs to use the same set of functions for communication - ideally - any database. The task of the database provider is to actually provide a driver, that is, implement a library that complies with the API and knows how it can perform its tasks for this particular database system. Thus, in this case, you have many driver libraries (each supplier has its own, and sometimes several), but they all perform their functionality using the same set of functions, classes, etc., Defined APIs (in this case JDBC API - see http://java.sun.com/j2se/1.5.0/docs/api/java/sql/package-summary.html

Sometimes the API is so extensive that it is considered a platform, but the term platform is more general, the platform does not have to be an API. For example, a set of standard UNIX utilities, such as ls, grep, cd, etc., can be considered as a platform, but not so much an API.

+6
source share

The Java platform consists (approximately) of the following:

  • Java programming language
  • Java API
  • Java Virtual Machine

In the section .

The API or application programming interface provides only classes that ship with the Java platform. For example, when they say “Java API”, you could probably refer to the class libraries that come with the Java SE platform.

Just to provide links, here is the official documentation for each part of the Java platform:

+6
source share

An API is an application programming interface — a collection of classes to use.
A platform is a whole package - an API with runtime and additional applications, such as a compiler, etc.

+1
source share

Yes, the platform is rather a general term that can mean different things in different contexts. Think of a gaming platform like the XBox. In this case, Microsoft provides a “platform” for developers to create games, as well as for people to play games.

In the case of J2EE (Enterprise Java), the term “platform for me” means a solution for developers to create enterprise applications. This is more than a set of classes, as you indicated. For example, there are many specifications, such as JPA (for persistence), EJB, etc. In these cases, Java developers have set specifications for other vendors. I think of the platform as a base that provides many services on which to build something more.

API is a more technical term. This means an application programming interface. An API is an interface that we use when using other users' software. Think of the Java String class. It has a length () method. All Jave developers know that this method exists for the String class, and therefore it is part of the Java API.

0
source share

All Articles