DEV Community

Cover image for Is the JAM stack the future of web development?
RealToughCandy.io
RealToughCandy.io

Posted on

Is the JAM stack the future of web development?

The JAM stack consists of JavaScript, APIs, and Markup.

Over the last few years, this stack has become increasingly popular with fun and new options (for example, Gastby).

And now with platforms such as Netlify, deploying a JAM stack site is dead simple.

JAM stack architecture vs traditional web architecture

Above: traditional web architecture is on the left, while the JAM stack architecture is on the right. Source: JAMstack.org

That said, the JAM stack does have its limitations.

What do you think? Is the JAM stack the future of web development or is it destined to be simply a fun stack for hobbyists?

Top comments (15)

Collapse
 
nikhilmwarrier profile image
nikhilmwarrier

Note: I suck at predictions,

But JAMstack is kinda cool, and it involves lesser pressure on both the developer and servers, while keeping blazing fast page load speeds for the end-user. Hosting is pretty much free nowadays for JAMstack, what with Netlify and GH pages. Cloudflare is also coming up with a similar service.

I suppose JAMstack is the way forward for blogs and e-commerce sites, but for dynamic SPA's, a strong backend is a must.

I do think that JAMstack might overtake WordPress someday, but we're not there yet...

Anyway, what do you think, RTC?

Collapse
 
realtoughcandy profile image
RealToughCandy.io

Honestly, I was pretty skeptical of it when I first heard about it a few years back. I didn't like how it relied on so many 3rd party services to provide basic functionality (like a comment section beneath a blog post). That said, I've used both SSGs & headless CMSes in the past and freaking loved the workflow.

In the next few years I think it'll probably continue to gain popularity in the personal blog niche, especially with the tech set, but with WordPress claiming 1/3 of the web I think it'll be awhile 'til JAM goes mainstream.

Collapse
 
miriamschwab profile image
Miriam Schwab

The WordPress industry is also looking towards adopting Jamstack approaches to website development and deployment. There is a growing trend of headless WP builds, and there are also a number of tools and solutions that allow users to enjoy the benefits of WordPress, while deploying the site as Jamstack and serving fully via CDN. One example is Strattic, that allows users to use WP as usual, and then click a button to deploy as static. strattic.com (I'm the CEO).

Thread Thread
 
nikhilmwarrier profile image
nikhilmwarrier

Strattic seems cool! I will try it someday myself....

Collapse
 
nikhilmwarrier profile image
nikhilmwarrier

I too actually hated the dependence on 3rd party services, but actually it wasn't half as bad as I thought it was, though it would never be as flexible as I wanted....
Also, do using PaaS [like Firebase] for databases and auth count as JAMstack?

Collapse
 
lacikawiz profile image
Laszlo Szenes

Absolutely! It's simpler, more effective, faster, more flexible and more logical than the traditional architecture.
I actually came up with a setup that I use on my main project, which basically fits the definition of JAMStack, before I even heard about it. And probably many others did the same. So it seems to be the next logical step with the evolution of Javascript and its frameworks.
It, of course, will take a while for the technologies to mature and consolidate, hosting services to catch up, and replacements for the well established traditional hosted software (eg: WordPress) to be developed, etc.
PS: I use Svelte on the front-end, and Go or PHP (WordPress API extensions) on the back-end depending on my projects.

Collapse
 
realtoughcandy profile image
RealToughCandy.io

It's simpler, more effective, faster, more flexible and more logical than the traditional architecture.

This!

Collapse
 
bezpowell profile image
BezPowell

I think it really depends on the kind of content on the site. Static sites will always be faster than those generated on request via a server side language. Some kind of CMS (I know there are a few out there already) will be essential for wider adoption though, if non-technical users are told they have to learn git and markdown to update content on their site they will go with something like Wordpress instead.

I am slightly wary of the JAMstack for dynamic content; it's not something I've really explored much (I'm more comfortable with HTML and CSS than JS), but any system that explicitly requires JS to fetch content seems inherently less robust to me - I think all the primary content on a page should be rendered server side by default with dynamic JS as a progressive enhancement.

Having said all that, my own personal blog / portfolio site is hosted on Netlify and built using Zola and I absolutely love the control over markup this gives me vs a CMS based system, and the convenience vs hand coding every page, It seems to be the best of both worlds.

Collapse
 
esportleague profile image
e-leag

Does anyone have an example of a website with dynamic content, e.g. with production product prices changing many times per hour etcc ?

Collapse
 
lbayliss profile image
Luke Bayliss

Social media is an example of a website with dynamic content and Ebay is an e-commerce example; they all have data that is changing constantly. They wouldn't work well as JAMStack as you'd have to trigger a rebuild every time someone makes a bid or creates an auction.

That's not to say you can't have the best of both worlds. Almost every application I've built in the passed two years has made use of SSR and Static.

Thread Thread
 
esportleague profile image
e-leag

And what would you choose from assistance such as gatsby but to build a mainly dynamic website?

Thread Thread
 
hijazi313 profile image
Muhammad Hamza Hijazi

SSG is not recommended where content is dynamic. you should go with SSR instead

Collapse
 
bezpowell profile image
BezPowell

I can't actually think of any off the top of my head. If you could only re-render pages where stock / price etc. has changed you could extend the definition of static to things that only render when changed.

I suppose the only things that would need to be truly dynamic would be situations like unique account pages and stock prices etc?

Very interesting when you start to think about what can be rendered statically.

Collapse
 
adrinamin profile image
Adrin Amin Salehi

Great question! I also thought about that the last couple of days, after using Hugo for my personal site.

It eventually depends on your project requirements and what kind of content you want to display. As already mentioned, there are use cases, like social media or e-commerce, where you need to display dynamic content.
But when only displaying static content, JAMstack is the way to go. Your site loads much faster. If necessary, you can use JavaScript. Hosting your site is pretty easy and the costs for hosting are very cheap.

In the end, traditional web architecture will not disappear because there are still scenarios where you want to render your site on the server. And there are still many projects where migrating to new a architecture is very costly. But for new projects it's definitely worth considering.

Collapse
 
jankapunkt profile image
Jan Küster • Edited

What are the downsides of this stack?