Understanding LAMP, MEAN, and MERN Stacks
Key Points
- The LAMP stack (Linux, Apache, MySQL, PHP) is a common web platform where Linux runs the OS, Apache serves web requests, PHP handles business and presentation logic, and MySQL provides the data backend.
- When a browser makes a GET request, Apache routes the request to PHP scripts, which query MySQL for data and generate the full HTML page that is sent back to the user.
- Modern alternatives such as the MEAN and MERN stacks replace PHP with JavaScript frameworks—Angular (A) and React (R)—that run in the browser and retrieve data via REST APIs instead of receiving a complete page from the server.
- These JavaScript‑centric stacks can offer more responsive, dynamic interfaces and performance trade‑offs, and further videos are available to help decide which stack best fits a particular application.
Full Transcript
# Understanding LAMP, MEAN, and MERN Stacks **Source:** [https://www.youtube.com/watch?v=EKi8CN94dx4](https://www.youtube.com/watch?v=EKi8CN94dx4) **Duration:** 00:02:52 ## Summary - The LAMP stack (Linux, Apache, MySQL, PHP) is a common web platform where Linux runs the OS, Apache serves web requests, PHP handles business and presentation logic, and MySQL provides the data backend. - When a browser makes a GET request, Apache routes the request to PHP scripts, which query MySQL for data and generate the full HTML page that is sent back to the user. - Modern alternatives such as the MEAN and MERN stacks replace PHP with JavaScript frameworks—Angular (A) and React (R)—that run in the browser and retrieve data via REST APIs instead of receiving a complete page from the server. - These JavaScript‑centric stacks can offer more responsive, dynamic interfaces and performance trade‑offs, and further videos are available to help decide which stack best fits a particular application. ## Sections - [00:00:00](https://www.youtube.com/watch?v=EKi8CN94dx4&t=0s) **Overview of the LAMP Web Stack** - A concise explanation of the LAMP architecture—Linux, Apache, MySQL, PHP—how these components deliver a web page, and a brief mention of newer MEAN and MERN alternatives. ## Full Transcript
If you've visited Wikipedia, an e-commerce site, or your favorite blog,
there's a really good chance that a LAMP stack
was responsible for delivering that page content to you.
Well, what does that mean?
It is a web platform made of four different components,
the first of which is Linux, the operating system.
The second is Apache, which is a web server.
Third, MySQL, a database.
And finally P for PHP,
which is a programing language and runtime environment.
To understand how these work together,
let's do a simple example of what happened when we retrieved that page.
So you were in your browser and you made a URL,
which does a GET request to a server.
Installed on that server are these different components,
the first of which is Linux.
That is routed to a web server,
in this case, Apache.
Apache has installed on it a number of web applications
that handle the different requests and the different websites that the web server handles,
and those are written in PHP.
It handles both the business logic and the presentation logic,
formatting the entire page and returning it to the user.
To do that, it relies on a database
to gather the information that you've asked for, using MySQL.
So that kind of gives you that overall picture of it.
But there are alternatives to the LAMP stack,
which are becoming more and more popular,
two of which -- called the MEAN stack
and the other one's called the MERN stack.
Now we have other videos or to go into more detail,
but I want to call out specifically why these are unique.
The R and the A.
The A is for "Angular" and the R is for "React".
And React and Angular are JavaScript that's installed on the browser.
And then instead of requesting a page from the server
and getting back all the content in one chunk,
it uses REST APIs to simply ask for the data,
and then the data is formatted, on the page, on demand.
And there are tradeoffs for those in terms of being able to do a responsive user interface, maybe speed.
We have a separate video that will cover that in more detail,
that'll help you decide which is the right stack for your application.
Whoa, wait a second!
Remember those videos I talked about?
They're right here.