F# Functional App Development, using declarative dynamic UI
Never write a ViewModel class again! Conquer the world with clean dynamic UIs!
This repository contains 4 different libraries:
Package | NuGet |
---|---|
Fabulous | |
Fabulous.CodeGen | |
Fabulous.XamarinForms | |
Fabulous.StaticView.XamarinForms |
This library aims to provide all the core abstractions and tools for writing your own app framework based on the "model view update" programming model and dynamic UI. It is a variation of elmish, an Elm architecture implemented in F#.
This library automates the creation of bindings of existing UI frameworks for Fabulous through a simple JSON file. CodeGen will output an F# code file that you can include in your own project, like Fabulous for Xamarin.Forms.
It can be easily included in a build process, or run via a command line tool.
Learn more about Fabulous.CodeGen
This library allows you to use the ultra-simple Model-View-Update architecture to build applications for iOS, Android, Mac, WPF and more using Xamarin.Forms. It is built on Fabulous.
With Fabulous for Xamarin.Forms, you will be able to write complete applications fully in F#, like this:
type Model = { Text: string }
type Msg = ButtonClicked
let init () = { Text = "Hello Fabulous!" }
let update msg model =
match msg with
| ButtonClicked -> { model with Text = "Thanks for using Fabulous!" }
let view model dispatch =
View.ContentPage(
View.StackLayout(
children=[
View.Image(source = "fabulous.png")
View.Label(text = model.Text, fontSize = 22.)
View.Button(text = "Click me", command = (fun () -> dispatch ButtonClicked))
]
)
)
Learn more about Fabulous for Xamarin.Forms
This library allows you to write Xamarin.Forms apps using XAML and the Model-View-Update architecture.
It is not actively maintained.
If you wish to see more support for Fabulous.StaticView, please consider contributing.
Learn more about Fabulous StaticView
Please contribute to this repository through issue reports, pull requests, code reviews and discussion.
See the contributor guide and the getting started guide to learn more.
This repository is inspired by Elmish.WPF, Elmish.Forms and elmish.