Bolero 0.9 released

Loic Denuziere

Loic Denuziere

Sep 24, 2019

Reading time:

2 mins

Share via:

We are happy to announce the release of Bolero version 0.9. Bolero is a library that enables writing full-stack applications in F#, whose client side runs in WebAssembly using Blazor.

This release requires the .NET Core SDK version 3.0.100, which you can download here for Windows, OSX or Linux.

Install the latest project template with:

dotnet new -i Bolero.Templates

If you have an existing Bolero project, you can check the upgrade guide to learn how to update your project for Bolero 0.9.

Page models

The new feature introduced in this release is page models.

A common need for rich applications is to have, in addition to the application's global model, a model that is specific to each page. For example, the login page has the username and password that are being entered as model. A page dedicated to displaying and manipulating a list of items has that list of items as model.

In Bolero, pages are represented as F# unions, with one case per page. With page models, the page's model can now be included as an argument to this union.

type LoginModel = { username: string; password: string }

type Page =
    | [<EndPoint "/">] Home
    | [<EndPoint "/login">] Login of PageModel<LoginModel>

This type is known by the routing system so that URLs are parsed and generated appropriately; you simply have to define what the default model is when first switching to a page:

let defaultModel = function
    | Home -> ()
    | Login model -> Router.definePageModel model { username = ""; password = "" }

Learn more about page models in the documentation.

.NET Core 3.0

Bolero 0.9 coincides with the first release of .NET Core 3.0 RTM.

However, Blazor is still in preview and slated for release in May next year. Therefore, Bolero 0.9 still bears the tag "preview9".

To enable debugging Bolero in server-side applications, we have added .pdb files to the NuGet packages, pointing to GitHub using SourceLink.

Happy coding!

Read more from

Can’t find what you were looking for? Drop us a line.

Loic Denuziere
Found a typo?

This blog post is hosted on GitHub here. Feel free to file a ticket or send a PR.

Newsletter

We will not spam you or give your details to anyone.