LAMP Stack Web Development
LAMP stand for Linux, Apache, MySQL, PHP. LAMP Stack Web Development is an open source web development platform that uses Linux as the operating system, Apache is used as a web server, MYSQL is used as a relational database management system and PHP is used as Object-oriented scripting language. Instead of PHP we can also use Perl and Python.
If you are using Linux OS then it is called LAMP, if Windows OS then WAMP, if Macintosh OS then MAMP, if Solaris OS then SAMP. As the Platform has 4 layers so that's why it is known as LAMP Stack.
Component Of LAMP Stack
Linux - The operating system
Linux is a multi user, multi-tasking and open source operating system. Linux acts as an interface between the application software and hardware. You can find Linux operating system mostly in servers, and also in many areas such as smartphones, cars, home appliances etc.
The advantage of Linux is that it’s an open source software. It means that source code is freely available to anyone, you can edit and make it highly customizable piece of software. Many Organizations use Linux as the server operating system due its stability and reliability.
The core functionalities of Linux operating system are handled by kernel, a program that manages the resources of a computer system. User can instruct the operating system to perform a specific task by issuing a command. Users issue these commands through the interface called as shell. Shell is a program that interacts with the kernel by invoking a well-defined set of system calls.
Apache - The web server
Apache Web server is free and open-source software developed and maintained by the Apache Software Foundation. The initial release date was April 1995 with released under the terms of Apache License 2.0. Apache HTTP Server is written in C & XML. It is used to processes requests and serves up web assets via HTTP, so that the application is accessible to all who are accessing the public domain on a simple web URL.
MySQL - The database
MySQL is a popular Open Source Relational Database Management System (RDBMS) that helps in developing database for any application in a customized manner. It is the most preferred database solution for many web application development. Social web sites like Twitter, Facebook and YouTube uses MySQL databases for their high volume contents.
MySQL has the following features - Open Source database, Provides high scalability, cross platform compatible, ACID compliant database, data partitioning, highly secure and flexible database.
PHP - The programming language
PHP stands for Hypertext Preprocessing is used to design and develop dynamic and interactive web pages. PHP Created by Rasmus Lerdorf in 1994, Initially called Personal Home Page (PHP) and PHP 3.0 released in June 1998. PHP is server side scripting language – PHP scripts run at server side. PHP is Interpreter based – Scripts are processed every time it is run. There is no compiled output.
PHP has the following features - Cross platform compatibility, Database integration, Object oriented programming, XML Support, Error Handling with Exceptions.
82.1% of the web sites we know, use PHP server side scripting.
Perl - The programming language
PERL stands for Practical Extraction and Report Language, developed by Larry Wall in 1987, originally designed for reading text files and preparing reports based on that information and widely used for system administration.
Perl is a powerful scripting language that has been popular for more than two decades. We can use Perl to build data-driven reporting and systems administration applications. The popular applications using Perl are:
Amazon, IMDB, BBC and Typepad.
Perl has the following features - Perl is a procedural and interpreted scripting language, Runtime conversions for Strings and Numbers are allowed in Perl, Perl does automatic data-typing and automatic memory-management.
Python - The programming language
Python was created by Guido van Rossum in 1991 as a general-purpose programming language. It is interactive and interpreted language. It supports both structured and object oriented style of programming. Python is an open source language under general public license(GPL).
Advantage of Python is that it has wide range of libraries and built in functions which aid in rapid development of applications. Python is easy to learn and follows a simple syntax, so it is a good choice for beginners.
Python has the following features - open source, interpreted, cross platform compatible, Object-Oriented, Extensible, Interactive, Database connectivity.
How LAMP Stack Works?
The entire process starts when the Apache HTTP Server receives a request from the browser (like Chrome, Internet Explorer) for a specific web page. If the request is for static web page, then the content of the file passes to the Apache web server to send to the browser.
If the request is for a dynamic web page (for a PHP file), then the request is passed to the PHP file that loads the file and executes the code in the file. PHP file also fetch data from MYSQL database. After running the file code, the content of the PHP file passes to the Apache web server to send to the browser. The LAMP stack can efficiently handle both static web pages, dynamic pages.
Advantage of LAMP
1. LAMP is used by hundreds of thousands of companies.
2. LAMP technology is open sourced and highly secure.
3. You can develop the application in a faster manner.
4. With LAMP, customization is never going to be an issue.
5. LAMP stack development can grow in size or shrink depending on your requirement.
Disadvantage of LAMP
1. Developers don’t have control of the libraries that are available.
2. LAMP stack only supports Linux operating systems.
3. It is challenging to switch between PHP or Python and then use JavaScript or HTML.
Best LAMP Stack Books
1. Open Source Development with LAMP
Author :- James Lee, Brent Ware
Edition :- 2002 Edition
Published by :- Addison Wesley
The book focuses on the most important core material necessary for the developer to hit the ground running and begin building applications right away, and shows the reader where to go to find comprehensive information on all the topics covered.
The book introduces the pillars of open source development, and reviews the current techniques and standards for each. It shows what it is easily possible to do using them, what might be possible with more work, and how to decide which tool is appropriate for what task.
2. High Availability for the LAMP Stack
Author :- Jason Cannon
Edition :- 2014 Edition
Published by :- Jason Cannon
How to Setup a Highly Available LAMP Stack Even If You've Never Done It before, Don't Know Where to Start, or Don't Want to Spend Weeks Researching How to Do It. This step-by-step guide teaches you everything you need to know in order to eliminate single points of failure for your Linux, Apache, MySQL, and PHP based web applications. Do you wish you could ensure your web site was up all the time and finally enjoy a peaceful night's sleep? Do you want to be able to scale without downtime and handle unexpected surges of traffic?
Best LAMP Stack Courses And Tutorials
1. High Availability for the LAMP Stack, Step-by-Step(Udemy)
2. Linux and LAMP Stack Fundamentals(Udemy)