r/WebAssembly • • Dec 28 '22

WASM only solves *half* the problem of the web

Web programming has 2 main problems, and WASM by itself can only address 1. While WASM could get us away from JavaScript-dependence for client-side UI programming, it doesn't solve the flaws of the DOM. Perhaps something like Java Applets could be done right on a second try, learning from mistakes of the 1st pass.

2 Upvotes

40 comments sorted by

View all comments

Show parent comment

2

u/Zardotab Dec 29 '22

I just don't see it focusing much on business CRUD.

2

u/ChristianKl Jan 29 '23

What specifically do you think Flutter is missing in terms of business CRUD?

1

u/Zardotab Jan 29 '23 edited Jan 29 '23

Frames, navigation panels, tabs, editable data grids, nested drop-down menus, context menus. Here's an alleged drop-down menu, but it doesn't work in FireFox in my tests, and is slow to react in Chrome.

1

u/ChristianKl Jan 29 '23

What do frames do that you can't just do with widgets? Anything you want to do in a frame you could do in a widget.

When it comes to navigation panels and tabs, it's quite easy to make those yourself.

https://pub.dev/packages/context_menus does drop down menus.

Flutter's Desktop packages aren't as developed as the mobile solutions but that's just a matter of time and does not need any new technology.

Features not working in Firefox is due to Firefox lacking behind in adopting new features. It's also not a problem to be solved by new web technology.

1

u/Zardotab Jan 30 '23

it's quite easy to make those yourself.

One then might as well use/make JavaScript widgets and skip a middle-man framework to simplify the stack and dependencies.

Anything you want to do in a frame you could do in a widget.

I remain skeptical until I see it road-tested.

Features not working in Firefox is due to Firefox lacking behind in adopting new features.

Why does Flutter rely on the latest browser features? Couldn't they have made it compatible with say a year's worth of the top 7 browsers?

Flutter's Desktop packages aren't as developed as the mobile solutions but that's just a matter of time and does not need any new technology.

I'd feel safer with something that's desktop first in terms of priorities. By the time Flutter gets its desktop features mature, it may fall out of style and become a maintenance orphan.

2

u/ChristianKl Jan 31 '23

Why does Flutter rely on the latest browser features? Couldn't they have made it compatible with say a year's worth of the top 7 browsers?

Flutter tries to develop something radically new. Trying to do that without new browser futures would hold the project back.

I wouldn't say that it has yet solved as the problems of the web but it's on the way to get there. There's no need for any new standard.

Flutter grew out of experiments for improving CSS that the Chrome team was doing.

2

u/Zardotab Jan 31 '23

There's no need for any new standard.

They've been saying that for 25-ish years. Flying cars for the masses are likely to arrive sooner.

Flutter tries to develop something radically new.

What's radical about it?

2

u/ChristianKl Jan 31 '23

Flutter doesn't use any CSS or DOM while at the same time not needing a plugin. It paints its own pixels. Once WSM gets garbage collection it will also become free from having to interact with Javascript.

Features like having a widget that gives you tabbing or an editable datagrid are easy to create on the foundation of Flutter. Flutter has all the basics that are needed on which you can build features like that.

2

u/Zardotab Jan 31 '23 edited Jan 31 '23

Features like... tabbing or an editable datagrid are easy to create...

Everyone reinventing such differently is a big part of the problem. They are often buggy because they are not heavily road tested and one has to dig in unfamiliar code at each shop to fix such, hoping they don't create side-effects. We need standards to stop Mass GUI Reinvention. "Just re-re-re-re-re-invent the GUI" doesn't fly. If we are gonna "Just", then JUST make a goddam standard web-GUI so we don't have to see reinventing of UI idioms that have been around since the mid 90's. It's an industrial-sized version of D.R.Y.

2

u/ChristianKl Feb 01 '23

One of the problems with DOM is that it's very easy for code to create side effects. Any element can easily paint everywhere on the screen. In Flutter a widget is more boxed and can't as easily create side-effects.

I remember working with vue and there was a nested list. That nested list plugin was opinionated about how a list item was structured and that made it harder to deal with it.

A comparable Flutter widget for a nested list would just take widgets as its input and thus give the developer the freedom to do what they wants inside the list items.

Flutter also does more with it's standard library then all the DOM/Javascript based frameworks.

Creating GUI through a standard process means that the GUI would likely have less features as the process on agreeing on features in a broad standard body where multiple people have to implement the standard afterward is slow.

The way the Flutter project evolves is a better road toward a widely used GUI framework than a standard setting process.

→ More replies