TL;DR

Biff has launched biff.core, a library that simplifies system composition for Clojure web apps. It introduces init functions and first-class module handling, improving modularity and live updates. The release marks a significant step in Biff’s library modularization.

The Biff team has released biff.core, a library designed to enhance system composition and module management in Clojure web applications, aiming to simplify project structure and improve live updates.

The new biff.core library is the first of twelve libraries planned to modularize Biff, a web framework for Clojure. It provides a structured way to combine application modules into a single system map, replacing the previous boilerplate-heavy approach.

Key features include the concept of “init functions,” which take module collections and produce maps to merge into the system. These functions are stored in the :biff.core/init key within module maps, enabling cleaner project setup.

Additionally, biff.core introduces the use of module vars instead of static values, allowing certain system components, like handlers, to update dynamically without server restarts. This approach leverages functions that dereference module vars and memoize their output, ensuring live updates.

The design maintains simplicity by avoiding complex dependency graphs between lifecycle functions, instead relying on ordered sequences of components, which can be layered on top if projects require more advanced lifecycle management.

Implications for Modular Clojure Web Development

This release streamlines the process of building and maintaining Clojure web applications by reducing boilerplate and enabling live updates. It encourages cleaner project organization, making it easier for developers to add or modify modules without extensive changes to the core system. The approach aligns with Biff’s philosophy of simplicity and explicit control, potentially influencing best practices in Clojure web app architecture.

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.

Background on Biff’s Modular Architecture

Biff has long employed a “modules and components” structure, where each application namespace exposes a module map, and boilerplate code combines these into a system map. This setup required manual wiring and was less flexible for live updates.

The previous approach involved explicit boilerplate for extracting routes and handlers, which could be cumbersome and error-prone. The new biff.core library addresses these issues by formalizing module handling and system composition, building on the existing structure with enhancements for modularity and dynamic updates.

“The new biff.core library introduces a clean way to handle system composition, making Clojure web app development more modular and live-updatable.”

— 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 Capabilities

It is not yet clear how well biff.core scales for very large or complex projects, or how it interacts with other lifecycle management systems. The extent of community adoption and feedback is still emerging, and detailed documentation is forthcoming.

Amazon

live update tools for Clojure web apps

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Next Steps for Biff’s Modular Ecosystem

The Biff team plans to release additional libraries that build on biff.core, adding features like dependency resolution between components and more sophisticated lifecycle controls. Community feedback will likely influence further development, and detailed tutorials are expected to help new users adopt the system.

Amazon

modular web framework for Clojure

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

How does biff.core improve module management in Clojure web apps?

Biff.core introduces a standardized way to handle modules via init functions and module vars, simplifying integration and enabling live updates without server restarts.

Can biff.core handle complex lifecycle dependencies between components?

Currently, it emphasizes simplicity by avoiding dependency graphs, but layering additional lifecycle management is possible if needed.

Will biff.core replace existing boilerplate code entirely?

It aims to reduce boilerplate significantly, especially for common tasks like route extraction and handler updates, but some manual wiring may still be necessary for advanced setups.

Is biff.core suitable for large-scale projects?

Its scalability for large projects remains to be tested, and community feedback will clarify its effectiveness at scale.

When will comprehensive documentation and tutorials be available?

The Biff team has indicated that detailed documentation and guides are forthcoming to support adoption.

Source: Hacker News

You May Also Like

Preserving Antique Tech: Steampunk as a History Movement

Steampunk’s dedication to preserving antique tech offers a captivating glimpse into history and craftsmanship, inspiring future innovation—discover how this movement keeps our legacy alive.

Clockwork AI: Imagining Artificial Intelligence in a Steampunk World

Steampunk-inspired Clockwork AI blends Victorian ingenuity with mechanical marvels, igniting curiosity about how gears and pistons redefine artificial intelligence—discover the endless possibilities.

Build vs Buy a Prebuilt AI Workstation

Deciding between building or buying your AI workstation? Discover the real costs, performance, and support differences to make the right choice in 2026.

Cyberpunk Vs Steampunk Tech: Contrasting Retro and Future Tech

Cyberpunk vs. steampunk tech explores contrasting visions of the future and past, revealing how each genre shapes our perceptions of innovation and tradition.