question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The current / 1.x version of FuncUI is basically a proof of concept that escalated a bit. I started using it for my projects and a lot of my assumptions on “how to do x” were right, but some were wrong. The main issues that will be addressed with the next version are:

Domain Specific Language for Views

FuncUI 1.x has a pretty readable DSL for defining views in a type checked manner. But there are a few downsides that need to be addressed:

Reflection

Reflection is used everywhere. This has several downsides (Performance, AOT Limitations, …). The vNext will not use reflection AT ALL.

Definition and Naming changes

The DSL currently uses Statically Resolved Type Constraints. This does not scale well (ask for details). The new DSL will use a different and in my opinion overall better approach. Static E extension methods (or other members) that are attached to the control type. This also leads to a better browsable DSL.

TextBox.create [
    TextBox.text state.Name
    TextBox.onTextChanged (fun text -> dispatch ..)
]

Type Safety

Currently there is no way of knowing what control a View will create. This is no problem in most cases, but makes it harder to provide a good API in some cases. For example when a control takes another control of a certain type as an attribute (Popup / Tooltip / …).

v1.x

let btn : View = Views.button [ ... ]

vNext

let btn : IView<Button> = Views.button [ ... ]
let btn : IView = Views.button [ ... ]

Virtual Dom

The current virtual Dom implementation is super primitive. This was good in the beginning but there are some thing that need to change.

New Event Handling

In Avalonia all Properties, RoutedEvents and Events are (with a bit of work) Observable. They will be treated all the same and you will finally be able to subscribe to text changed notifications.

Custom Equality implementations for Avalonia Types

This is needed because for example the Grid Control throws an error if the ColumnDefinitions are set more than one time and ColumnDefinitons don’t implement value equality.

This will also bring some performance improvements because currently bitmaps are also created on each state change.

Configurable

It will also be possible to configure the LazyViewCache and stuff like that.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (10 by maintainers)

github_iconTop GitHub Comments

4reactions
JaggerJocommented, Nov 7, 2019

added one more example project.

game_of_life

4reactions
JaggerJocommented, Oct 20, 2019

Data Templates are done!

Code Example

DataTemplateView<Product>.create (fun data ->
    TextBlock.create [
        TextBlock.text data.Name
    ]
)

2019-10-20 14-29-39 2019-10-20 14_31_25

Read more comments on GitHub >

github_iconTop Results From Across the Web

vNext 0.2.0 · Issue #18 · fsprojects/Avalonia.FuncUI
The vNext will not use reflection AT ALL. Definition and Naming changes. The DSL currently uses Statically Resolved Type Constraints. This does ...
Read more >
Matrix.vNext 2.0.0
vNext 2.0.0 .NET Standard 1.3 .NET Framework 4.5.1. There is a newer version of this package available ...
Read more >
Releases · microsoft/napajs
In Napa.js vNext, napa worker loads and initializes its javascript VM in node.js style, which enables most of node.js APIs ... Napa.js 0.2.0...
Read more >
Kayisoft.DicomStoring.EntityFrameworkCore 0.2.0
EntityFrameworkCore 0.2.0 .NET Standard 2.1. There is a newer version of this package available. See the version list below for details.
Read more >
vue-slicksort vnext ❘ Bundlephobia
Find the size of javascript package vue-slicksort vnext. Bundlephobia helps you find the performance impact of npm packages.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found