What is a "Stack" (in programming) What_is_a_Stack.html — rev 09 May 2015 ➽ back to dir

the word "stack" ...

a stack of newspapers a haystack - a stack of hay
The basic meaning of the English word "stack" is:
"A more or less orderly pile or heap." Such as, a haystack. Or a stack of newspapers.
Here's definitions at DuckDuckgo and more at TheFreeDictionary.com
Here are some pictures of stacks of things.

ok. so what the heck does a pile of hay or newspapers have to do with programming?!

Since English is a very flexible language, the word has come to apply to many things,
with the general idea of "a more or less orderly collection of somethings".
Take a look at the summaries in top row at DuckDuckGo, to see a lot of uses of the word "stack"!

in the computer world ...

In the computer world, again, it can apply to many things, deep in the computer or network, or up in the level of our programming, or more ...

We use the word stack to mean a collection of computer things that have some relationship to each other, or are used together for something.

Ok let's leave all those puppies alone for a while, and think only about our world:
Web programming.

in web programming world ...

We use the word stack to mean a collection of technologies that we use together when we write programs for the Web.

1. We are using the web programming stack all the time when we are using the Web (whether we know it or not!). And if we want to develop the Web, we install all the pieces on our computer:

Your base stack for web programming is:

   OS            Server               DB                 Programming 
an operating     a web server        a database server           language
 system - 
duh, yeah! 

On GNU/Linux we call it LAMP:

    L             A                   M                   P
 GNU/Linux      Apache              MySQL                PHP
                                  (MariaDB)         (Perl, Python)

On MS Windows we call it WAMP:

    W              A                   M                   P
 (MS) Windows   Apache               MySQL                PHP

On MacIntosh we call it MAMP:

    M              A                   M                   P
 Macintosh      Apache               MySQL                PHP

There are even others! some examples:

    OS            Server             DB             Programming language
  hmmm ...       nginx             MariaDB                Perl
                 tomcat           SQL Server           Ruby (on Rails)
                  IIs              Oracle                Python
                  ...              ...                    Java

2. LAMP, WAMP, or MAMP are not programs or applications. They are just short names for the pieces you need to have in order to do Web programming.

more info about the AMP stack ...

in wordpress development world ...

our stack includes

     L/W/M         A        M     P      
         ↖         ↑       ➚     ➚ 
http ← __________   _____________ → plugins (and their stack is PHP, html, css, js)
https ↙      ↙             ↘         ↘ themes (and their stack is PHP, html, css, js)
          ↙                   ↘
    WordPress                  APIs
  repositories                   (the interfaces that get us
for core, plugins, and themes,          to the repos, plugins resources, etc.)
 and the tech to access them
woah! what do you mean? i've never even heard of some of this stuff!
yah, i know! :D
that's ok. a lot of it is used by WordPress, and you but it helps us understand our work better if we know these things are there ... and as we get more advanced, we may start using them!

and then there is our development stack

usually for developing we use:
an editor
our file system
a file manager to do things in our file system
a web browser (or two or three!) to see our results
a file transfer program to put things on the server
maybe some other tools to help things along
someone's development stack might be:
editor: notepad++
file system: ntfs? on ms windows
file manager: windows file manager
web browser: chrome, maybe others for checking
file transfer: gui filezilla
webdev: chrome tools and extensions; code validators, ...
other: photoshop; ...
james' development stack is:
editor: vi
file system: ext3 on gnu/linux
file manager: cli bash shell, gui nautilus
web browser: firefox, sometimes chrome and others for checking
file transfer: gui filezilla, cli scp
webdev: firebug; other firefox tools and plugins, code validators, ...
other: bash and perl scripts; gimp; ...

we can even use one program which will contain the pieces of a wordpress stack,
and maybe development stack also — Here are just a few examples:


Now you know all about the stack.
Get out there and code, and you will actually start to understand it!