Here's my pitch for a better ecosystem: we develop an intermediate standard for fundamental UI building blocks (divs/blocks/layers, images, video, etc.) + a layout engine, sort of like the DOM. Shells (browsers, native platforms like React Native but without the React requirement, etc.) would give JS renderers access to the lowest level painting calls available (ie. "repaint this node") along with programmatic access…
The problem is: the platform owners (Apple and Google) have absolutely no incentive to make this see the day of light. They make money selling apps, and want to bind developers to their platform.
Vue Native
201–208 of 208 posts
Re: Vue Native
#202Earlier quoted context omitted.
You still think it's about Vue Native. It's not. It's about using web stack for desktop applications . This is a "solution worse than the original problem". And the damage is done. This[0] comment by 'm_fayer elsewhere in the thread is quite chilling. Actual native toolkits are rotting, as big companies join the web-for-everything bandwagon. Not only delivering bloated applications with toy-like UIs becomes the norm,…
> And the damage is done. This[0] comment by 'm_fayer elsewhere in the thread is quite chilling. Actual native toolkits are rotting, as big companies join the web-for-everything bandwagon. What's worse is that actual native toolkits are rotting, while at the same time we never managed to produce a single, great native cross platform toolkit -- even less so a great cross platform one. Not because it's impossible, but…
Why can't the web+JS be that platform?
Re: Vue Native
#203Earlier quoted context omitted.
> And the damage is done. This[0] comment by 'm_fayer elsewhere in the thread is quite chilling. Actual native toolkits are rotting, as big companies join the web-for-everything bandwagon. What's worse is that actual native toolkits are rotting, while at the same time we never managed to produce a single, great native cross platform toolkit -- even less so a great cross platform one. Not because it's impossible, but…
>we never managed to produce a single, great native cross platform toolkit Why can't the web+JS be that platform?
But even if we ask the more general question, why "web+js can't be the great cross platform toolkit", the answer IMHO is:
Web+JS are and will always be (due to the nature of the platform) inherently slower than optimal (even if "fast enough" for simple apps), use more memory, use more CPU, don't use the native facilities and so are foreign to every OS look and feel (from themes to usability features), and so on. And of course they're "bring your own theme" affairs, so no standard users can get used to, everybody does their own BS UI in SPAs and web-engine based apps (like Spotify and Atom).
Add the amateur hour development practices that they enable (where a company that would previously hire actual GUI programmers can now hire some web devs and let them loose to create its app) and the picture is not nice...
Re: Vue Native
#204Earlier quoted context omitted.
Your UITableViewDataSource is a common problem with big JS applications, and has been solved to some extent with the same optimizations you've mentioned. However because JS and HTML is what it is, it has to be solved on a per-library basis (React Virtualized List, Vue Virtualized List, etc.) The problem remains that the JS renderer does not have access to those low level draw calls to optimize performance further. As…
AFAIK all virtual lists break native searching in the browser, so sadly the problem is far from solved
Re: Vue Native
#205Here's my pitch for a better ecosystem: we develop an intermediate standard for fundamental UI building blocks (divs/blocks/layers, images, video, etc.) + a layout engine, sort of like the DOM. Shells (browsers, native platforms like React Native but without the React requirement, etc.) would give JS renderers access to the lowest level painting calls available (ie. "repaint this node") along with programmatic access…
Re: Vue Native
#206Earlier quoted context omitted.
This assumes the web rendering context is the proper abstraction to build application UIs. Its not. Its too complex and object-oriented to be efficient. It was intended for documents and is a general pain to work with for applications. For one, there's a lot to be learned from immediate-mode UIs (I'm thinking Dear IMGUI, not Unity3D's GUI); ie state inside components generates complexity, which is a bad thing. Your v…
I'm trying really hard to understand your argument. So you believe such a UI API should be immutable (whatever that means in this context), and modelled as a sequence of actions? I think that's fine, but probably not practical in reality. I don't see the point of having a debate about the merits of functional programming vs. OOP in the middle of your post. People are going to build tools around the API that will abst…
Thats how I've been building UIs for the last few years. `re-frame` in ClojureScript for one is a fantastic framework built on top of these concepts.
> I don't see the point of having a debate about the merits of functional programming vs. OOP in the middle of your post
I made that distinction to highlight the differences between retained-mode UIs versus immediate-mode UIs. There are more similarities to OOP vs FP than differences here.
Think of it this way; the application itself already contains all the state it needs. A retained-mode UI will deep copy that state into the UI components while an immediate-mode UI will make the UI state a function of the application state. There is huge value in doing that because it dramatically simplifies the UI stack, this translates into shorter iteration times, simpler reasoning and less bugs. Its no good thinking about higher level tooling if the fundamental API is overly complex.
> unless you build a system that's easy to understand on that end as well
We shouldn't care about whether something is easy or difficult; we're only going to learn it once after all. We should instead care about whether its simple or complex, because that is a direct function of our ability to reason about things once they are learned. Most things that are easy to learn generate more complexity than simplicity and I believe this is harmful in the long term.
> I don't think it's unreasonable to expect that the low-level rendering engine (ie. an implementation in UIKit) maintains some level of UI state.
You're right, its perfectly reasonable and precisely what React does under the hood. Where I disagree is that I don't want the cached UI state to leak into the components. Just like the current state of the DOM is irrelevant when rendering the virtual DOM. Its purely an optimization mechanism and one which should be allowed to evolve independently from the higher level components.
> Things generally aren't immutable
Then why are so many things moving towards immutability? Modern video game renderers push really hard to be stateless, to be completely decoupled from the game threads, to not leak cached state into entities and a bunch of other FP-inspired concepts.
The end result is incredibly more parallelism. The rendering pipelines are much simpler and performant. There are quite a few advantages to this approach. It also generates optimal memory layouts and accesses, these are simply emerging from such a design. Its much easier to have linear memory accesses if you constantly recreate the display lists in fresh memory. Updating a state tree is much more complex than creating a display list and it greatly cripples the potential optimizations.
> higher level libraries can easily remove the pain of UI state management
That is not the feeling I get when I look at the average React project; most components use getState/setState, need to touch the virtual DOM for almost every operation, are needlessly maintaining two views of the same state (app and UI) and whatnot. Or they go full Functional Components and the result is a huge stack of component layers from hell.
> It seems to me the appropriate abstraction is build the protocol around a UI state tree
I believe this is fundamentally wrong; the appropriate abstraction should be built around the application state. You can derive UI state from that, and doing so liberates you from having to maintain the UI state independently.
Re: Vue Native
#207Earlier quoted context omitted.
Electron for mobile is called Cordova and has been around for a long time.
Cordova is not Electron for mobile. Calling it that is a fundamental misunderstanding of how both work. One depends on the OS to provide its built-in Webview/UIWebview. The other packages an entire damn browser with each app.
browser and web server?
Re: Vue Native
#208Earlier quoted context omitted.
I find it entertaining that you post this a within 24 hours of the linus/tanenbaum rehash. Getting crap done counts for a lot. Web, and hci in general, isnt figured out well at all, so we can spend a few decades pursuing an ideal we don't even have defined...or we can get stuff done. If you are arguing for some specific non-"idiocy", please, explain why your version hasn't taken off.
> I find it entertaining that you post this a within 24 hours of the linus/tanenbaum rehash. Do you have a link about this latest rehash? I tried googling without success