Document architecture (how it works)
- diagram
Yes please. I’m trying to understand this. If I run a native Windows Flet application, how many processes are there, and how many layers of communication? Is there a Dart-based process communicating with a Python process? Is there a Dart webserver communicating by Websockets to an Electron GUI?
Oh there's some good information in here. https://github.com/flet-dev/flet/blob/main/docs/flet.md
Flet hides that complexity by replacing Flutter's declarative model (re-build a UI tree on app state changes) with an imperative (modify UI tree as program progresses).
Really? That's too bad.
Ok Flutter is an alternative to Webkit. So there is no Webkit involved here. It looks like there is a Flutter Dart process with bindings to the C++ Flutter engine, and then a separate Flet Python process which communicates with Flutter Dart through JSON and sockets? And I guess that the subject of that communication is UI events and VDOM diffs?
I was hoping that Flet has direct Python bindings to the C++ Flutter engine? No?
https://flet.dev/blog/flet-mobile-update/#flet-new-desktop-architecture
https://github.com/flet-dev/flet/blob/main/docs/flet.md
Flet hides that complexity by replacing Flutter's declarative model (re-build a UI tree on app state changes) with an imperative (modify UI tree as program progresses).
Flet hides the simplicity of Flutter’s declarative model by replacing it with complex imperative modifications to the UI tree?
The flutter guys explained it pretty well. For them, having to modify the states by oneself could sometimes be problematic. I find this true in Flet's case.
@FeodorFitsner, you master Flutter and Flet architectures, what can you say on this today please? And also, why do you name it as 'hiding complexity'? And by the way, could it be easy for Flet to switch on to the imperative style ?
The language runtime is also to be taken into consideration:
This approach relies on certain characteristics of a language runtime (in particular, fast object instantiation and deletion). Fortunately, Dart is particularly well suited for this task.
The question is, is python suited too? I think Yes. But we can't really know if we don't give it a try.
@FeodorFitsner any updates here? Can we have detailed "under the hood" docs?
That would help people to use the tool with peace of mind (cause it is pretty uncomfortable to use a tool without good architecture knowledge), and what's more important, that should help people to start actually contributing to the project.
I'm trying to have some fun with it now, and I'm having a hard time understanding how the thing works.