Comment

Comment by Aleman360

Specifically, look into how XAML apps work on the Universal Windows Platform [1]. Windows application development moved past Win32 about ten years ago with the initial version of XAML (Windows Presentation Foundation).

Nowadays, the event loop is still there under the hood, but it's abstracted away by the UI framework. You are left with independent views that can render themselves, but the raw event loop is exposed as higher level events raised by individual views (e.g., a single "Tapped" event instead of having to handle separate mouse/touch/pen/controller down+up events).

Apps often use some sort of message bus for communicating between non-UI components in a decoupled way, which may or may not re-use the UI thread's event loop. In general, you try to minimize what happens on the main loop, since it can lead to UI unresponsiveness. However, in XAML the main event loop is actually a priority queue, so you can put stuff into it at lower priority than regular input events[2].

1. https://msdn.microsoft.com/en-us/library/windows/apps/dn8946...

2. https://msdn.microsoft.com/en-us/library/windows/apps/window...

Disclaimer: I work at Microsoft, where we're using XAML to build the Windows Shell.

parent Aleman360 11 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton