Which Web Application Stack Is Best for Me?
Critically examining the underlying architecture for a web application is an important step in defining the end product. That explains why one of the first questions that developers ask each other is: "What stack are you using?"
The LAMP stack (Linux/Apache/MySQL/PHP), the WISA stack (Windows\IIS\SQL Server\ASP.NET), and the Java web application stack (Linux or Solaris/Tomcat/MySQL/JSP) seem to be the most popular, but there are countless others and important distinctions and trade-offs among the available solutions. For instance, free isn't always cheaper, and feature-rich doesn't always mean more functionality. The aim of this article to compare and contrast the different stacks available and help answer the question developers should be asking: "What stack is best for me?"
- Start-up and hobbyist developers: Ideas and concepts fuel these developers' effort. They want the architecture to be simple so they can focus on the idea, test changes quickly, and get something running.
- Small and mid-sized business (SMB) developers: These developers tend to use frameworks and more traditional design patterns, and they generally are creating something more maintainable and upgradeable than the start-up/hobbyist developer.
- Enterprise-level developers: Security, integrity, and privacy tend to be the most important criteria for these developers. As such, they rely more heavily on standards and staying on par with the IT industry.
This article covers the LAMP, WISA, and Java web stacks including JBoss and GlassFish. It will go over the basics of how they work, what they can do, and how each addresses different needs for different deployments. It will provide a recommendation for the data tier as well.
The LAMP StackOf all the stacks, LAMP is the one that seems to be getting the most attention lately. Digg, Facebook, and other Internet giants are partly responsible for drawing attention to it. But make no mistake; this stack has been around for a long time. The key draw seems to be that it is free (as in it doesn't cost anything AND it is open source), but to say it is zero-cost would be inaccurate. It doesn't cost anything to download, but installation might not be so cheap. There may not be a direct cost associated with licensing, installation, setup, or deployment, but the process isn't as quick and easy as one might hope.
LAMP isn't a well-defined concept. Nearly every LAMP shop uses some flavor or variant of the basic LAMP stack. For beginners, setting up a custom stack may take a few days of scouring the Internet. True, packages like XAMPP may make it simple to get a service stack up on top of the OS, but going from nothing to OS, server, scripts, and database may not be possible in one go. It may also be difficult to find a Professional LAMP Setup Guru if the beginner runs into trouble.
When up and running, the products generally work pretty well together, and in a straightforward way. In terms of performance, Linux makes for a fast response system but the PHP layer presents some limitations. PHP is an interpreted language, so the server must interpret each PHP script in its entirety, every time that script runs. While this has the benefits of not needing compilation and gaining some language perks, the downside is performance. According to another article, Digg.com had to scale up to 100 servers just serve up 30GB of data and maintain high performance. However, there are ways around this using Alternative PHP Cache (APC) or other accelerators.
PHP also doesn't give very much access to the page lifecycle. Really, it is intended only for request and response handling, provided that the server is invoking it at the right times. This makes it beautiful for simple (technically speaking) sites like Digg, but not powerful enough for more intensive applications being hosted on the web. Among the useful features it lacks from an enterprise application point of view are things like persistence management (à la JPA/JTA or Entity Framework style) or a reasonably powerful session manger.
So what this all means is that, for more than just reasons of being free, this stack is best suited for hobby/student development and SMB development. Mostly because ideas for sites like Digg or Facebook don't actually need any enterprise features or anything more than request/response handling. There isn't any intensive data processing going on. Things like failover, backup, and security need to be added on by other products and are not standard or straightforward. However, because the LAMP architecture is scalable, adding load balancing, server farming, and other such features may provide enterprise functionality.
Those Windows users just starting with web development and worried about the jump to Linux should note that a similar stack (WIMP: Windows\IIS\MySQL\PHP) is not uncommon on the Windows platform.
Page 1 of 3