TL;DR
A new library, biff.core, has been released to improve system composition in Clojure web apps. It introduces init functions and a cleaner way to manage modules and lifecycle events. The development aims to streamline project structure and enable dynamic updates without restarts.
Biff has released biff.core, a library designed to simplify system composition in Clojure web applications, marking a key step in a broader effort to modularize and improve Biff’s ecosystem.
The biff.core library introduces a concept of ‘init functions’ that take a var of modules, enabling dynamic updates of system components such as handlers without server restarts. This approach replaces traditional boilerplate code with a cleaner, more flexible structure. The library maintains the existing ‘modules and components’ architecture of Biff 2, but adds mechanisms to handle lifecycle functions and dependencies more explicitly.
According to the developer behind the release, the main goal was to create a first-class way to extract logic into libraries, allowing users to add modules easily without copying boilerplate code into their main namespace. The design leverages var references to facilitate late binding, ensuring that changes to modules automatically reflect in the running system. This approach aims to keep the main namespace simple and reduce the need for manual reconfiguration.
While the library currently emphasizes a straightforward sequence of components, the developer notes that more complex dependency management could be layered on top if needed. The release is part of a broader effort to split Biff into multiple libraries, with this first one serving as a foundational piece.
Implications for Clojure Web Application Development
This development matters because it offers a more flexible and maintainable way to manage system components in Clojure web apps. By enabling dynamic updates and reducing boilerplate, biff.core can streamline development workflows, especially in projects with many stateful resources. It also aligns with best practices for modular design, potentially influencing how Clojure developers structure their applications and handle lifecycle events.

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. This approach has been effective but could be cumbersome as projects grow. The recent release reflects an ongoing effort to break Biff into smaller, more focused libraries, starting with biff.core, to improve flexibility and code clarity. The concept of ‘init functions’ and late binding via vars builds on existing patterns but offers a more elegant solution for managing dynamic updates and reducing manual configuration.
“The goal was to create a first-class way to extract logic into libraries, so users can add modules without copying boilerplate into their main namespace.”
— anonymous developer
“Using var references allows updates to modules to be reflected in the system without a restart, making development more fluid.”
— anonymous developer

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 handles complex dependency graphs or large-scale systems. The extent of its support for advanced lifecycle management and dependency resolution remains to be seen as users adopt it in diverse projects. Additionally, how the library will evolve to support more layered or automated dependency handling is still uncertain.

Practical Module Development for Prestashop 8: Create modern, customizable, and dynamic online stores using efficient modules
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Future Developments and Community Adoption
Next steps include broader testing and feedback from the Clojure community, as well as potential enhancements to support dependency management and lifecycle orchestration. The developer plans to continue splitting Biff into modular libraries, with subsequent releases building on this foundation. Community engagement and real-world use cases will likely shape future features.
Clojure lifecycle management software
As an affiliate, we earn on qualifying purchases.
As an affiliate, we earn on qualifying purchases.
Key Questions
How does biff.core improve over previous system management methods?
Biff.core introduces init functions and late binding via vars, reducing boilerplate and enabling dynamic updates without server restarts, streamlining system management.
Can biff.core handle complex dependency graphs?
It is currently unclear how well it manages complex dependencies; future updates may address this as community feedback grows.
Is biff.core suitable for large-scale projects?
While designed to improve modularity and flexibility, its effectiveness in large projects remains to be tested in real-world scenarios.
Will there be support for automated dependency resolution?
This is not yet confirmed; future features may include more sophisticated dependency management.
How can I get started with biff.core?
The library is available now, and the developer recommends adding modules and components to your project to leverage its features.
Source: Hacker News