-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fabulous 3 #1034
Comments
Did you do any research into drawing options? I know Avalonia comes to mind first, but I tried to explore the code, and it seems extracting rendering layer won't be easy (if possible). |
Not yet. |
I would not go that route (custom widgets that only utilise the render/drawing layer). Speed is important, but only to a certain point (IMHO). FuncUI is not really optimised for performance. When implementing it I often chose the simplest implementation not thinking about speed too much. There are rarely issue regarding speed in FuncUI. If you hit a case where FuncUI is the bottleneck there are escape hatches. You can for example obtain a reference to an underlaying control in a component or you can write an Avalonia control, do custom drawing, .. |
(and I think FuncUI could be a lot faster if we'd optimise more of the internals) |
Performance is a lot more important in Fabulous because we target mobile devices. Most phones on the market have low specs compared to equivalently-priced desktop devices. Fabulous 1 was like FuncUI and only provided simple implementations, but slowness was a big issue. Navigating from one page to another could take 1-2 seconds on Android... In Fabulous 2, we optimized a lot for memory management by aggressively using structs and streaming the view diffing process to allocate as less as possible. We can still see some performance bottlenecks in v2 on Android in some more advanced cases. |
If you want to support mobile devices. The optimisations are a must . Fabulous v1 was pretty much unusable on Android |
Definitely see that point. Would guess that cheap android phones are the main problem.
1-2 Seconds are crazy. Wonder how things can even be that slow. Guess fabulous diffs the complete view tree on every update? |
Yes, we do diff the whole tree on every update. Diffing was fairly quick even in v1, ~100ms at most, but the rendering performance were awful. |
Do we have any plan for hot-reload? |
No plans for hot reload for the moment. Hot reload is a must-have tool, but it's also super hard to make one that would work even just for basic use cases. The closest we had to Hot Reload was LiveUpdate in v1. An interesting podcast on the subject: https://www.mergeconflict.fm/278 |
I think the idea of branding Fabulous with its own identity vs pushing the "F# for XF/MAUI/Avalonia" is brilliant. F# really needs killer frameworks to sell it -- not the other way around. Ask any F# dev "what would you say F# is good for" and we will usually reply with "everything!" While that may be true, the rest of the world just needs one killer library to act as the gateway. So, I really like the idea of "Declarative UI framework for .NET". If that ever became trendy, even the C# devs might jump on board (not that I really care what they do, but just saying). |
I would add to that list that most of the documentation seems outdated or lacking, making the dev experience for a new-comer like myself really frustrating. I learned quickly to ignore the current documentation and used the github search to piece together how to use version 2 - for lack of useful examples in the doco. Background: I'm trying out Fabulous Avalonia ATM to give https://github.com/h0lg/SubTubular a UI after being fed up with the still bug-ridden MAUI, where I spent what felt like 80% of the development time working around known issues. My main goal was to scope out solutions for replacing a much bigger WPF project at work. With the current dev experience (due to poor doco) though I cannot ask my team to get excited about Fabulous. Right now Fabulous seems to be a framework with great potential "for those in the know". |
There's not a great deal of activity on Fabulous at the moment - is the project still active? |
Introduction
2022 saw the release of Fabulous 2, a massive upgrade over Fabulous 1.
We have revised the whole architecture to bring users a much better declarative UI DSL inspired by SwiftUI, as well as a big focus on performance and reduced memory footprint. We also opened Fabulous to allow targeting Xamarin.Forms, .NET MAUI, and Avalonia.
Overall, Fabulous 2 has been a great success.
In the continuation of this release, we think it is now time to take Fabulous even further and discuss what its successor will be.
This post will detail the goals we believe Fabulous 3 should achieve in 2023.
Active discussion is happening on our Discord server on the
#v3-design-discussions
channel, we encourage you to join the debate to help shape the future of Fabulous.Goals
Today, Fabulous mostly appeals to F# and .NET devs by branding itself as "F# for Xamarin.Forms", "F# for .NET MAUI", etc.
But the potential target audience is quite small:
All this combined gives us a hard time for the adoption of Fabulous.
Despite that, we believe Fabulous could be seen as a valid option in the declarative app dev space among Flutter, SwiftUI, Jetpack Compose, React native, and others.
No declarative UI framework really compete in the .NET space with Google and Apple frameworks, despite declarative UI being very trendy for the past few years.
To be able to achieve this, we need to give Fabulous its own independent identity.
This can be done by:
Doing so should appeal to a broader audience that is not necessarily from the .NET community.
We would also avoid strong feelings on programming languages and years of frustration with particular frameworks.
From the beginning, we were simply trying to expose XAML UI frameworks capabilities in a declarative syntax.
This works for the most part, but we found many instances where porting a XAML concept into declarative UI is hard or plain impossible.
In Fabulous 3, we wish to provide a proper, full-blown, declarative dev experience by implementing our own concepts rather than trying to map whatever XAML is doing.
To avoid reinventing the wheel, we need to follow in the steps of state of the art declarative UI frameworks like Flutter and others.
This would include rolling our own implementation for:
We believe Fabulous 3 should focus on drawn UIs rather than native controls.
This would reduce the number of issues related to UI inconsistencies between platforms.
We are still debating how to achieve this.
Finally, we want to provide the best experience possible by improving the performance of apps built with Fabulous even further.
There is a couple ways to achieve this, but the most efficient way would be to reduce the number of layers, because each layer comes with its own bugs and performance hits.
Today, we have the following layers:
// cc @edgarfgp @twop @JaggerJo
The text was updated successfully, but these errors were encountered: