Search ServerWatch
Search ServerWatch
Search ServerWatch



Become a Marketplace Partner

  • Partner With Us















ServerWatch > Tutorials

December 1, 2005
Understanding LAMP
By Martin Brown

LAMP Is Greater Than the Sum of Its Parts

The Apache server running on Linux is an easy way of building a simple Web server, but the information provided by the Apache server will be "static" — that is, basic pages of information that the you must build and type yourself.

Adding interactive or dynamic components requires the use of a programming language, like Perl or PHP. These allow you to work with forms. For example, they let your users send you an e-mail or randomly select a page to visit.

By combining a Web server (Apache), dynamic components (using Perl, Python, or PHP), and a database (MySQL) we can create a truly database-driven and dynamic Web site that is easy to update and provides rich functionality to support users.

For truly interactive and dynamic Web sites, however, what you need is a way of building pages composed of information in a database. For example, imagine you want to create an online store along the lines of Amazon. You could do it using static pages. You could even use dynamic elements to let people add products to their basket and send their order to you, but as the number of products to be sold increases, the management overhead to control everything will become a nightmare. Furthermore, providing advanced functionality for customers, such as the ability to view past orders, can be impossible.

This is where the power of the LAMP stack shines. By combining a Web server (Apache), dynamic components (using Perl, Python or PHP), and a database (MySQL) we can create a truly database-driven and dynamic Web site that is easy to update and provides rich functionality to support users.

The easiest way to see the power and functionality of the LAMP stack in action is to take a look at some of the pre-packaged applications available that use LAMP technology. A well-known example of this is the WordPress blogging system. WordPress uses PHP to interface with a MySQL database and can be hosted on an Apache/Linux server.
Choosing to use open source for your business is not about cost; it is about the effectiveness and capabilities of the product to do its job.

The WordPress system is powerful and demonstrates most of the functionality of the LAMP system. PHP is the application environment, extracting data from the database and formatting it for display in a Web browser. All of the "articles" or posts are stored in a MySQL database, and individual posts are categorized in the right-hand panel to make it easy to find and locate posts on specific topics. Posts can also be selected by date, and even author, since WordPress also supports multiple users. WordPress can use the relational functionality of MySQL to display posts ordered by category or to display only specific categories. Even in the simple display of the "home" page, it uses the relational features of MySQL to extract relevant data for each post.

Another good example is Wikipedia, which uses PHP, MySQL, and Apache HTTPD to provide an online encyclopedia with thousands of entries in multiple languages. All of this is served by Linux servers running the WikiMedia application.

Figure 3
Wikipedia at Work

Wikipedia at Work

This functionality is possible within other Web application environments, but the key is how simply all of the LAMP components work together. The WordPress code, for example, is surprisingly simple and straightforward. The code is easily customized and extended, and formatting can be altered to meet individual needs.

Using the LAMP Stack in Your Business

Choosing to use LAMP in your business is not about cost — although many enterprsies will be attracted to the low-cost required for both development and deployment. Instead, choosing LAMP for your organization is about the benefits it provides, as summarized below.

  • Flexibility: There are no limits to what you can do with the LAMP stack, either technically or because of licensing restrictions. This allows you the flexibility to build and deploy applications in a method that suits you, not the supplier of the technology you are using.
  • Customization: Because LAMP components are open source, they have built up a huge array of additional components and modules that provide additional functionality. The open source approach enables you to do the same, customizing components and functionality to suit your needs.
  • Ease of Development: You can write powerful applications using LAMP technology in relatively few lines of code. Often the code is straightforward enough that even nonprogrammers can modify or extend the application.
  • Ease of Deployment: With neither licensing issues nor the need to compile applications, deployment is often as easy as copying an application to a new host. Most hosting services provide LAMP-based environments as standard, or they can be deployed using a Linux distribution, such as Fedora or Debian.
  • Security: With many eyes developing the software and years of use by a wide range of users and community groups, LAMP technology is secure and stable. Problems are normally fixed very quickly, and without the need for a costly support contract.
  • Community and Support: A wide and experienced group of people is willing to provide help and support during the development and deployment of LAMP-based applications.

Many successful business have already leveraged the use of LAMP technology. Many heavily trafficked Web sites use LAMP, or components of it, to support their applications.

Related Acronyms

The original LAMP acronym has spawned a number of other, related acronyms that capitalize on the main focus of the original combination of technologies to provide feature rich Web sites. Although many alternatives are out there, the most prominent are the following:

  • LAPP - Linux, Apache, PostGreSQL, Perl/Python/PHP
  • WAMP - Windows, Apache, MySQL, Perl/Python/PHP
  • MAMP - Macintosh, Apache, MySQL, Perl/Python/PHP
  • BAMP - BSD, Apache, MySQL, Perl/Python/PHP
  • WIMP - Windows, IIS, MySQL, Perl/Python/PHP
  • AMP - Which allows the omission of the operating system

      They are all based around similar principles, with the most common item being the languages. To be fair, the operating system is not as important as the server, database, and language options, since AMP is also an effective combination on other platforms, including Windows. It is, however, more common to use an entirely open source solution, and the support that comes with Linux distributions for easily installable versions is an obvious bonus.

      Conclusions

      The LAMP stack is basically the combination of four popular open source technologies that together produce a powerful application serving platform. LAMP is often seen as the best open source solution to compete with proprietary and commercial products, such as Windows, IIS, and .NET. Certainly its low cost is appealing, but the open source nature, making for free and easy development and deployment, is a much more attractive reason to use the technology. Choosing to use it for your business is not about cost; it is about the effectiveness and capabilities of the product to do its job.

      Go to page 1  2  3  


      Discuss this article
      Tools:
      Add serverwatch.com to your favorites
      Add serverwatch.com to your browser search box
      IE 7 | Firefox 2.0 | Firefox 1.5.x

      Tutorials Archives




    • JupiterOnlineMedia

      internet.comearthweb.comDevx.commediabistro.comGraphics.com

      Search:

      Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

      Jupitermedia Corporate Info


      Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

      Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

      Solutions
      Whitepapers and eBooks
      IBM Whitepaper: Innovative Collaboration to Advance Your Business
      Internet.com eBook: Real Life Rails
      Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
      Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
      Internet.com eBook: The Pros and Cons of Outsourcing
      Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
      Internet.com eBook: Best Practices for Developing a Web Site
      IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
      Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
      Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
      IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
      Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
      Go Parallel Article: Getting Started with TBB on Windows
      HP eBook: Storage Networking , Part 1
      MORE WHITEPAPERS, EBOOKS, AND ARTICLES
      Webcasts
      Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
      HP Video: Is Your Data Center Ready for a Real World Disaster?
      Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
      HP On Demand Webcast: Virtualization in Action
      Go Parallel Video: Performance and Threading Tools for Game Developers
      Rackspace Hosting Center: Customer Videos
      Intel vPro Developer Virtual Bootcamp
      HP Disaster-Proof Solutions eSeminar
      HP On Demand Webcast: Discover the Benefits of Virtualization
      MORE WEBCASTS, PODCASTS, AND VIDEOS
      Downloads and eKits
      Microsoft Download: Silverlight 2 Software Development Kit Beta 2
      30-Day Trial: SPAMfighter Exchange Module
      Red Gate Download: SQL Toolbelt
      Iron Speed Designer Application Generator
      Microsoft Download: Silverlight 2 Beta 2 Runtime
      MORE DOWNLOADS, EKITS, AND FREE TRIALS
      Tutorials and Demos
      IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
      Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
      Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
      MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES