Desktop-Mobile: State of the Union
amplifying-fsharp/sessions#21 FundOurselves, Voyonic Systems
Watch this session
Topic
In this session we will discuss the current state of the F# ecosystem for desktop and mobile development focusing on:
- Discuss the current state of Fabulous
/// A simple Counter app
type Model =
{ Count: int }
type Msg =
| Increment
| Decrement
let init () =
{ Count = 0 }
let update msg model =
match msg with
| Increment -> { model with Count = model.Count + 1 }
| Decrement -> { model with Count = model.Count - 1 }
let view model =
VStack(spacing = 16.) {
Button("Increment", Increment)
Button("Decrement", Decrement)
TextBlock($"Count is {model.Count}")
}
#if MOBILE
let app model = SingleViewApplication(view model)
#else
let app model = DesktopApplication(Window(view model))
#endif
-
Fabulous.MauiControls
- Showcase of Fabulous DSL widgets
- Wrapping 3th party libraries
- How to consume Native APIs
-
Fabulous.Avalonia
-
What is next in Fabulous V3 ?
-
Discuss the current state of Avalonia.FuncUI
module Counter =
type CounterState = {
count : int
}
let init = {
count = 0
}
type Msg =
| Increment
| Decrement
let update (msg: Msg) (state: CounterState) : CounterState =
match msg with
| Increment -> { state with count = state.count + 1 }
| Decrement -> { state with count = state.count - 1 }
let view (state: CounterState) (dispatch): IView =
DockPanel.create [
DockPanel.children [
Button.create [
Button.onClick (fun _ -> dispatch Increment)
Button.content "click to increment"
]
Button.create [
Button.onClick (fun _ -> dispatch Decrement)
Button.content "click to decrement"
]
TextBlock.create [
TextBlock.dock Dock.Top
TextBlock.text (sprintf "the count is %i" state.count)
]
]
]
- Showcase FunCUI DSL widgets
- How to use Elmish and component based UI
- What is next in Avalonia.FuncUI ?
Champions
Links
-
Date:
- Session link: https://us06web.zoom.us/j/82516293053?pwd=JHDBSz1xAx1Yb9zaEfLfdKfUd7r5eS.1
- Passcode: 450534