If you haven’t heard of Vike, it’s the new name for the vite-plugin-ssr. Its parent build tool is Vite — but it’s also so much more, according to programmer Elijah Asaolu, who wrote about Vike and Vite for the LogRocket Analytics blog.
“Vike started as a plugin designed to add server-side rendering (SSR) capabilities to Vite, but it has since grown into a more comprehensive framework for building complete web applications,” Asaolu wrote. “Behind the scenes, Vike leverages Vite’s bundling and development server to set up a server that renders your application’s pages on the fly.”
Vike generates the HTML on the server at runtime when a user requests a page, he continued. This makes Vike perfect for creating “applications with dynamic content that changes frequently,” he adds.
Vike Logo via GitHub
Vike can be used as both an SSR framework and as a static-site generator (SSG). A SSG differs from an SSR in that an SSG “will pre-generate the HTML and asset files for your website at build time so that when a user requests a page, the server simply serves these pre-built HTML files,” Asaolu explained.
Vike is designed to be fast and use zero-config. It also integrates easily with tools for data fetching, authentication, server management, CSS frameworks and internationalization, he added.
It supports multiple frameworks, including React, Vue, and Svelte. It also supports the Bun runtime.
Asaolu explains how Vike and Vite can be used to build microfrontends, although he notes that to do so, Vike has to be integrated with a module federation plugin that allows developers to share components and states across different applications. The vite-plugin-federation is one option for achieving this, and he shares how to set that up.
Slint GUI Toolkit Adds New Features, VS Code Project Template
Slint, the native GUI toolkit written in Rust, released version 1.8 this week, with several “much-requested features,” including Property Change Callbacks, improvements to live-preview and a VS Code extension.
Property Change Callbacks can help make an interface more dynamic without requiring a developer to write extra business side logic, the team explained.
“Property bindings are part of how you can achieve a lot with so little code in Slint. Then many elements have callbacks to help manage side effects,” the team wrote. “Take TextEdit and the edited call back to let you react to the changing text the user is being entered. However, you quickly find places where your UI is updating and changing, but unlike TextEdit, there is no callback to use.”
This is where Property Change Callbacks come into play, they added. But there is a warning with its use.
“With great power, comes great responsibility. In most cases try to rely on declarative property bindings, which are more efficient,” they wrote. “So be careful not to introduce unintended performance issues or loops, especially if changes cascade into other properties.”
There’s also a new VS Code project template that can be created by hitting CTRL+shift+P on a PC or CMD+shift+P on Mac, then look for “Slint: Create New Project from Template” as a new option. It will guide you through selecting a template for the language of your choice.
LangChain Version 0.3 Updates Python, JavaScript Ecosystems
LangChain has updated with release v0.3 for both Python and JavaScript ecosystems. LangChain is a framework developers use to build applications with large language models (LLM).
This LangChain blog post shares what’s new for each language.
“This means that if you are using e.g. LangSmith for tracing in a serverless environment, you will need to await the callbacks to ensure they finish before your function ends.” — LangChain Blog
In language changes for Python, all packages have been upgraded from Pydantic 1 to Pydantic 2 internally, and Pedantic 1 will no longer be supported because it reached end-of-life in June. Python 3.8 also will no longer be supported as it reaches end-of-life in October. So both will be the only breaking changes for the Python version.
When it comes to JavaScript, “all LangChain packages now have @langchain/core as a peer dependency instead of a direct dependency to help avoid type errors around core version conflicts,” the post notes. That means developers will now need to install @langchain/core rather than relying on an internally resolved version from other packages, they added.
Also, callbacks are now backgrounded and non-blocking by default rather than blocking.
“This means that if you are using e.g. LangSmith for tracing in a serverless environment, you will need to await the callbacks to ensure they finish before your function ends,” the post noted.
There are also a number of more general improvements added in this upgrade:
Moved more integrations from langchain-community to their own langchain-{name} packages. It’s a non-breaking change that allows the team to better manage the dependencies of the integrations, as well as tests and versioning, test, and version of the integrations.
Revamped integration docs and API reference.
Simplified tool definition and usage.
Added utilities for interacting with chat models: universal model constructor (python, js), utilities to trim, filter and merge messages (python, js), rate limiter (python).
Added the ability to dispatch custom events (python, js).
Under “What’s coming” the team wrote, “We are expecting to improve LangChain’s multimodal capabilities during the 0.3 release, and continue our work on improving documentation and reliability of integrations.”
Astro Updates Starlight Documentation Framework
This week Astro updated Starlight, which is it’s official, all-in-one documentation site builder. It’s used as a documentation website framework built on top of the Astro framework, allowing developers to create accessible and high-performance documentation websites.
Among the updates in version .28 are:
Next-level localization. Starlight has been multilingual from day one but “v0.28 takes this to the next level,” the team wrote. “Starlight’s built-in localization system is now powered by the first-in-class i18next library and available to use anywhere in your site.” It makes it easier to start with a single language and translate the documentation as required.
On-demand rendering support. This allows developers to switch from static generation to Astro’s on-demand rendering mode. “This unlocks features like user authentication and personalization, making Starlight even more flexible,” the post noted.
Tabs that remember you, which supports remembering user preferences across page navigations so readers can choose their preferred package manager or operating system once, and see that preference reflected elsewhere in docs.
Sidebar state persistence. “From v0.26 on, Starlight persists and restores sidebar state across navigations thanks to a lightweight custom element, making for a smoother browsing experience,” the team wrote. “This is a progressive enhancement — if JavaScript isn’t available on a user’s device, the sidebar renders as usual ensuring a robust experience for all.”
Simpler sidebar configuration, which eliminates some of the verbosity of sidebar configuration.
Improved documentation.
TRENDING STORIES
YOUTUBE.COM/THENEWSTACK
Tech moves fast, don't miss an episode. Subscribe to our YouTube channel to stream all our podcasts, interviews, demos, and more.
Loraine Lawson is a veteran technology reporter who has covered technology issues from data integration to security for 25 years. Before joining The New Stack, she served as the editor of the banking technology site Bank Automation News. She has...