Hacker News new | ask | show | jobs
by _bxg1 2703 days ago
I've theorized for a while about what it would look like to try and build a generic, app-focused layout engine on Canvas. The DOM gives you lots of things for free and has a long history of backward-compatibility, but both of those things come with huge costs in terms of performance and (to a degree) complexity. The fact that the DOM a) is stateful and b) was originally designed for documents, not apps, causes lots of challenges when what you want to build are apps. The entire reason React exists is to try and force the stateful DOM back into a functional paradigm.

I'd be very curious to learn how generic this project's layout system is.

2 comments

What you describe is similar to what the flutter developers are trying to achieve with their web port 'Hummingbird'. Flutter is currently almost entirely aimed at mobile apps, but it would be wonderful to be able to share UI code between apps and web frontend, with a consistent layout model.

This post is a good read: https://medium.com/flutter-io/hummingbird-building-flutter-f...

I made one a while back for fun. https://github.com/fictorial/canvas_ui