• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Terminology Explanations

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Saloon Keeper
Posts: 15510
363
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 7125
184
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic