News: 1589929333

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

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

(2020/05/19)


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.

[1]

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 [2]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 [3]here . ®



[1] https://regmedia.co.uk/2020/05/19/vscodestatic.png

[2] https://assets.thoughtworks.com/assets/technology-radar-vol-21-en.pdf

[3] https://docs.microsoft.com/en-us/azure/static-web-apps/

Watching girls go passing by
It ain't the latest thing
I'm just standing in a doorway
I'm just trying to make some sense
Out of these girls passing by A smile relieves the heart that grieves
The tales they tell of men Remember what I said
I'm not waiting on a lady I'm not waiting on a lady
I'm just waiting on a friend I'm just waiting on a friend
...
Don't need a whore
Don't need no booze
Don't need a virgin priest Ooh, making love and breaking hearts
But I need someone I can cry to It is a game for youth
I need someone to protect But I'm not waiting on a lady
I'm just waiting on a friend
I'm just waiting on a friend
-- Rolling Stones, "Waiting on a Friend"