Microsoft aims to spread JAMstack through Azure App Service via GitHub and Visual Studio Code

Developers, get ready to hook into Windows giant's cloud

Got Tips? 1 Reg comments
Javascript photo via Shutterstock

Build Microsoft has announced a new App Service for Azure, now in preview, designed for applications built using the JAMstack pattern.

Azure App Service is one of the earliest Azure services, and one of the most useful. You can deploy a application for Windows or Linux, and the service will provide the resources on which to run it, with load balancing and auto-scaling. That said, the new service has little in common with existing App Service plans, because the underlying technology is different.

The newly announced App Service type is called Azure Static Web App and is designed to work in conjunction with GitHub. When you create a new Static Web App service, a corresponding GitHub Action automated workflow is also configured. In this case, whenever you commit a code change into the repository for your new site, the service builds and deploys the updated code.

The JAM in JAMstack stands for JavaScript, API and Markup. The key concept is that a web server is not required. Instead of a server application which generates code dynamically, a static site generator does this once for each deployment, so no server-side processing is required. You can use a content delivery network to further improve performance.

Most web sites do need some dynamic content, and typically a JAMstack application gets this by calling an API, microservices or serverless functions from JavaScript running in the browser. Since this content is delivered from the server, it can also be secured, requiring authentication to access.

In the Azure solution, there is integrated API support from Azure Functions. The service also provides globally distributed static content, free SSL certificates, and staging support so you can preview a site before publication. There is built-in support for commonly used JAMstack site generators and frameworks, including Gatsby, Hugo, VuePress, Next.js and Nuxt.js.

The Visual Studio Code extension for static web sites

The Visual Studio Code extension for static web sites

Microsoft’s solution integrates with Visual Studio Code as well as GitHub. We took an early look at the extension (which had only been installed a dozen times according to the stats), and it requires the Insider’s build of VS Code. The extension has wizards for deploying your static site, and for adding Azure Functions. We followed the wizard and successfully created a site which updates on Azure every time a code change is committed.

The JAMstack concept had some logic to it, and while it is not suitable for every kind of site, it has advantages for those which fit the model. Software development company ThoughtWorks rates the idea as "Assess" and said in November that “this approach can provide rich user experiences to web applications that rely mostly on APIs and SaaS offerings.

Because the HTML is rendered either in the web browser or at build time, the deployment model is the same as fully statically generated sites, with all its benefits: the attack surface on the server is small and great performance can be achieved with low resource usage.”

This is also an example of Microsoft taking advantage of its developer assets, GitHub and Visual Studio Code, to offer an code-to-application solution that pushes developers towards Azure.

Documentation for the new service is here. ®

Sponsored: Webcast: Simplify data protection on AWS

SUBSCRIBE TO OUR WEEKLY TECH NEWSLETTER


Biting the hand that feeds IT © 1998–2020