← Back to context

Comment by 1718627440

9 hours ago

> make development easy enough that native applications are just as fast to build than web apps

I don't think that was ever not the case. The popular UI toolkits include a WYSIWYG editor where you can pick widgets and just put them where you want them with the mouse. Sure, that might not be what developers like to use, but invoking a widget constructor is not that hard and gets you a lot more functionality out of the box, that you would need to implement in JS.

Cross-platform GUIs is also more of a problem of theory. It used to be a big thing, because the GUIs don't look native to the platform, but that concern has gone out of the window with websites now. Win32 programs run with WINE, which I guess is not desirable for deploying to ordinary users, but I guess the people who write for Win32 generally do not care much about porting their programs outside of MS Windows. GTK+ and Qt both run on MS Windows. TCL/Tk comes built-in with Python and looks native on MS Windows.

Encoding algorithms is not that much different across C-like (Algol-derived) languages. Registering callbacks also looks kind of the same. I guess what makes a real difference is the ubiquity of async in JS, where you would use threads more in native applications.

I think what is an actual difference is the mindset around styling and layout. This is something that you actually need to adapt. CSS is more declarative, much like writing constraints for sizes, because you just write a formula about e.g. size in relation to other sizes. On native toolkits you would need to implement this stuff imperatively, I guess this looks like a real downgrade coming from the web, but it is really just a different mindset. Also when you run on the actual machine you have actual access to the device/viewport characteristics and can adapt based on that, and don't need to write an abstract layout. The other side of the coin is that the default widget packaging mechanism has been grid based while CSS only gained that later.

What I guess is also easier in JS, is just drawing on a canvas. The native UI toolkits want to nudge you into implementing a custom widget which implements all the required functionality of widgets. That results in a way better interface for the user, but when you just want a raster graphic you can click on, it can feel like a huge waste of time.

Since now native toolkits also support CSS, have JS bindings and Webpage targets, a guess the difference blurs.