Blog Post

Find Your Way in the Jungle of Web Stacks

When chatting with co-workers, developers or customers, suggestions for what technologies and stacks to use couldn’t be more different. An overview of the current most popular open source web stacks.

What is a Web stack?

Over 10 years ago, when I started to become a web developer, I kind of went the usual way at that time: Learning HTML & CSS, exploring some PHP here and there – and of course MySQL. That was, if you were not using Java or ASP.NET, the technology stack of that time. No matter if you wanted to host a blog, a bulletin board or become an image hoster – you would more than often need these things: Linux, Apache, MySQL and PHP.

A Web stack is always a collection, a bundle of software or technologies, that make a web application. As of today, choices are plenty, and pros- and cons are constantly unknown to the decider.

Picking the right Web stack for your company

It’s no secret: Picking a Web stack can be a tremendous factor – deciding over success or failure of your project. Especially small enterprises and startups are struggling with the choices, as to budget and sustainability. Today I will be giving you an overview of the current, most popular open source web stacks, focusing on the two most famous solutions: LAMP and MEAN. Afterwards I will be comparing those stacks against each other.

LAMP: The allrounder

Being also the oldest stack, LAMP is a great alternative to closed source stacks.

Its integral components are:

● Linux (OS)

● Apache (Webserver)

● MySQL (Data persistence)

● PHP, Perl or Python (Programming language)

It definitely delivers a strong platform for developing and hosting performant, large web applications. With its biggest and oldest community, countless libraries and tools, you get a great support and will most likely find developers the next years quite easily.

There are also some derivatives:

● WAMP (Windows as OS)

● MAMP (Mac OS X as OS)

● XAMPP (Any OS + Perl or PHP + FTP Server)

● LAPP (PostgreSQL as database)

Pros:

LAMP is kind of the dinosaur of web development, used by hundreds of thousands of companies and therefore maintained and supported very well. With endless modules, libraries and add-ons available, you can certainly adapt it to your company’s needs.

Being Linux based you have all the freedom, and you will certainly find help for any topic in the large community. I’d also suggest you to dive in deeper on the database topic (SQL vs. NoSQL) to make your choice. Nevertheless, MySQL is a very reliable and scalable solution. PHP in its version 7, also being supported by a mature and big community, is very fast and integrates very well with the rest of the stack. In comparison to MEAN, you can control the server and decide which versions and software you install, you don’t have to depend on the client’s browser. Certainly, best if you have lots of server-side tasks. From a HR perspective, it is certainly possible to find enough developers, but ...

Cons:

Because it’s so easy to learn, there are a lot of developers out there not following best practices or building garbage apps. Starting with PHP is easy, but mastering it is hard. This is also true for security in these PHP apps. Some would also describe it as a script language instead of a real programming language because it’s not strongly typed and not pre-compiled. I’d also recommend diving in deeper into pros and cons of PHP, Python or Perl.

As for MySQL, other options are becoming more mature as well. NoSQL databases like Redis are popular among enterprise software solutions. Plus, pure JavaScript Stacks like MEAN gain more traction every year and new developers might not be interested in learning all of the LAMP’s skills.

MEAN: The slick performer

The MEAN stack is, compared to LAMP, a fairly new stack. One of its biggest differences is, that MEAN is not dependent on a specific Operating System – Node.js is taking care of the server-side execution.

● MongoDB (Data persistence)

● Express.js (server-side application framework)

● Angular (client-side application framework)

● Node.js (server-side environment)

MongoDB is a popular and flexible document based, NoSQL database, compared to MySQL’s relational database system. Angular helps to build progressive and modern web apps.

The MEAN Stack is especially recommended for JavaScript enthusiasts – as it uses only JavaScript on all levels. This fact also makes it preferred by new developers.

There are also some derivatives:

● MERN (React instead of Angular)

● MEEN (Ember.js instead of Angular)

Pros:

Using JavaScript as the primary programming language is of course a huge advantage. Everything can be set up quickly and done in JS, which makes it much easier to find developers, and LAMP developer typically know JavaScript as well. MongoDB is very popular for its easy schemaless data persistence and definitely faster than MySQL if you have a lot of read requests. The fact that Angular is maintained by Google is also a big plus. It receives new releases and functions on a constant basis. Another huge advantage is the ability to easily build mobile or desktop apps, for example with Ionic. Code and components can easily be reused or added.

Cons:

Hype! Like all new technologies, MEAN’s glamour and shine is creating a huge hype and many developers fall for this hype and build their apps in JavaScript, just because it’s trendy. Many of these libraries and frameworks are quite new, and new versions get released quickly, sometimes maintaining your app can become quite a hassle. Since many technologies disappear after a few years, sustainability can be questioned. It also becomes hard to maintain those apps if they become bigger, maintain a clean code basis and follow best practices. Furthermore, you have to rely on the client and the client’s available technologies. If you are targeting IE users, Embedded systems or low end PCs, it might become really hard.

A few others:

● WISA

Windows Server / IIS / Microsoft SQL Server / ASP.net

Not open source, but all components are coming directly from Microsoft, so it should work seamlessly.

● Ruby Stack

Ruby/Ruby on Rails/RVM (Ruby Virtual Machine) / SQLite

Definity losing popularity in today’s world, Ruby on Rails was an often-used framework once, and thus the whole stack.

● Java+Spring

Preferred by large enterprises and shied by indie developers for its complexity, Spring is offering an entire full-stack framework written in Java.

● Django Stack

Python / Django / Apache / MySQL

The Django framework is loved by countless Python developers, delivering performance and often referred to as easy to learn.

How to pick the right stack?

I already mentioned a few pros and cons of LAMP and MEAN.

You should always decide based upon hard facts and not get lured by hype. It’s hard to compare the popularity of stacks, but we can compare programming languages to get a feel.

As one can clearly see, the popularity of JavaScript is a little higher than PHP right now. I’d always recommend you to check development trends with Google’s trend tool from time to time.

So, how to pick the right stack?

The answer is: There is no right stack. It always depends on a lot of factors.

If you are an experienced developer or project owner, a few questions to help yourself find the answer could be:

- What kind of web-application am I planning to create?

- What is its expected lifetime?

- What about sustainability?

- What technologies are available at my customer’s/client’s infrastructure?

- If I am the project owner: How easy is it to find developers and maintain the application?

Let me give you an example. Let’s say you already own a website for listing used cars. It was developed using a LAMP stack some time ago. But your website is lacking a back-end for used car dealers, where they can manage their listings on your website. Depending on your company size, time and money, you have to ask yourself all the above questions. If you only have a small team, it might make sense to extend your existing application in the LAMP environment, since your developers know the ecosystem and will be much faster in the first place. If you have some time and resources to spare, you could also take another approach and extend your existing LAMP application by an API. Afterwards, your team could focus on developing a small, standalone (M)EAN application, that can easily be maintained, improved with new features released in a much faster cycle. This app will then access your API. In the long run, you would definitely benefit from this new back-end, and you could expand it with further APIs or even replace your LAMP app some day without worrying about your MEAN app too much. And since you got an API now, you could just as easy develop a mobile app complimenting it and reuse some of your JavaScript code.

Another example: You want to build a newsletter platform, where people can sign up, upload mailing lists, compose mailings and so on. You could of course use MEAN, but you have the large scale and huge traffic in mind. Maybe it would make more sense to use a LAMP stack as your foundation, since Linux, MySQL and Apache are providing a very stable, scalable environment with lots of community support for any thinkable problem. You will also have lots of server-side tasks and cronjobs and will encounter mailing topics like SMTP and so on. I would seriously recommend a Linux environment customized to your needs in this case.

MEAN

- Single code base (JavaScript)

- Popular for modern web apps and hybrid apps

- Supported by large companies like Google

- Better for apps where a lot of the logic can happen at the client’s side

- Harder to maintain if becoming big

- You have to rely on the client’s browser

- Best for progressive web apps

LAMP

Better for large applications

- More mature, huge community

- Well-established Applications Frameworks like Symfony, Zend, Laravel

- Better suited if you have a lot of server-side tasks

- Easier to follow standards and maintain keep code clean

If you want to become a developer, and you are new to programming and web development, you should consider:

- What is the easiest to learn?

- What technologies are trending and which will win in the long run?

- If open source, could I imagine contributing to the project?

- Which technologies will serve me personally in the long term?

A great resource for finding answers on JavaScript technologies is the SateOfJS project - https://stateofjs.com/.

It’s a great project, conducting a survey every year and asking thousands of developers on their opinions on current technologies and also on their salary.