webui
webui copied to clipboard
Perhaps the web UI could take inspiration from Blazor
Motivation
To be honest, I have a certain fondness for Blazor. It's a great GUI technology, with a relatively simple and elegant syntax, especially the Razor syntax. It effectively combines HTML with backend languages. The Blazor components and server-side binding features are truly powerful tools for development. However, the downside is that it can only be written in C#.
my view of webgui
I believe that WebUI and Blazor share similar technical concepts in the direction of web GUI development. Both aim to render HTML and corresponding DOM manipulation functions without using JavaScript, by combining backend languages with HTML. Currently, since only JavaScript can control the DOM on the browser side, both WebUI and Blazor use dedicated JavaScript libraries (Blazor.js/WebUI.js) as DOM updaters.
This is undoubtedly a more advanced technology. By the way, wasm is in very fast development: After the MVP, to realize the high-level goals of (1) integrating well with the existing Web platform and (2) supporting languages other than C++, WebAssembly needs to be able to: reference DOM and other Web API objects directly from WebAssembly code; call Web APIs (passing primitives or DOM/GC/Web API objects) directly from WebAssembly without calling through JavaScript. Maybe in that day,we can only use backend language to do perfect webui
In comparison, WebUI has some shortcomings in terms of template engines compared to Razor syntax, data two-way binding, and component reuse design. It would be beneficial to directly learn from Blazor's approach.
Example code
https://dotnet.microsoft.com/en-us/learn/aspnet/blazor-tutorial/try
razor syntax https://learn.microsoft.com/en-us/aspnet/web-pages/overview/getting-started/introducing-razor-syntax-c