• Post Reply Bookmark Topic Watch Topic
  • New Topic

Terminology Explanations  RSS feed

 
Ian Lafuente
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm having trouble differentiating and defining the terms: Framework, API, SDK, Stack (as in LAMP), Library, Package. Would somebody be able to help explain how these terms are related with each other? Thanks.
 
Stephan van Hulst
Saloon Keeper
Posts: 7973
143
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A lot of these are not well defined and may overlap. Here's my best attempt though, as per my understanding:

  • A library is a collection of software that is not a standalone application, but is designed to be used in multiple other applications. An example is the slf4j library, that helps you with logging in your application.

  • An API is the collection of types and functions that a library exports to the outside world, i.e., all the stuff inside a library that can be used outside the library. The Java Standard API is an example.

  • A framework is like a very big library or a collection of libraries that is designed to help you create a more complex application, by supplying a skeleton (or framework ) that takes care of most of the basic infrastructure, so you can focus on what makes your application different from others. Spring is an example of a framework that takes care of inversion of control (IOC) and dependency injection for you.

  • An SDK is a collection of libraries and tools that help you develop software. The JDK is an SDK. It provides libraries that expose Java types (rt.jar) and tools that help you compile and run your application (javac.exe and java.exe).

  • A stack is software built on top of software. A LAMP is a stack where MySQL and PHP run on an Apache server, which runs in a Linux environment.

  • Package is not a well defined term. It can refer to many things in many different contexts. You can have software packages, Java packages, etc.
 
Knute Snortum
Sheriff
Posts: 4276
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A package in Java is a namespace -- that is, an area that has a unique name to keep classes with the same name separate. For instance, there is java.util.List and java.awt.List. Both classes are called List but they are very different.

You use packages to keep your classes unique. For instance, I use the inverse of my domain name as my main package: net.snortum. If I have a project name, it probably comes next: net.snortum.project. Then I may break up my projects into sections:

net.snortum.project.model
net.snortum.project.mvc
net.snortum.project.doa

Packages also turn into folders (directories) when compiling a program with a package keyword:



Say that your project is in src/java/main, then the full path to the class Thing is src/java/main/net/snortum/thing/Thing.java

You'd compile it like this:

cd src/java/main
javac net/snortum/thing/Thing.java

And you'd run it like this:

java net.snortum.thing.Thing
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually, when I encounter any new acronym I ask my friend
Something like e.g. "LAMP (programming)" always gives me the information I am looking for.
 
J. Kevin Robbins
Bartender
Posts: 1801
28
Chrome Eclipse IDE Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stephan van Hulst wrote:

  • An API is the collection of types and functions that a library exports to the outside world, i.e., all the stuff inside a library that can be used outside the library. The Java Standard API is an example.

Just to expand on this one a bit, I think of the Application Programming Interface as the usage details of how to use a library or class; the method names, the number and type of parameters the method accepts, and the type of data that is returned.

For instance, if I can't remember exactly how to insert a value in a HashMap, the API documentation will tell me the name of the method and the number and types of parameters.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!