After working with Vue/React, doing GUI apps "the old way" feels like writing quick-sort in assembly language.
After working with Vue/React, doing GUI apps "the old way" feels like writing quick-sort in assembly language.
You will notice that it is surprisingly simpler than React.
React got so popular because React implemented it very nicely in the web browsers, not because it brought new concepts.
When using C++, looks like you have to use things like QAbstractListModel https://qmlbook.github.io/ch16-qtcpp/qtcpp.html#a-simple-mod...
Even without C++, there are things like ListModel and ListElement https://qmlbook.github.io/ch07-modelview/modelview.html
This is a far cry from React where you just use language-native data structures directly (you only need to do mutations in specific ways).
As far as I can tell, you also can't just use native language constructs like functions/ifs/.map, etc. to compose the UI elements. Instead you have containers like Repeater.
It seems very different to me compared to React, like built around a significantly different philosophy.
Even defining what a "native" type is seems like it would be fraught. I guess the c++ way would be to accept begin and end iterators - but of what type?
When I imagine how a C++ implementation of something like React would look, my first thought is a bunch of functions which take whatever custom types they need (props), and return a tree of UI primitives (analogous to DOM element representations). Nothing that would require inspecting types.
Think about it. How do you iterate the tree? What even is a tree? The typical c++ answer depends on templates and iterators within the template. Which means they wildly change at compile time. It is clumsy for a shared library to deal with this, or, say, bind properties from an XML file or similar parsed at runtime.
Hence, it would make sense for a c++ solution to impose its own format or base class for trees or models. (Perhaps a template could help to wrap it.)
There may be some limitations and some things may need to be done differently because of C++, but from a brief look it should be basically possible. The UI library doesn't need to iterate through props, those can be a single opaque structure from its point of view.
I tried doing something similar in Kotlin a few years back and from what I remember there wasn't any reflection used for that part. https://github.com/peterholak/mogul
I'm also still not convinced that Kotlin/Native will catch on in any significant way, but we'll see.
WPF still has the same kind of approach and to be terribly honest, Silverlight, as hated as it was, did it before React.
It adds single 5mb DLL to the equation.
Yet it allows to build native applications where UI structure is defined by HTML, style by CSS and reactivity by script or by Rust (or by C++, Go, Python, etc.)
"Sciter makes GUI programming genuinely fun!" https://sciter.com/forums/topic/attach-detach-behavior/#post...
However it has one major issue : it's proprietary... And that's a no go for many project / companies.
I would not make my entire business depend on a blob which I have no control on it.
You can buy Sciter License.
This way you a) will solve the problem and b) will help further Sciter development.
Otherwise you don't really need Sciter sources.
You protect your business, That's your choice. But it will make me stay with Qt until better OSS alternative.
As of HTML: most of HTML5 constructs (I participated in HTML5 spec development at W3C as Invited Expert)
As of CSS: CSS2.1 in full. Some practically useful modules of CSS3 - transitions, transforms, etc.
I haven't added FlexBox as I think it is an architectural disaster - will not survive on the long run. Instead Sciter offers "flow and flex units" module: https://sciter.com/docs/flex-flow/flex-layout.htm that covers as FlexBox as Grid in unified manner. Yet check this: https://terrainformatica.com/w3/flex-layout/flex-vs-flexbox....
Yet, I've added quite a lot of HTML/CSS features that are the must for specifically desktop UI:
- <menu class=popup> and <popup> elements and their CSS support - windowed DOM elements that are rendered outside of main window canvas.
- <frame type=pager> - print preview and print feature.
- view.dialog("some.html"), view.window("some.html"), view.msgbox("some.html") - HTML defined windows and dialogs.
- <htmlarea> - native WYSIWYG HTML editing widget.
More on this: https://sciter.com/developers/for-web-programmers/
I only very rarely do CSS, but from a user perspective it's a huge improvement to what we had before.
Are you talking about implementation complexity?
2. FlexBox introduces 12 (sic!) new properties in already overcrowded CSS property map. But as demonstrated by Sciter that can be achieved by just one property `flow` and flex units.
3. Flexbox and Grid are conflicting in the sense that the flexibility (as a feature) is defined in two different ways: separate properties (FlexBox) and 'fr' units (Grid) - overall CSS architecture becomes a zoo. Yet CSS has that famous 'auto' value that in some cases is just 1fr ( 1* in Sciter terms).
4. FlexBox is applied through 'display' property that is conceptually wrong. 'display' specifies how the element itself is replaced among its siblings but flexbox is rather about layout of element's children. These two entities are orthogonal. Example:
display:list-item; or display:table-cell; cannot be flexboxes. Just because of architectural specification error but physically nothing prevents <td> to use flexbox layout for their children.
5. Flexbox arrived too late. We started talking about the feature 12 years ago on www-style WG at W3C. And all these years Sciter already used flexibility (the must for desktop UI).
More on this: https://terrainformatica.com/2018/12/11/10-years-of-flexboxi...
Don't get me wrong, it's _miles_ better for web layout than the old systems, but since Sciter seems to be focused on application-style layouts, it makes sense to prefer a layout system that can better represent common patterns in that domain.
Also, if you plan on go responsive, the required flex wrappers kind of hold you back when you need to reorient a bunch of your layout to fit a vertical screen (or horizontal, if you're doing mobile-first), while Grid's `grid-area` is beautifully flexible in that regard.
TL;DR: If you're gonna have to have Grid, then just having Grid is perfectly fine as it can do everything Flex can and more.
McAfee - not.
But these AV and security providers - yes:
- ESET (NOD32 Antivirus)
- AVAST Antivirus
- AVG Antivirus
- Bitdefender Antivirus
- Comodo Antivirus
- Dr.WEB Antivirus
- WEBROOT Security Antivirus
- 360 ( 360.cn ) Antivirus
- Secui antivirus
So Sciter's code works on any PC that has any of these installed.
[0]https://github.com/revery-ui/revery [1]https://github.com/cljfx/cljfx
https://github.com/fn-fx/fn-fx
Fn-fx is a more complex beast and no one seems to really know how it all works internally except the creator who isn't maintaining it.. so unfortunately it's in a semi unmaintained state. But the interface was a bit cleaner when I tried it
CSS had to get WPF grid design in order to not be a poor table sibling in what concerns layouts.
While WPF is backed by DirectX, CSS requires playing with Z order, so that some browsers might eventually put the rendering into the GPU, but one needs to take care because space is limited.
While I can render anything down to pixel level control, if I wish to do so, I am still waiting for Houdini and worlets to actually become available.
And the whole template language with events and theming for low level customisation of control behaviours? Nowhere to be seen.
CSS layout was indeed a struggle many years ago, but now with flexbox I never failed to put stuff exactly where I wanted, and I barely understand it. And the new shiny thing, CSS Grid, is supposedly even better at controlling layout.
With the same source code, my applications are natively compiled to:
Linux, Windows, MacOS, Android, iOS, QNX, Browser (WebAssembly / WebGL Streaming)
And you are free to theme it as you like, one example:
Any framework that comes with tooling support out of box is a plus for me.
Hence in what concerns Web, I care mostly about WebComponents, CMS middleware with page designers and SPA frameworks like Angular.
CRUD apps is a really big application space to cede, though, I totally think tooling is worth it.
- Write the WPF view code in any .NET language and expose the classes to COM as COM Callable Wrapper (https://docs.microsoft.com/en-us/dotnet/framework/interop/co...)
- Similar way, but using Windows HWND messages instead, https://docs.microsoft.com/en-us/dotnet/framework/wpf/advanc...
- Or if using Windows 10, given that UWP is COM vNext, and Microsoft is merging both worlds, use XAML Islands, https://docs.microsoft.com/en-us/windows/apps/desktop/modern...
I wrote my first GTK+ program in my high school years in 2014-2015, and I can't think of any native toolkit ever approached the ease of work of GTK.
Which other native UI toolkits do you have experience with to make that claim?
Here's very simple to implement change which saves dozens of MB of IO bandwidth every startup: https://github.com/Microsoft/vscode/issues/61343
"We will very likely not do this."