DEV Community

Cover image for JAM v LAMP v MERN v MEAN Stack
Salman Siddique
Salman Siddique

Posted on

JAM v LAMP v MERN v MEAN Stack

At the heart of the stack, JAM is an acronym for the three main concepts: JavaScript, API, and Markup. But we need to dig a little deeper in order to find out what JAMstack is capable of, and how developers can use these technologies together to make for better experiences.

JAMstack refers, in practical terms, to web apps built using the following stack:

Javascript - The websites in the browser use Javascript as the runtime.

API - All processes on the server-side or database operations act as a custom-built, reusable API that connects to third party services.

Markup - When deployed, the HTML markup is pre-built.

Workflow of JAMstack

  • There is a decoupled building and hosting.

  • A page is requested by a user. The file is already compiled and will be served directly to the browser from the CDN.

  • Core updates are pushed via Git; the site is entirely re-built by modern development tools such as static site generators (Gatsby, Hugo).

  • Updates to content are pushed via Git or a static CMS site

LAMP-1-600x338
Image Ref: synergytop.com - blog

LAMP

For Linux based environments, LAMP is the standard stack. The LAMP stack consists of a Linux operating system (L), an Apache Web server (A), a MySQL database layer (M), and a PHP scripting layer (P). The main challenge is the high learning curve with this stack. This increases the timeline for setting up a working app and can potentially contribute to performance and security issues for applications with concurrent users.

MEAN

This stack consists of a database (MongoDB-M), Express.js(E) for the web application backend framework, Angular.js(A), a web development frontend framework, Node.js(N), a JavaScript run-time setting. As you can see, MEAN is based quite a bit on JavaScript. For large, non-relational data sets, it is recommended, with a simple downer being the performance issues of JavaScript.

MERN

The stack consists of a database of MongoDB(M) documents, Express.js(E), which is a back-end application web application platform, React(R), which is a library of JavaScript user interfaces, Node.js(N), a JavaScript runtime setting. Similar to MEAN, MERN is JavaScript-based.

How is JAMStack Different?

Let's take a look at the other stacks and see how JAMstack manages its awesomeness in order to grasp JAMstack better. Before their development, developers used various methods to set up web sites and applications as such.

You have to wonder why we need another tech stack.
I have five easy explanations why you'd like to use JAMstack:

Better Performance:

JAMstack driven applications generate pages at deployment as they are mostly stored as markup and can be delivered over a CDN.

High Security:

Since they are all HTML files and CDN-served external API links, static websites have limited vulnerability potential. The risk of website attacks is significantly reduced by this simple design. It is simple to integrate SSL certificates, and JAMstack can also exploit the use of server-side microservice APIs to secure pages.

Fast Deployment:

Without the hassle of configuring and securing the databases, JAMstack websites can easily be deployed. Developers simply work quickly to get up and run static files.

Awesome Programming Experience:

The simplicity of using architecture and instruments is one of the most important advantages of using JAMstack. With only HTML, CSS, and JS, developers can build complex websites. Using site generators removes the need to maintain a separate stack for content and marketing.

Supportive Community:

Support for several features appears every day. The production of local community meetings is even more exciting. The online community is also amazing, too.

You can read more about what JAMstack is and how it is allowing the headless tech to thrive.
Published on Cloudways: What is JAMstack? How is it Enabling Headless Tech to Thrive?

Top comments (0)