Biff.core: system composition for Clojure web apps

TL;DR

Biff has launched biff.core, a library designed to simplify system composition in Clojure web applications. It introduces init functions and handles late binding for dynamic updates without server restarts. The release aims to improve modularity and maintainability.

Biff has released biff.core, a new Clojure library that provides system composition and interface management for Biff web projects, aiming to streamline module integration and lifecycle handling.

The new biff.core library is the first of twelve libraries planned by the Biff team, focusing on simplifying how modules and components are combined into a single system map. It introduces a concept of ‘init functions’ that take module collections and produce a merged system map, facilitating easier setup and updates.

One key feature is support for late binding of handlers and other components. By storing references as vars and functions that dereference these vars, the system can update handlers dynamically without requiring server restarts. This approach addresses common pain points in managing stateful web resources.

The library’s design emphasizes minimal boilerplate and clear separation of concerns, allowing developers to add modules and components with ease. It also avoids complex dependency graphs for lifecycle functions, favoring straightforward sequences of functions to manage startup and shutdown procedures.

Implications for Modular Clojure Web Development

This release is significant because it offers a more modular, maintainable approach to building Clojure web applications. By abstracting system composition into a dedicated library, developers can focus on writing domain logic rather than boilerplate code. The support for late binding enhances development speed and flexibility, especially in dynamic or iterative environments.

It also signals Biff’s ongoing effort to improve the architecture of web projects, making it easier to scale and manage complex systems with many stateful resources. The approach could influence best practices within the Clojure community for system design and lifecycle management.

Web Development with Clojure: Build Large, Maintainable Web Applications Interactively

Web Development with Clojure: Build Large, Maintainable Web Applications Interactively

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Evolution of Biff’s Modular Architecture

Biff has historically used a ‘modules and components’ structure, where each namespace exposes a module map, and boilerplate code combines these into a system map. Previous versions relied on manual wiring and restart cycles for updates.

The new biff.core library builds on this foundation by formalizing the process with init functions and vars, enabling more dynamic updates. The development reflects a broader trend in Clojure projects toward modular, composable architectures that promote code reuse and flexibility.

“The biff.core library introduces a clean way to manage system composition with minimal boilerplate and supports dynamic updates, which is a step forward for Clojure web apps.”

— an anonymous researcher

Fundamentals of Musical Composition

Fundamentals of Musical Composition

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Remaining Questions About biff.core’s Adoption

It is not yet clear how widely adopted biff.core will become within the Clojure community or how it will integrate with existing projects. The long-term impact on project architecture and developer workflows remains to be seen, as feedback from early users is still emerging.

Amazon

dynamic handler update tools for web apps

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps for Biff and Community Feedback

The Biff team plans to release additional libraries that build on biff.core, further enhancing system management capabilities. Community feedback and early adoption results will likely influence future development and refinement of the library. Developers interested in modular Clojure web architecture are encouraged to experiment with biff.core and provide input.

Mastering TypeScript: Build enterprise-ready, modular web applications using TypeScript 4 and modern frameworks, 4th Edition

Mastering TypeScript: Build enterprise-ready, modular web applications using TypeScript 4 and modern frameworks, 4th Edition

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

How does biff.core improve system composition in Clojure web apps?

Biff.core introduces init functions and supports late binding via vars and functions, simplifying module integration and enabling dynamic updates without server restarts.

Can biff.core replace existing wiring approaches in Biff projects?

Yes, it provides a more streamlined, declarative way to assemble system maps, reducing boilerplate and manual wiring, while supporting dynamic updates.

Will biff.core support complex dependency management between components?

No, the current design favors straightforward sequences of functions for lifecycle management, but layering dependency logic on top remains possible.

Is biff.core compatible with existing Biff projects?

Yes, it is designed to integrate smoothly with current Biff architectures, focusing on modularity and maintainability.

What are the plans for future Biff libraries?

The team plans to release additional libraries to expand system management features, building on the foundation established by biff.core.

Source: Hacker News

You May Also Like

Mac vs GPU Tower for Local LLMs: The Heat-and-Noise Tradeoff

Thorsten Meyer AI compares Apple Silicon Macs and GPU towers for local LLMs, focusing on speed, memory, heat and noise.

The “Update Habit” That Prevents Most Tech Problems

Keeping your devices updated regularly can prevent most tech problems; discover the simple habit that keeps your system running smoothly.

WWDC 2026: Apple is Folding

Apple announced a foldable iPhone, the iPhone Ultra, at WWDC 2026, signaling a major hardware shift and new developer guidelines for adaptable apps.

Google Declaring War on the Web

Google shifts its search strategy towards AI-generated responses, reducing links and potentially dominating information access, raising concerns about web freedom.