DEV Community

Cover image for Jamstack vs Conventional Web Architecture - Which One is Right for you?
Robert Schleinhege for IONOS

Posted on • Edited on

Jamstack vs Conventional Web Architecture - Which One is Right for you?

History and future of the web

When the first website was published around 30 years ago, the web was purely static. Some HTML and CSS, that's it. At the turn of the millennium, the Web 2.0 increased emphasis on interactivity, UX and user-generated content. Content Management Systems allowed participation without programming skills, leading to an exponential growht of the web. In the last decade, the share of CMS based websites increased from about 20% to over 60%.

Image description

It's important to mention that since the rise of the CMS the architecture of the web remained more or less unchanged - also due to a lack of real alternatives. Now, there is one: The Jamstack. Let's discuss if or if not Jamstack is right for you.

Architectures compared

Image description

Conventional Web

If you have some experience in web development, this architecture should look familiar. A client asks for a resource. An application, let's say a WordPress installation, receives the request. WordPress does some database queries to fetch content, code and data for your site and it's plugins. HTML and CSS is rendered and the result is send to the client.

The Jamstack

The Jamstack (acronym for - mostly client-side - JavaScript, reusable APIs and Markup) is based on the priciples of decoupling and prerendering. In this setup, the server is only responsible for delivering static frontends. These frontends are pregenerated at build time, e.g. every time a developer pushed new code or an editor updated content. Client specific, dynamic functionalities are handles my a set microservices. These microservices communicate with the frontend via client-side JavaScript and APIs.

Conventional Web: Pros and Cons

Pros

  • Broad choice of open source standards: The conventional web comes in many flavors. While LAMP (Linux, Apache, MySQL, P-interpeters) is the most used web stack, you can still switch to a different interpreter, switch the database technology or completely focus on JavaScript in a full MEAN stack (MongoDB, Angular, Express.js, Node.js).
  • Works great for dynamic apps: Using your web server to execute scripts and store data might be the most straight forward way to implement dynamic use cases like log ins or payment processes. You don't need to involve any third party.
  • Many of your stakeholders already work in this ecosystem: I assume you don't work on project alone. If your colleagues from marketing already work with WordPress, making the switch can be painful.

Cons

  • Relying on monoliths: Especially for smaller websites, it's very likely that you will end up handling all logic and data via the webserver. This makes it hard to switch individual components. All your services compete for the same resources.
  • Performance: Requests and responses typically go through a lot of layers. Database requests are time consuming. And implenting an effective cache is not allways as easy. Popular Jamstack frameworks like Jekyll, Hugo and Gatsby tend to have a by far better Largest Contentful Paint than a WordPress or Wix site.

Image description

  • Learning curve: Getting started with LAMP or MEAN follows a trial and error process. Controlling all components at a time can be very challenging if you are new in the area.

Jamstack: Pros and Cons

Pros

  • Many frameworks for static prerendering: No matter if you want to generate your sites with JavaScript templates like Vue or React or with Go or Ruby, there is a static site generators you can use. All work with the same principle: Prerender markup based on various inputs in a modular structure.
  • Efficient use of resources: Jamstack websites do not require a lot of infrastructure, which saves money - but also CO2.
  • Secure: As only static websites are visible to the outside world, security issues are unlikely. And you need to do less updates to close security gaps.
  • Flexible: Modular microservices can be based on different technologies - and can be replaced any time.
  • Developer experience: Almost all Jamstack hosters integrate state-of-the-art Git workflows into their hosting products.

Cons

  • Interfaces are not made for non-devs (yet): Even though you can integrate Headless CMS to improve the editor experience, It's still lacking options for non-devs to create Jamstack websites.
  • Integration of dynamic functionalities: As your webserver is only able to serve static sites, you will need to integrate additional services for any dynamic logic. You might end up being dependent on many third party services.

How do hosting providers position?

Traditional hosters keep betting on LAMP

Many traditional hosters like GoDaddy still offer purely LAMP-stack based hosting products, either with shared or dedicated. Technically, you could use a conventional hosting package for a Jamstack site as well - but these would come with things you don't need (databases, tons of storage) and without a git integration. Most of these shared hosting packages are priced around 10$ - a little bit too much for simply delivering static sites.

Specialists joining the market

The vacuum left behind by the traditional hosters is filled by niche providers. US-based startups like Netlify or Vercel purely focus on static sites without offering server runtimes or databases. Providers like DigitalOcean offer dev-convenient hosting platforms, that in theory also work nicely for static sites. However, their key focus is on hosting resource hungry, scalable applications.

IONOS offers GDPR compliant hosting solutions for both philosophies

If you want to work with different stacks under one roof, IONOS might be a good choice for you. You can select between shared hosting, managed or root dedicated hosting and cloud servers for conventional set ups - and host your Jamstack sites or apps on Deploy Now. Additional services like domains are allways only one click away.

Top comments (2)

Collapse
 
fuleteo2022 profile image
Fuleteo | Musica

nice work

Collapse
 
roberts profile image
Robert Schleinhege

Thanks a lot :)