Astro Expansion Plans, Swift Migrates, and TypeScript Update

Performance versus personalization: It’s traditionally been a trade-off between the two for frontend developers. But Astro thinks it’s found a solution in its Islands architecture to have it both ways.

Astro ran a three-part blog series this week outlining its plans for expansion — including the introduction of Server Islands, a new island architecture primitive. Server Islands lets developers “deliver static, CDN-cached HTML page shells with injected dynamic content,” Astro CEO Fred Schott wrote on Thursday.

Astro is a JavaScript web framework optimized for building fast, content-driven websites, and it uses the Island architecture, which it pioneered in 2021. Island architectures separate interactive elements from static content to reduce initial load times and improve the user experience. Several other JavaScript frameworks have embraced the island approach, including Fresh, a web framework created by the Deno team.

“Islands are unique because they allow Astro to automatically strip all unused JavaScript from your page, delivering faster performance without forcing you to give up your favorite UI components at dev time (React, Svelte, Vue, etc),” Schott wrote.

But often frontend developers have to choose between performance and personalization, the team added, with performance requiring that developers serve pages as static HTML and using aggressive caching, while personalization requires serving pages as dynamic HTML that’s rendered on-demand. Each forces developers to make choices that can impact the other.

“Performance and personalization shouldn’t be mutually exclusive,” Schott wrote. “We believe that Islands architecture holds the answer to this problem as well, and we are currently working on a new feature to bring you the best of both worlds: Server Islands.”

Server Islands are still in the exploratory phase but build on Astro’s existing island frontend architecture. Schott explained how it would work:

“You define a server island the same way you would a client island, but instead of using a client:* directive you would use the new server:defer directive instead:

“This tells Astro to skip rendering this component in the initial response and ‘defer’ its render to later. This lets you cache the static page behind a CDN with some initial placeholder content. When the dynamic HTML has loaded, it replaces the server island on the page with the HTML result of the deferred render.”

The blog post includes a prototype that’s running the sample.

“Performance and personalization shouldn’t be mutually exclusive. We believe that Islands architecture holds the answer to this problem as well.” — Astro CEO Fred Schott

“Conceptually this is similar to the concept of Suspense in React, Solid, etc. but with the key difference that the deferred island is rendered as a separate HTTP request,” he wrote. “We have intentionally avoided streaming the static content and the islands back in a single response to simplify things for your CDN of choice.”

Earlier in the week, Astor introduced an update to the View Transitions API, which “Astro can now leverage for native, app-like page navigation without a single line of JavaScript required,” Schott wrote on Monday.

“The View Transitions API is a set of new platform APIs that unlock native browser transitions between pages,” Schott said. “Historically this has only been possible in JavaScript-heavy Single Page Applications (SPAs), but recent advances are now bringing native page transitions to the web platform.”

Astro users have had early access to view transitions since Astro 2.9, but due to browser limitations, it relied on injecting a JavaScript router onto the page to manage the animations. With the release of Chrome 126 last week, and Microsoft Edge 126’s release this week, there’s now support in both for “cross-document view transitions,” which unlocks the zero-JavaScript view transitions in Astro, he added.

Finally, on Wednesday, Schott outlined a new way to work with local and remote content sources in Astro. Content is an essential primitive in Astro, he explained.

“But building content-driven websites with Astro should be easy no matter where your content lives. We already solved this for local Markdown, now what about larger projects where content lives outside of your repo? In a remote API? In your favorite CMS?” Schott wrote. “We are beginning to explore a new, more powerful Content Layer API for Astro. The new Content Layer will build on our existing Content Collections functionality to make working with your content in Astro easier than ever before.”

He outlines the changes they’re making to enable this, including embedding SQLite inside of Astro.

“By embedding SQLite inside of Astro, we could scale up to millions of content entries in a project without breaking a sweat,” he wrote. “Plus, SQLite’s file storage would dramatically speed up both development and build performance by allowing us to cache content across builds.”

To learn more about the Content Layer proposal he encouraged developers to visit the discussion in Astro’s open roadmap repo.

Swift Migrates to GitHub Organization

The cross-platform programming language Swift has a new home at GitHub.

Swift began life as an Apple programming language but can now be used to develop server-side, as well as applications for Linux or Windows. This migration to a dedicated GitHub organization is significant because it “reflects the growth and maturity of the Swift community and highlights Swift’s versatility beyond Apple’s own ecosystem,” wrote Ted Kremenek, a member of the Swift Core Team.

“With a GitHub organization dedicated to Swift, we are creating an even more conducive environment for collaboration and innovation,” Krememek wrote. “This change will allow Swift to expand its reach to more platforms and use cases, sparking fresh possibilities and broadening Swift’s impact across the technology landscape.”

The migration to the swiftlang organization will be in phases over months, he added, explaining that the swiftlang organization will first include foundational elements of the Swift project, such as:

In the future, the Swift team will look at key governance issues, such as methods for integrating new projects into the organization and using GitHub teams to expand the contributor base. For more details of the planned migration, check out Monday’s blog post on the Swift site.

Big TypeScript Update

Theo Browne — aka Theo – t3.gg — is calling this update of TypeScript “the biggest TypeScript update in years.” In particular, Browne was most excited about the new ECMAScript set methods

Daniel Rosenwasser, the principal product manager for TypeScript, has a long list of updates on the blog post about the TypeScript 5.5 release candidate. He discussed what’s new since the beta, including added support for ECMAScript’s new set methods.

“Additionally, we’ve adjusted the behavior of TypeScript’s new regular expression checking to be slightly more lenient, while still erroring on questionable escapes that are only allowed per ECMAScript’s Annex B,” he wrote. “We’ve also added and documented even more performance optimizations: notably, skipped checking in transpileModule and optimizations in how TypeScript filters contextual types. These optimizations can lead to faster build and iteration time in many common scenarios.”

Browne discusses why this is important. He also covers the significance of other updates, including:

Gradle Offers Free Training Courses

Gradle recently launched a free training platform called DPE University that’s designed to help software developers get the most out of leading build tools. Currently courses cover Gradle and Maven build tools, but Gradle plans to expand to more advanced use cases and other build systems such as Bazel and sbt.

Developer Productivity Engineering (DPE) is an emerging software practice that focuses on, as the name suggests, improving developer productivity and developer experience, but from a very specific lens: It sees developer productivity as an engineering issue rather than a people or management problem. Netflix uses it, as does Spotify, LinkedIn and DoorDash.

The on-demand courses include two for training on using cache with Apache Maven, an open source tool that helps manage the build process for software projects. There are also courses on the Gradle Build Tool and Develocity, which was previously called Gradle Enterprise.

Editor’s Note: This story was updated to reflect that DPE University will offer courses covering a wider selection of build tools.

Group Created with Sketch.

 

 

 

 

Top