LAMP is an acronym for the software combination of Linux
. Alternatively the P can stand for PHP
. This is a powerful combination of software, which has several advantages over the Microsoft
equivalents when considering building a web application from scratch:
- All components of LAMP are free and open source. If you are a commercial software vendor, this is hard to beat.
- Admittedly, this depends on the design of the application, but LAMP usually wins in terms of what you get for a particular size of machine.
- Development Time
- There is a huge geek community out there, and lots of reusable open source modules, CPAN for instance. Languages like Perl and PHP make it very easy to get a new application up and running very quickly.
have not lost any opportunity to spread FUD
, and try and discredit LAMP solutions.1
All the software is free and downloadable, but for the Linux operating system
, for a first timer, you are better buying one of the shrink wrap
ped commercial distributions, such as Red Hat
, etc. These come with a set of CDs and manuals. In my opinion, worth it for $70.
- http://www.linux.org/, http://www.redhat.com/, http://www.suse.com/
- http://www.php.org/, http://www.cpan.org/
All the above have free online tutorials and discussion forums. Regarding help getting to grips with this technology, there are plenty of people out there.2
In terms of choosing between Perl and PHP, Perl has a bigger learning curve
, but is much more powerful. For simple applications, such as web forms that insert to and query a database, PHP is easily adequate.
Also, if you decide not to bite the bullet with Linux, Windows binaries of the other three components are readily available.
Scaling up a LAMP application
If the website takes off, and the project becomes a success, it will probably be necessary to upgrade the components. The tanstaafl
effect kicks in, and it involves spending money. However, this can be done in stages, and none of the initial investment of time is lost. Note: the items are not listed in a particular order.
- Hardware/Operating System
- Maybe your application is running out of poke. It is worth considering moving operating system and hardware platform to a multi-CPU commercial Unix environment. Also consider that Linux is available across a wide variety of platforms including the DEC Alpha.
- It is known that MySQL does not scale well - more in terms of complexity than size.4 Consider replacing MySQL with a commercial database such as Oracle or Sybase. Both PHP and Perl's DBI module are capable of talking just as easily to different databases.
- ModPerl is an Apache component, which provides cacheing of code, and multithreading. If you have a Perl application, there are performance benefits for coding it to use ModPerl. This should be considered when doing the initial design, bearing it in mind that using ModPerl restricts the site to only running on Apache webservers.
The Java alternative
Besides the Microsoft approach and LAMP, many commercial vendors are offering solutions based on J2EE
. These include IBM
and BEA Weblogic
. The disadvantage with this technology is that you have to start big.
Before getting anything off the ground, you will have to spend $$$ on hardware, software licences and experts - J2EE technical architect
s don't come cheap. But if you have a commercial sponsor, this could be the best option.
See the writeup and discussion: "Ethics of dealing with evil" http://perlmonks.org/index.pl?node_id=205801
for an interesting story.
2See the sites mentioned on my homepage. I may be able to help if you are genuinely stuck (/msg me: I may be able to point you in the right direction).
3There are free alternatives to MySQL, such as PostgreSQL which has good reviews. Thanks to StrawberryFrog for pointing this out.
4As JerboaKolinowski has pointed out to me, there is no problem with a MySQL database storing large volumes of data. Indeed Everything2 sits on top of a MySQL database. The issues with MySQL concern the lack of a facility for stored procedures, and limitations in the area of access control and locking, compared with other SQL databases. It is possible to compensate for these deficiencies by introducing more complexity into the application, however, this is less maintainable as the functionality is built into code, not metadata. The down side is that you will start needing a person with DBA skills. See the node MySQL for more discussion on the pros and cons.