Christopher Bremer, “Let’s try Bolero, an F# web framework built on Blazor and Elmish”
ฝัง
- เผยแพร่เมื่อ 4 ก.พ. 2025
- When my team decided it was time to migrate one of our web apps away from AngularJS [^1], Blazor seemed like a good fit. Javascript isn’t really one of our core competencies, but we needed a more robust client than, say, HTMX. One of the devs suggested we look into Bolero. We prefer F# for our technical applications, and we were already familiar with some of the design principles espoused by the authors. Four months later, we are in production and quite pleased with the results!
Bolero is a library that brings functional Model-View-Update[^3] to the Blazor ecosystem. In short, the MVU architecture attempts to decrease the complexity of modern asynchronous web apps. The application state (the “model”) is stored immutably. Updates to the model are queued in a global message buffer, and all data flows in a single direction.
In this talk, I’ll walk through a sample Bolero application[^4]. I’ll cover ways to avoid standard MVU pitfalls and show how to implement some nice UX features (debounce, polling, time travel(?!)). I’ll show you how the discipline of MVU combined with the flexibility of F# (and the .NET ecosystem) simplifies UI development for a non front-end dev like me!
[^1]: That’s AngularJS 1.18, the original[^2], not Angular 16.9
[^2]: yes, in 2023.
[^3]: AKA the Elm architecture. There are other MVU architectures (Maui, SwiftUI, Redux) that take slightly different approaches.
[^4]: clbrem/bolero-agents
Biography: Chris is the software simulation manager at NOV ReedHycalog in Conroe, TX, where he manages a team of engineers and data scientists. His group supports the drill bit design team by providing on demand wellbore simulation and analysis. Prior to working in software, Chris was a research mathematician studying algebraic geometry and representation theory at University of Chicago and Louisiana State University.
Sounds like the mic is about 15 feet away from the speaker.
aaaand this is why F Hash isn't popular 😂