Learning Library

← Back to Library

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
0:00If you've visited Wikipedia, an e-commerce site, or your favorite blog, 0:04there's a really good chance that a LAMP stack 0:07was responsible for delivering that page content to you. 0:11Well, what does that mean? 0:12It is a web platform made of four different components, 0:17the first of which is Linux, the operating system. 0:20The second is Apache, which is a web server. 0:25Third, MySQL, a database. 0:29And finally P for PHP, 0:33which is a programing language and runtime environment. 0:37To understand how these work together, 0:39let's do a simple example of what happened when we retrieved that page. 0:44So you were in your browser and you made a URL, 0:49which does a GET request to a server. 0:57Installed on that server are these different components, 1:00the first of which is Linux. 1:05That is routed to a web server, 1:07in this case, Apache. 1:12Apache has installed on it a number of web applications 1:16that handle the different requests and the different websites that the web server handles, 1:22and those are written in PHP. 1:24It handles both the business logic and the presentation logic, 1:29formatting the entire page and returning it to the user. 1:32To do that, it relies on a database 1:35to gather the information that you've asked for, using MySQL. 1:40So that kind of gives you that overall picture of it. 1:44But there are alternatives to the LAMP stack, 1:48which are becoming more and more popular, 1:50two of which -- called the MEAN stack 1:53and the other one's called the MERN stack. 1:58Now we have other videos or to go into more detail, 2:00but I want to call out specifically why these are unique. 2:03The R and the A. 2:05The A is for "Angular" and the R is for "React". 2:09And React and Angular are JavaScript that's installed on the browser. 2:16And then instead of requesting a page from the server 2:19and getting back all the content in one chunk, 2:22it uses REST APIs to simply ask for the data, 2:29and then the data is formatted, on the page, on demand. 2:33And there are tradeoffs for those in terms of being able to do a responsive user interface, maybe speed. 2:40We have a separate video that will cover that in more detail, 2:42that'll help you decide which is the right stack for your application. 2:48Whoa, wait a second! 2:49Remember those videos I talked about? 2:51They're right here.