Hacker News new | past | comments | ask | show | jobs | submit | yagodragon's comments login

Going through the same migration from nuxt 2 to nuxt 3. Can you share more details? Did you also move from vuex to pinia ? If so, how did you manage the API change (dispatch, commit) scattered through the codebase. I'd love to learn more


We had a homegrown store lib that was very similar to pinia, so migration was basically minor renaming.

Like others have mentioned, the biggest fear was other libs we used. We are quite conservative with that though, so want a big deal.


I'm also exploring xstate for a similar use case and would love to know more about your experience with it. I'm particularly interested in understanding the level of customizability you allowed in your implementation.

My use case involves implementing various user flows in my app and I'm currently weighing the benefits of using xstate versus react-router.

Also, I'm curious about how you integrated graphql into this project. Could you share some details on that?

Lastly, I wanted to ask if you stored all the different configurations on a database or on git? If you used a database, how did you manage different schema versions?


Direct from the mouth of the other half of the team:

We used Xstate over react-router by using a parallel machine:

- One for application state - One for view state

We had to hack the innards of the events a bit to get the two machines to communicate. This allowed the view to re-render the jsonschema form at the exact right time, and not flicker on multiple state transitions.

In hindsight, graphql wasn’t as necessary as we initially thought. The important part was storing the mutation as a string as an xstate transition parameter. We used federation, so it did help us deal with multiple backends.

All database. Versions were handled by having a core machine that pulled the kiosk’s workflow from the server and ran it as a submachine. So the code on the device (core machine) could switch sub machine workflows on the fly between runs.


As a developer, I legit feel crippling anxiety and might need professional help.

People saying it's not intelligent, really don't get it. It looks like it's working exactly like the human brain. We, humans, also pretend to know what we're talking about and often talk with authority without really understanding what's going on. When you apply for a react.js position you pretend to be a js God when in fact you know shit, just enough to be able to stitch things together to make them work.

The rate at which technology, languages and frameworks change also doesn't give you the ability to master your craft. In fact, mastering a specific tool/framework is risky for your career because of new tools emerging every 3-5 years. Every company uses a variation of react,vue,python,go,java,ruby whatever, it's impossible for the human brain to keep up and be good at everything. We can only scratch the surface of the complicated mess of a tech stack and that's exactly what gpt3 is extremely good at right now. So yeah, I fear a lot...

I can't imagine how good this is gonna be in 5-10 years. I legit feel scared and anxious. How can we prepare for this future?


Let the dust settle before you start predicting the end of your career


Have you tried chatting to it? I think it would ease your anxiety. It is impressive, but you'll see what it's definitely not when you actually sit down and quiz it. Still impressed though.


I'm in a similar situation. I have 1,5 year of experience working in a web dev full-stack job, but the FOMO is so strong with all the advancements in AI. I fear my skills won't be future-proof and eventually AI is going to take my job. These thoughts are taking a toll on my mental health and as a result, I can't focus on improving my skills because of the constant fear of me losing the hype train / making the wrong career decision.

Is this fear justified? How should I proceed? Is software development dead? So many questions and uncertainties...


One thing you have to consider is how context plays a very important role in your job. AI does not have the context of your job/codebase and therefore can only do very small tasks that have probably already been done before (e.g. "Write a function that reverses a string" - which can be found in a few seconds by Googling).

You have nothing to worry about until we're able to feed entire codebases into an AI and have them generate features or fix bugs, and even then, having the context of what the task is on a human level requires even more advanced computing. We're just not there yet.


* if I were college age I'd definitely try to get as much exposure to AI-related courses as I can

* in our line of business nothing is future-proof, in 10 years your resume will retain at most 20% of the buzzwords you put on it now

* In the last 15 years backend development has lost its shine (interesting problems moved to DE/MLE or got replaced with cloud services). You stand a better chance with frontend development and native mobile Swift/Kotlin stuff is probably a natural extension

* it was said 20 years ago that software development was not a promising career and the developers would be replaced by this or that (e.g. RAD/no-code, AI, automation, outsourcing); IMO jobs moving to cheaper locations is actually the highest risk with FWH normalized at scale for the first time in history


If AI will be able to do your SWE job I can't really see why it wouldn't be able to do basic to mid-level AI work. So in that case lots of data scientists will lose their job as well...with perhaps a tiny tiny minority of freak geniuses still developing and experimenting with better AI techniques. I see where you're coming form but don't make huge changes based just on fear. You'll keep being afraid even if you move to AI...it's in our DNA to be worried all the time.


1. watch out for your mental health 2. learn about time management 3. give yourself time to learn new things and experiment with them, it should be joyful experience


I'll be honest, ChatGPT gave me a ton of FOMO. Suddenly it felt like I was irrelevant and useless.


I'd say Dart[0] fits the description.

[0]https://dart.dev/


Yes it does[1] and it works on Desktop, mobile and web.

JavaFX has SceneBuilder[2] which also fit the description but for some reason, it never caught on. Gluon seems to have that work not only on desktop, but also on mobile.

[1] https://docs.flutter.dev/development/tools/devtools/overview

[2] https://gluonhq.com/products/scene-builder/


Can you confirm that Dart desktop apps are actually desktop apps and not Electron apps or similar?


Of course... it's a very different tech. Flutter's graphics are based on Skia[1], same as used in Android and Chrome. Dart compiles to actual executable binaries, so it's not at all like Electron.

[1] https://skia.org/


That's just for web apps.


Flutter can be used for both mobile and desktop apps, although mobile is definitely the primary focus. In my view, Flutter basically equals Dart. I don't know what else people use Dart for.


I use Dart for custom cli tools and recently deployed small service that feeds data to my backend service. It's simple and nice to write, no learning curve to speak of.


I don't know Ruby on Rails but i would love to learn it at some point. At my job we're creating some internal tools that are 95% CRUD and we're using JavaScript for everything. Vue.js/Nuxt.js/Vuex with express.js(on docker) and a shitty "headless" CMS (strapi) with MongoDB for backend. It sucks. We're writing hundreds of LOC every day just to create some simple forms. Our tech stack is so fragmented that makes it difficult to make changes and cooperate in our team. A simple thing like a <select> or <datalist> html element is re-implemented in a vue.js UI library and across 3 different files in Vuex. On the backend the story is even worse. Strapi is very limiting and it's not designed to be extended with custom business logic so we have to rely on custom solutions from scratch. Rails appears to be the best solution to our problems but our CTO only likes Javascript i guess...


I feel your pain (literally since I am currently in the same boat with). Yes Rails would be a perfect solution for the CRUD work you have. Hell Django probably would be a good solution too.

Unfortunately it was “clear” 8 years ago that JavaScript is the “future” and I think at latest 5 years ago everybody got the memo.

Right now I think it is “clear” that the “future” we build with JavaScript has gone horribly wrong and I see some of us reevaluating the tech stacks we came from (Ruby on Rails, Django…) and some doubling down on JavaScript with SSR (server side rendering) and static pages in JavaScript Frameworks.

I’m afraid “the ride” will continue for a while.


What might surprise him/her even more is that PHP is actually better than js/react at anything web related. Symfony and Laravel are amazing frameworks. You get frontend scaffolding and admin generation,fast templating languages, authentication, authorization, databases, great tooling. On top of that PHP 8.0 improved the type system and these frameworks are quickly adapting to use types everywhere.

When it comes to web applications tho, Django is not as pollished as Laravel/Symfony. There is no webpack integration (or any other npm frontend tool). built-in authentication is very basic, hosting is a pain.

The thing is a haven't written a single line of code in Django, but modern PHP and it's ecosystem looks more fun from a front-end, JS developer's perspective


How can you say Django is not as polished when you haven't even used it?

Laravel is a great framework, but the tooling in PHP is amateur hour by comparison. The app ecosystem in Django is only comparable to Rails'.


> but the tooling in PHP is amateur hour by comparison

Looks like maybe the ignorance goes both ways? People really underestimate the size and maturity of the PHP web development ecosystem and it's professional community, and there's no shortage of tooling to build and support apps on the language.

Django: 34,019, Laravel: 26,881, Rails: 9,300

https://github.com/topics/django

https://github.com/topics/laravel

https://github.com/topics/rails


and Symfony: 25,800

https://github.com/symfony/symfony

Modern PHP ecosystem is a shadow of their former self, in a positive way.


Composer shored up package management. Laravel and Symfony offer robust framework ecosystems. PHP 7 bridged the performance gap with HHVM. Libraries for a wide-range of critical infrastructure services from databases (Postgres, MySQL, Elasticache, Redis) to messaging systems (AMQP, Kafka, ) to monitoring and observability (New Relic/DataDog, Prometheus, Sentry). Cloud support is ubiquitous.

Even the top packages are pedestrian things like logging, event dispatching, sub-process management, and testing.

But PHP has a Microsoft-level of baggage, and those bridges can't be unburned.


Dual monitor setup is a huge problem with linux distros. I haven't found yet any DE that works out of the box. I'm really looking forward to KDE with official stable wayland support, until then 2021 is not the year of linux desktop


What's the issue with dual monitors and GNOME?


Never had any problems.

But I think there is a general problem with sleep modes as mentioned. Luckily it boots in a fraction of the time Windows took.


Try using monitors with different pixel densities and setting per monitor fractional scaling. It never works as good as it works on a Mac (not a Mac fan boy... I would rather move to Linux but here I am).


But why though? At my desktop workstation both of my monitors are exactly the same brand and model (and sequential serial numbers, if I have a choice) and that's exactly what I would want regardless of my OS.

Why would anyone not prefer this over a mixed set up? The only reason I see to use a mixed set up is if you're forced to use a laptop. Personally I don't optimize for working in meetings and planes though and my life is just simple and straightforward. I keep just 1 cheapo laptop around for that stuff.

With that said, XFCE handles mixed DPI/scaling just fine for me.


Works fine for me ;)


We're all complaining about how js is a bad language, tooling is a mess, and how the web is fundamentally built for documents and makes it hard to create app-like experiences. Now, Google comes and creates a whole new UI toolkit from scratch, couples it with a very beautiful SDK and component framework and offers a far better programming language than js could ever be but we're still nagging. I was also pretty disappointed with the demo at flutterfolio.com that is supposed to show how great Flutter 2.0 for the web is. It's not that good but it's gonna get there eventually, given the hype around wasm and <canvas> technologies. Not to mention that Flutter is already better and easier to use than the existing native tools for both Android and iOS. I believe Flutter is an extremely ambitious project and I appreciate that Google is really trying to give an answer to the problem of cross-platform UI development.


Are you a native mobile developer? I am (was I'm moving to ML/AI/Data engineering) and I don't think flutter is in any way easier or nicer than the native toolchains for mobile. Both Swift and Kotlin are better languages than Dart IMO, the IDE and tooling is far superior for both also. Flutter is faster but once to deploy a substandard quality of app for sure but matching the quality of a native app? That takes just as long in Flutter as building a native app in each tool chain. I've built apps in React Native, Flutter, Ionic, and Swift/Kotlin. I'd reach of Swift/Kotlin for developer experience, performance, and quality of app EVERY time.


I am a native app developer. I have only built one small app with Flutter. Here's where I disagree:

- I've used Xcode since version 2 and like it, but in my opinion it's a worse developer experience than Flutter. Refactoring and code navigation were much better in both Android Studio and VS Code.

- Flutter's hot reloading is fantastic. Meanwhile, SwiftUI previews seem to be built on the same technology as IBDesignable, that is, they're just barely stable enough for a short WWDC demo.

- I am very sensitive to non-native controls on macOS, but UIKit doesn't even have a standard button class, the first thing that everyone has to reinvent (Apple included). I wouldn't pick Flutter for business apps with loads of text editing, but it feels perfect for social game-ish apps, like QuizUp or Duolingo.

- In my experience (German freelancing market), the typical native app developer does not care about the user experience anymore. Ever since RxJava and Swift have hit the scene, the focus has moved from impressing the user, to one-upping your coworkers with exotic language features and avant-garde architecture patterns. Dart is a dumb language like Go, and I think that's exactly what's needed to bring UX back into the spotlight.


I'm a native app developer too (iOS and Android) and I've got some experience with Flutter.

I agree with most of your comment, but the only thing I'd add is that from what I've seen if your concern is the quality of apps then Flutter definitely is not where you'll go to find that. If anything, Flutter developers seem to care even less about the end-user experience and instead simply focus on their own productivity. The end results are often horrible with a ton of jank, UI weirdness, etc.


> but UIKit doesn't even have a standard button class

Doesn't anyone else use UIButton? Granted, the native iOS app I developed was intended primarily for blind people, so I didn't really make it visually polished.


Yes, the visual polish is what I mean. It's not rocket science to style UIButton, but the lack of a good default style means that mediocre native apps often have weird/inconsistent highlighted button states, and so on.


But at least they are semantically buttons and not the UI equivalent of a <div> to VoiceOver…


> Dart is a dumb language like Go

Dart literally has reactivity build in, like RxJava or RxSwift. You have no idea what you're talking about.


And because it's built in, unlike the bolted-on Rx framework family, it doesn't bother me much. I found the language to be much more focused and pragmatic than Swift, but as I said that was just my experience after a single project.


I am, and I agree, native toolchains can be better but that is expected, they have a lot more resources dedicated to their development. I also am responsible for an app built using flutter, it's been on production for almost two years with a very good rating in the app stores and over a hundred thousand users, isn't that what matters? that the technology enables you to solve problems? Flutter did that for us, keep happily working on Xcode if that works for you, for our startup this announcement is great news.


If you had to pick a multiplatform solution (for whatever reason) which one would you pick? I've been exploring this space a bit, and it's really hard to form an opinion on this.


I've been in that situation 3 times, I choose React Native and Flutter each once. I was forced to use Ionic. I would NEVER use Ionic again, terrible experience and very difficult to get decent quality/performance. I like Flutter's technology much more. I like that it is natively compiled. I dislike that it has it's own UI toolkit. React Native with TypeScript is a highly productive environment but I LOATHED the developer experience and any code that had performance goals was way harder to be successful with, not impossible but the threading model that RN imposes (it doesn't really thread at all) was hard to make the UI snappy and crisp as it should be. I've played with Xamarin also since I was a .net dev for 10+ years (I'm old in the industry 25 years now) and the developer experience was actually pretty good but the compile times and the UI performance were not. Though that was not a production level app and I might have been able to make it work.

tldr; If I HAD to do cross platform I'd use the following logic to choice one: If I have a team of react JS/TS devs: React Native else if I have a .net team: Xaramin else: Flutter

Then I'd apply for a job writing native apps in Swift/Kotlin and run away ;)


Sorry to hear you had a bad experience with Ionic. The stack has improved considerably in recent years and actually Capacitor, our replacement for Cordova, was just rated the highest satisfaction mobile tool on the latest State of JS survey. Cordova was definitely a sore spot for Us but we’ve since moved beyond that and you can use any web stack to build apps with Capacitor (seeing a lot of React + Next.js apps of late)


Out of curiosity, what version of Ionic were you using?

Ionic 4+ is a complete rewrite from the ground up to use web components.

I use it in a non-traditional way, I do vanilla js + lit-html + web components and it works great.

Performance is smooth, mobile first approach makes responsive apps straightforward.

I don't do any of the native things or command line app creation or any of that.

I've been generally pleased with it.


> a job writing native apps

Sadly, a shrinking market day by day.


This area is one that I've been pondering for a long time. In my view, the most sensible approach is to abstract the entire UI and write to the abstracted UI. Then you write the translation piece in whatever toolkit(s) and platform(s) you care about (and in whatever language is most appropriate). This hard separation of the platform and toolkit opens the door for some nice benefits (cross platform being the first and most obvious).

However, the benefits don't need to stop with cross-platform. By adding location independence to the non-application part of the code, you get the flexibility to decide later (even after the application is written) whether to deploy it as a "fat" app (application logic running locally) or "thin" (UI commands and events routed over network to your app running on a server).

I've been experimenting with these ideas for years and it's all doable. I've done various UI/toolkit implementations such as: Cocoa/ObjC, Gtk/C++, wxWidgets/C++, win32/C++, Delphi VCL/Pascal, HTML/JS, Java Swing, Java SWT, etc.

I look forward to being able to share publicly (once I decide which license to use).


If if a CRUD frontend for data, just go with mobile Web.

If doing games, Unity.

If I require some native access, Xamarin.

Finally, using C++ in a MVVM approach with native Views for anything else.

Those answers are for personal projects, at work we just do mobile Web, and with Chrome and Chrome Edge teams pushing the agenda of Web APIs =~ ChromeOS, we get to do most of the stuff we care about.


If you know the native platforms then Xamarin.Native. Shared business logic, platform-specific UI. Over time create your own Xamarin.Forms like DSL to do shared UI.


What are your thoughts on the business end of deciding to build two separate versions of the app in two languages (not to mention the web) vs the efficiencies of one code base?

We're close to needing to make this decision and I'm real hesitant to introduce two additional languages (we're already React for the web but haven't build apps yet) vs a React Native app where our team can be immediately productive.


We made this choice at Rdio back in like 2012. Our mobile apps were written almost entirely in C#, shipping on iOS, Android, and even Windows Phone 7/8. About 70% of the code was identical on all platforms, even the super-hairy audio bits. Contrary to the prevailing notions at the time, our app had native levels of quality and performance. We could roll out a new feature an all platforms in only a little more time that it would have taken to do it for one.

That agility didn't come for free, however - we gained speed, but also traded routine bugs for exotic ones. In addition to simple null-pointer errors and the like, we got to spend two weeks digging into the Mono runtime to find a locking bug that drained users' batteries. We had our own sqlite wrapper because the built-in ones on Android and iOS had too many incompatibilities. We had our own red-black tree, for some godawful reason. We had a standing weekly call with our Xamarin reps to discuss toolchain bugs.

Ultimately, the pain ended up outweighing the savings of sharing code. At the time Rdio went bankrupt, we had substantially rewritten the apps in Java and Obj-C. RIP.


I was with a team that went the React Native route. At first it was fine until we had to go slightly off the rails.. and I was rebuilding .so files based off random gists and updating linkage assemblies.

React Native works until it doesn't and then you are getting into very detailed platform specific territory.

A lot of the cross platform promises were untrue - we quickly learned the importance of QAing both builds and frequently had platform specific patches.

Just bite the bullet and go native upfront.


I have had the exact same experience. I’m not a big fan of React or React Native, but I can see that it does increase code reuse; but...

As you say, platform-specific glitches will always crop up so you’ll always need a bit of native work. If you’ve thinned out native development team this can make things hard. Instead of a team of 5 or 10 native developers working on bread-and-butter UI stuff, you only have enough work for 1 or 2, but it’s all grungy stuff like talking to low-level frameworks and working around platform bugs (or React Native bugs, of which there are plenty). That’s not a recipe for clean and maintainable code.

A related issue is that React and React Native aren’t 100% compatible. You can’t just move existing React code directly over as you might elect. It is possible to write code that works on both, but it isn’t trivial.

QA definitely needs to be done separately on each platform.


Or give Ionic react a try


I would not recommend Ionic. I've been using it in a medium sized app for about 3 years now and I get the feeling it's good for getting started, but once your app grows past a certain size it's starting to create more issues than it solves.

Some examples from the top of my head:

- various performance issues (e.g.: memory leaks which haven't been fixed for years [1])

- their push/pop router navigation seems like a really bad idea

- worse developer experience than using Angular directly (e.g.: last time I checked this, the save/compile/reload cycle of an Ionic project was an order of magnitude slower than the same project without Ionic)

[1] - https://github.com/ionic-team/ionic-framework/issues/19242


This heavily depends on the framework you choose to use, and modern Ionic uses the stock tooling your framework does, so build times should be on par with any other project of that framework type. Earlier versions of Ionic had custom tooling and much slower build times.


This was happening in an Ionic 4 project which was already using the stock tooling of the framework (Angular CLI). But I remember it being worse in Ionic 3 with its custom tooling, so overall things do seem to be improving with time.

My findings at that time (it was a while ago) seem to match exactly the slowdowns described in this issue [1]. Just importing the IonicModule in a new Angular project (without actually using any Ionic component) made the dev server build times jump from around 200 ms to a couple of seconds. And the situation only seemed to get worse as more Ionic features were being added to the app.

Just to make it clear, I understand that this is an open-source project and I don't expect anyone to fix my issues. And I'm also very grateful to you and the Ionic team for giving us Capacitor which is such a big improvement from Cordova.

So I don't like being all negative in here. But I did encounter a fair share of issues with Ionic and I'm only sharing my experience here as just another data-point in case it helps someone make a well-informed decision.

And I have to say, the overwhelmingly positive reaction to Ionic in general did make me question my own abilities several times. Maybe I just don't "get it". I still haven't ruled that out as a possibility.

[1] - https://github.com/ionic-team/ionic-framework/issues/17902


Thanks for the info. I do think the choice of Angular here is significant. Angular builds have historically been very heavy. Later versions have sped things up and Ionic apps have gained from that. I haven’t seen slow builds in React, for example.


-the push/pop router navigation is insane, it by default keeps all views in memory all the time for react it will reload every view with any state change by default.


Interesting but is this still the case on recent Ionic releases?


I am a native mobile developer, and I am presuming GP is most definitely not, because I completely agree with you.


I have seen this a lot. Most of those people are Web Developers. They want their Web technology to move towards cross platform native apps. And are frustrated with people bashing or stopping this progress.

On the other hand you have Native Apps developers, while equally being excited about Cross Platform UI and toolset have been burned more than enough. And this didn't even start with Smartphone. It goes back to earlier PC history with Java or even further. None of them were good enough.

At the same time Native Apps developers dont understand why Web Dev or those who has Web Dev background now working on cross platform toolchain constantly push and produce the same thing years after years.

You cant blame them for being skeptical.


why do you move to ML/AI/Data Engineering from Mobile?


What do you think of jetpack compose? It has reached beta and there is experimental desktop support


As a native Android developer (who is also doing Flutter atm) I look at compose as a seismic shift in the Android space. Flutter wont be able to compete


History has shown us over and over again, always bet on the web. Sure you might not like JS as a language, you might find CSS confusing and full of warts, etc. but it's here and will be here 20, 50, and 100 years from now. We're not going to just sit up and throw away 25+ years of progress and history on the web overnight. Tech like java applets, flash, silverlight, etc. come and go like fads. Who knows if Google will even care about flutter in 5 years, let alone 25 years. A page that Tim Berners-Lee wrote 25+ years ago renders just fine in a browser today.


[Flutter Eng. Dir here]

I guess I would like to think we are betting on the web. :) All of the Flutter founders came from Web backgrounds. After years of attempting to make the Mobile web awesome, we forked Chrome and built a new thing. Now we're bringing it back to the Web.

The web is a big tent. I think there is a lot of room for innovation here. We're attempting with Flutter to push on some of the newer aspects of the Web. There are still some pieces missing from the Web to make things like Flutter really shine (e.g. a multi-line text measurement API could help get rid of a ton of code in Flutter Web). As you saw in the keyonte today, we're working with Chrome to continue to improve life for developers.

I don't think Flutter will ever be the right solution for all of the Web. Certainly not today. For example, we don't even support SEO or great indexability yet (although it's long been planned for and will be coming soon).

I just want to believe we can do better. We, developers, can all push development (including the web) to be better. Hopefully Flutter will do it's part.


Read somewhere flutter canvas rendering was only a first « quick n dirty » way of rendering something on the web, but a true DOM renderer was the end goal.

Can you give more info on that ?

Another question i’ve always had about flutter : last time i explained how this tech looked promising, a friend asked me about performance. I said « they said it’s really good and smooth ». But then we tried the iOS demo app (something very basic about vegetables) from the app store, and the scrolling performance was a total disaster (on an iphone x).

Do you have an explanation for the discrepancy between the official ad one can read on google blogs, and the real-world experience of app developped with flutter ?


When Chrome has become synonymous with the Web :facepalm:


You have to fork something, you can’t just fork the web as it is an abstract noun.


As long as you manage to recreate Flash game ecosystem you will win alone on it.


> History has shown us over and over again, always bet on the web.

This is a mantra on HN. But is it true? I don’t think it is if you’re trying to build a big product mainstream people will use.

People want native apps. No one needs the apps to work in 25 years. The web is just part of the picture, an important part, but still just a part.


> People want native apps.

I'll take a well done web page anytime over a native app.


> well done web page

That is an oxymoron.


People want native apps for some domains. On my phone, I typically want the opposite. Every company has to have its own app, and it’s annoying. I do want Flux, because that functionality can’t be done without an app. I don’t want a terminal in my browser because that would be ridiculous.

Blanket statements don’t work.


> I don’t want a terminal in my browser because that would be ridiculous.

Secure Shell[1] is actually my go-to terminal for daily use, and supports some features that are important to me (e.g. OSC 52 codes) that GNOME Terminal doesn’t.

[1] https://chrome.google.com/webstore/detail/secure-shell/iodih...


> People want native apps.

I would argue that people want a certain quality experience. They don't care about whether the developer used Swift or Javascript or OCaml to deliver it.

The Web does usually deliver a certain baseline experience, and most platforms actually deliver a browser which mostly matches platform experience.

For native apps, there is a wide variety of things which you may or may not be able to do based on what the developers implemented and whatever their chosen toolkit supports - including toolkits which reimplement their own drawing, widget and event systems and does not support accessibility or even consistent copy/paste.

For web apps, you do have to somewhat actively have to break this stuff as a developer.


The same engine of HTML + JS has powered entire businesses and industries from $0 to billions and billions of dollars over 25 years. Amazon.com would not exist without web browsers, and its entire trillion dollar+ business is an enormous bet on the web. I would say there's zero danger of the web going away when folks like that (and many, many more... Google, Facebook, etc.) depend on the web for every microsecond of their existence.


>Amazon.com would not exist without web browsers, and its entire trillion dollar+ business is an enormous bet on the web.

Except 70% of e-commerce, 90%+ of Social Media are now on Mobile Apps, where they were all previously 100% Web.

The problem with Tech industry is that too much thinking is about centralised, decentralised, Technology with backend front end. etc. When its users or customers dont give a fuss at all.


That's because the current mobile platforms were engineered from the ground up specifically to kill the web in favour of walled garden app stores.

We'll have to see how long this approach will stand up for, both legally and technically. With real open source phones and antitrust developments we might see a revival of mobile web eventually.


Even in the extreme unlikely case of opening up Apps without App Store. People will still be using apps. Even if they are Web Apps or Apps with WebView. It will still be Apps. Simply because accessing a button is easier than typing in a link.

Web is still great for Discovery though.


How is a home screen app icon different from a tab in your browser, if it leads to what is essentially a web app? I count such apps as a success wrt "betting on the web".

Sadly, the capabilities of PWAs are very much second class on every mobile platform right now. But I don't think it will stay that way forever.


If today FAANG had to choose: shut down your websites or shut down your native apps: which would it be?

Which platform did Clubhouse build out first? Why?


For Facebook and Apple, mobile (native) is definitely the most important.

Advertising accounts for 99.9% of Facebook revenue, with mobile advertising accounting for 94% [1]

Not sure for the other ones.

[1]https://www.businessofapps.com/data/facebook-statistics/


Clubhouse is targeting the middle-class silicon valley market right now (quite literally, those are the only people who got invites early on), who of course are infatuated with apps and have the money for fancy phones, tablets, etc. It's smart marketing for them to go where their customers are right now.

The web is for everyone--I can go to an internet cafe in a slum and browse and buy from the same Amazon.com as I can from inside a $15M mansion. It's a quantum leap in access to the world using the web.


Not sure what personal income has to do with anything. Hand held touch devices have revolutionized Internet access. The deeper down the income scale you go, the less likely you are to encounter a personal computer while you’ll still likely encounter a smart phone. Amazon will work on the web or as an app on that phone, but with the app the user experience will be better. That may be because Google and Apple have intentionally prioritized native APIs while hindering PWAs, but that’s still the case.

Anyway, I do still wonder: if FAANG had to pick between native and web apps, which do you think would they pick?


F: A few months ago I'd have said apps. Now after their latest spat with A, maybe they're having a think?

A: web, for sure. That's how they make their money.

A: I wonder how much money they would lose if they shut down their website? Would they sell their stuff on A instead?

N: Who cares, it's only there to make the acronym nicer.

G: Web.


What would Microsoft say?


Microsoft would try to make everyone happy by creating 200 different GUI tool-kits that do similar things on different platforms but with each one having slightly different syntax but giving you the capability of using different languages. If they targeted languages they don't own, they would extend the languages with Microsoft specific keywords!


"Progressive Web Apps on Windows overview"

https://docs.microsoft.com/en-us/microsoft-edge/progressive-...


Apart from Google which has a complex answer. Most of the traffic from FAANG are now coming from Apps.

Facebook could have shut down their Website and it wouldn't even have a 10% revenue impact.


My own self would say native apps, 10 years ago.

Today, 10 years later, I say Web.


They can collect more metrics and have more control when it's a native app. My web browser is still my most used app on my phone.

But I think betting on the web actually meant to bet on native for each respective platform. Bet on native for the web is betting on HTML/CSS/JavaScript. And then have a Java/Kotlin version for Android. And have a Swift/Objective C version for iOS

I think the learning is, write once run everywhere is what has been tried and failed time and time again for user applications. Java failed many times, Silverlight, Flash, etc.

The reason is always the same, user experience is limited when you go that route, and it eventually loses out to competitors who offer the better user experience on the user's platform of choice.


> People want native apps.

Only because OS vendors made them believe that.


Or maybe because native apps are a better experience, nearly every time. True multi-threading, native code performance, latest UI implementation, more and better hardware access/performance, etc.... I can keep going but the point is that the web really is the lowest common denominator. That isn't bad but it also isn't how you build the best experience.


If OS vendors wanted web-apps to succeed, they could have done a lot more than they have done so far. E.g. better integration, or improved web standards to optimize for certain cases.


No matter how "better you integrate", there's one big core issue: the DOM. You simply cannot make the DOM behave as smoothly an as reliably as a native app. And no, no amount of "improved web standards" can help with that.


The DOM is just a kind of retained mode graphics, which can be fast depending on implementation. Also the DOM in most browsers is already sufficiently fast for many applications. It will never be as fast as native, but if you think that it needs to be then you are missing the point.


> The DOM is just a kind of retained mode graphics, which can be fast depending on implementation.

It's not, and can't be. There's literally no implementation of DOM that can be fast. There's literally no conceivable implementation of the current Web that can do, for example, fast animation on a list of elements without horrible hacks (like cloning elements, taking them out of the layout, hiding the original elements and then animating the new elements).

> It will never be as fast as native, but if you think that it needs to be then you are missing the point.

And what point would that be in the context of "If OS vendors wanted web-apps to succeed, they could have done a lot more"?


Why would they want that if they can build native SDK and won't be tied to anyone else?


That is my understanding as well.


I generally agree with you, but I don’t think it’s unequivocally true. Facebook bet on the web/HTML5 for their iOS app, and Zuckerberg later referred to it as the company’s biggest mistake.


That was because he trusted his engineers that believed in ideology rather than objective and rational evidence.

Wanting / Loving something to succeed is one thing. Whether it will actually work or succeed is an entirely different matter.


> History has shown us over and over again, always bet on the web.

For what it's worth, people had the exact same mantra about internal combustions engines for decades any time someone brought up electric cars.

You're absolutely right that entrenched systems are hard to change and attempts to change them mostly fail... until one succeeds.


I will gladly throw away 25 years of “progress” because it is just programmer busywork and monopoly lock-in.


Google does have a history of ditching tech that, to them, doesn't work out.


I just visited flutterfolio.com. The very first thing I tried to do is enter a username and Tab to the password field. But Tab just catapulted my input focus to the browser address bar. I mean, come on.


The accessibility is a bigger concern, but flutterfolio.com also

A) lags on my work machine when tabbing through fields

B) doesn't handle HDPI screens well (the entire interface looks blurry)

C) keeps fields visually indicated as selected even when I click outside of the browser (if I start typing, is it going to go into the field or not?)

D) has a separate touch mode? Touch doesn't just work?

Looked up another of their sample apps:

A) doesn't respect my OS scroll direction

B) lags on scroll

C) mousing over any of the buttons has a 0.5 second delay before my cursor turns into a hand icon.

And all of these sample apps take about a second to fully load for me, despite the fact that most of them aren't doing anything complicated.

The "we can rebuild the browser in Canvas" idea is alive and well in GUI toolkits, but I have never seen an implementation that didn't have these kinds of basic problems. How many UI toolkits do we need to see that can't figure out how to do scrolling before we acknowledge that having one team try to independently reimplement decades of work on the web might just be a bad idea?


[Flutter Eng. Dir. here]

I really appreciate the feedback. We clearly have more work to do on the Web side of Flutter. Unlike the Mobile side which has shipped 100,000s of apps, the Web side may be up to like 1000. :) So many more issues to address as we work closely with more users to get their apps into production.

If you'd like to track progress on any of these, I'd encourage you (or anyone else reading) to please file issues at flutter.dev/support. We read (and try to address) each and every one which comes in via Github.


The CanvasKit renderer[1] is highly concerning to the general health of the web. It's nice that it's easy for developers, but it remove all the power of the web.

To an end user, their accessibiliy tools, & user extensions, the page might as well be VNC'ed in to some system. Everything is opaque. There's no HTML elements.

I can not state strongly enough how immoral & unethical this path is. Bending the web to the developers will & breaking all the contracts of what a web page is a grevious act, is enormously harmful. This is one of the worst possible things that could happen to the web. Please for god sake don't do this to us. Don't injure the web like this.

This will be raised again and again and again until the ends of time as an incredible black mark on the name of Flutter.

Edit: constructive feedback welcome. Whether it's me or others, folks pointing out this peril often find themselves hit by downvotes as I do now. This seems like an existential challenge for the web, to keep humans able to be in the loop when browsing the internet. We would all love if you would defend or explain or have something to offer in your critiques about this crisis.

[1] https://flutter.dev/docs/development/tools/web-renderers


Yes, my knee jerk reaction was just like yours.

But... think of this as new Adobe Flash. Or a new MS Silverlight. Some people use it, mostly for privately hosted local apps. Most people won't.

PS. And then Google will probably kill it anyway


I appreciate that building something that works even this well targeting Canvas must have been a metric ton of work, and I'm impressed. But that's kind of the issue -- it cannot possibly be more work to maintain a separate rendering/compilation pipeline for browsers than it is to rebuild the entirety of Chrome's DOM engine in WebGL for CanvasKit.

I just don't see how Flutter is going to keep pace with "native" web apps when the team is constantly playing catch up every time a new medium, input method, or browser feature comes up.

Handling scroll is hard enough, is this going to handle WebVR? Can I control this web app with a voice assistant?

Sorry if this is something of a dismissive answer, but I'm not sure what the right way is to file an issue that boils down to, "it seems like you picked literally the hardest possible way to build a web GUI toolkit, and I'm very impressed that you have anything that's usable at all, but I also don't understand why you did this."

I don't know, I don't want to be overly negative here, but I don't have any confidence at all about the overall strategy that Flutter is pursuing. In order to get accessibility to work, you're basically going to end up building a DOM representation of these apps anyway. It's just now you have to build a DOM representation and you have to completely reimplement the rendering stack and capture all of my events? How are you going to make something like that performant across every browser?

I want to echo a few other comments I've seen here that this result isn't really surprising to me. I guessed before I clicked on the demos that they probably wouldn't handle scroll events well, because I know how you're building Flutter for the web, and I have never seen any GUI frameworks targeting pure Canvas on the web that don't have basic errors like this. If Flutter ever managed to be the exception, that would be very surprising to me. I don't know what Flutter's internal process looks like, I'm not going to tell you you're building something wrong. I only know what the end result looks like, and I know that end result is not going to radically improve any time soon.

It's not my place to tell any team what to do, and nobody is obligated to care what I think, but... I don't know, the demos online do not leave me feeling confident about Flutter's future. I don't think the experience as it exists today is the result of a bunch of isolated issues/bugs that can be fixed one at a time.


Its nice to have absolute control of the rendering going over canvas if you are a flutter platform developer and i think even playing the catch-up game they should get there eventually.

But i don't think this is the real issue here.. Flutter is more of a Flash and GWT lineage, and that's fine if that's what you are looking for.

But i bet on the Web every time, its the most popular UI (and now much more) platform ever. So while some will go through the Flutter and React way of doing things, most will just stick with the web.

The web is the most sophisticated platform ever built. It gives you a lot of power and freedom, so i don't understand why some prefer to get stuck into a cubicle when you have so much space?

Its nice to have frameworks to make things easy and developers more productive, but the ones that do this without alienating the developer from the bigger, broad and sophisticated framework are just better.

Just let them be the new Flash, now at least open and over the web, and look for other approaches if you want to maintain real control and freedom, instead of delegating to the platform developers.


The price of infinite freedom in UI toolkits is that you get nothing for free. This has consistently been untenable: you quickly get stuck in the weeds reimplementing basic behaviors.


Supporting new and unique APIs/inputs/etc like WebVR is a pretty classic cross-platform problem and it's usually addressed by allowing native hooks. Flutter has MethodChannels which let you call native methods in the underlying "platform host". It also supports "PlatformViews" which let you embed native widgets.

It doesn't really need to have instant parity with "native" web apps at everything. Maybe Flutter is a poor fit if you have extensive native requirements. That's okay.


It's not just about building special experiences. I want to be able to browse normal websites in VR -- VR and uncommon user agents introduce a new set of user inputs that Flutter will need to handle if it doesn't want its websites to just break if someone loads them up in a headset.

Currently as a web dev, if I want my website to be usable by a voice assistant, I don't have to do anything. If I want my website to be usable in VR, I don't have to think about it -- that's Chrome's problem, not mine, I just expose the exact same controls I've always used. If someone is building a user agent that interacts with my site in a novel way, as long as I've built my site well everything just kind of works, because of how the web is architectured.

But if you're rebuilding all of the controls from scratch, suddenly you can't think that way anymore. You have to think about the controls and gestures that every medium exposes, or else you have a website that just randomly breaks depending on what OS/platform a user accesses it from.

> and it's usually addressed by allowing native hooks

Not on the web though. I mean, for obvious reasons on the web we can't just expose native OS methods for websites to call. Flutter doesn't have a choice on that front, Google, Mozilla, and Apple realistically aren't going to break browser sandboxing just so the devs have an easier time.


It's true of course that as a cross-platform toolkit independently built on top of another platform, Flutter will have to consider new controls, gestures, and changes in many platforms. You could say the exact same things comparing Android/iOS/Windows to the cross-platform web: it's very hard to do and there are plenty of compromises, but it's still very valuable. There's been far more handwringing over the web's deficiencies as compared to native OS platforms; why reinvent the wheel with some crappy dynamic language called JS, why rebuild everything with a custom style language and layout engine? Yet Electron and web apps continue to dominate because the trade-offs can still be worth it.

The web is not really adopting hordes of new input modes like WebXR every year, there'll be plenty of time for Flutter to consider new stuff like that before it approaches relevancy in mainstream product development. Accessibility features like voice assistant support don't necessarily come free either. Rich web applications usually don't produce simple/accessible DOM structures even if you're developing with web-native tooling. Flutter or not, accessibility practically always requires some level of manual annotation in web apps, which is Flutter's primary use case.

> Not on the web though. I mean, for obvious reasons on the web we can't just expose native OS methods for websites to call.

I meant native-to-the-web. Flutter's MethodChannels & plugin system works on the web too. If there are browser APIs that you need to use, you can setup hooks to call them from within Flutter.


> You could say the exact same things comparing Android/iOS/Windows to the cross-platform web: it's very hard to do and there are plenty of compromises, but it's still very valuable.

The difference is that the web efforts aren't being headed by one team in one company, they're a giant effort with a huge amount of funding, shared resources, and attention from multiple companies and communities.

Flutter doesn't have that benefit. It's not that nobody could build a cross-platform replacement for the web, it's that the web was hard to build, and it's very unlikely the Flutter devs are going to be able to repeat that effort on their own.

> Yet Electron and web apps continue to dominate

Largely because Electron piggybacks on existing work by embedding the entire Chromium engine, they're not building an entirely new render engine from scratch. And Electron still struggles trying to keep pace with native systems, even though it's largely just hooking into them instead of rewriting them.

> Accessibility features like voice assistant support don't necessarily come free either. Rich web applications usually don't produce simple/accessible DOM structures even if you're developing with web-native tooling.

The web gives you a lot for free though. It's sort of like comparing OpenGL and Qt. Sure, both require me to be thoughtful as a developer, but one requires me to be a lot more thoughtful.

----

The bigger problem here isn't whether application devs need to think about accessibility, it's for the Flutter dev team. It's that the web doesn't expose the kind of accessibility APIs that a pure Canvas UI needs to recreate all of the accessibility and screenreader support that's built into browsers. Qt on the web has run into the same problem. What you end up doing (because it's the only interface you have to work with) is either trying to on-the-fly maintain part of the DOM and working really hard to figure out which parts need to be maintained, or just flat-out adding a second, hidden DOM tree that screenreaders can interact with. The only way that Flutter can tell a screenreader that a piece of text exists is by making a node and putting it into the DOM.

This is, from what I can see, what Flutter does in its forms. It has a DOM representation of all of the input elements (but interestingly enough not the links or other text, so they're not screenreader accessible at all), and then completely separately, it re-implements the entire browser rendering stack. And the performance is... well, you can see the performance.

Flutter's strategy for handling events to those elements appears to be (for lack of a better term) inverted. It's "Render first, worry about the DOM second", which is not the way that I would try to build something like this. I don't want to read too much into it, maybe I'm misunderstanding their architecture, but the tab errors that people are seeing look to me like they exist because Flutter is trying to poorly reimplement how browsers tab, rather than using an underlying DOM model that could for free signal to them what the currently selected element is. Similarly a lot of the input selection and mouse lag is because it looks like they're doing collision detection in WASM and performing a DOM mutation every time they need to change the mouse cursor into a different shape. Which, yeah, of course that's not performant.

Ideally, a framework like this would target the DOM directly in the first place and use that to drive input, accessibility, and styling wherever possible, adding canvases back in only when necessary to override specific parts of rendering. That's the path that frameworks like Blazer and OpenSilver are trying to go down, which is just a lot more realistic of a goal for an individual team to accomplish.

I'm trying to thread a fine line here, because I haven't read Flutter's source code, so I don't know for certain how they're doing everything or why. I don't want to confidently say they're doing something wrong if I don't have the full picture. But I can see the outcome, which is currently pretty bad, and I can see little bits and pieces of the architecture they're using to get that outcome, which all seem very counterintuitive, overly-complicated, and buggy. I'm happy to be proven wrong in the future, but in the present there's a nearly half-second delay to change my mouse cursor when I hover over an input and none of the links in-app are screenreader accessible, so that's not exactly inspiring optimism. Sure, Flutter could theoretically overcome everything and keep pace with the web, but is that what's currently happening? They're announcing v2 and the web version is basically unusable.


I can't say that matches my generally nice experience with the demos on desktop, although mobile scrolling was pretty bad.

As you mention yourself, Flutter Web already implements some things using the DOM and is clearly capable of doing so, it's just a matter of degree. I can believe that Flutter would benefit a lot from using the DOM more, but that could change any time by some Flutter contributor saying "hm the custom tab ordering impl doesn't work too well, let's render a DOM tree for tabs" or something similar for ARIA attributes, text inputs, etc. It's hardly a fatal or intractable issue with the architecture.

Many of these complaints are real issues that Flutter should tackle but they feel pretty overblown. There's a general tenor that jumps from "there are still many issues" to "what's even the point of Flutter Web if it can't get everything right". Flutter Web has to start somewhere and good desktop browser support (which is hardly unusable) is good enough for many real use cases. I don't think anyone is selling it as a mature second iteration which seems like a misunderstanding of the v2 semantic version which applies to the core framework, not Flutter Web that just left beta. If there's any org I trust to do the difficult work of cross-platform support, it's Google which already provides the lion's share of funding, standards design and implementation development to the web. IIRC Flutter's dev team also has Chrome engineers on it. I expect it to attract the attention of more orgs as it matures and hopefully becomes more popular, the core framework has already received open source contributions from Microsoft and Canonical.

> they're not building an entirely new render engine from scratch

The web platform builds an entirely new render engine from scratch. Native OS platforms give you a lot for free too and you see the exact same complaints about the web's independent behavior proven irrelevant again and again as the web/Electron continue to demonstrate incredible value despite reinventing many wheels.


> it's just a matter of degree

Well, no, I'm claiming that it is a matter of approach, not just degree. There are two ways you can go about syncing the DOM to your rendering. Tabbing is a good example of that:

A) you can build a DOM tree, listen to a focusin event, and then when an input/link element gets focus, you can update your Canvas to match the state of the DOM. This means that you listen to one event and (with some exceptions) your rendering engine mostly just has to worry about rendering. Or

B) you can build a Canvas, reimplement tabbing, mouse selection, touch events, and everything else... and then when your new implementation decides that focus is changing, you can update the DOM to match your Canvas. In short, you can choose to have the Canvas drive the DOM, rather than having the DOM drive the Canvas.

What I'm arguing is that approach B, which Flutter seems to be using, is fundamentally much, much harder, buggier, and less performant than approach A -- and my evidence for that is that GUI frameworks surrounding Rust, Silverlight, and C# that are following similar approaches to A are almost all much more mature than Flutter is, despite having fewer corporate resources devoted to them. I'm arguing that path B is an high-level architectural decision that is not going to yield performant, high-quality results.

> The web platform builds an entirely new render engine from scratch.

Right, but again, the web platform at this point has spent over 20 years doing that, and for the majority of that time it would not have been realistic to build a project like Electron. A lot of this seems to come down to, "is the Flutter team big enough to handle this". I don't think they are, but maybe I'm wrong.

I mean, we can debate this endlessly, or next year Flutter v3 can start releasing demos that can handle smooth scrolling and don't lag in Firefox. My prediction is that Flutter is not going to turn into a performant, good quality target for the web any time within the next couple of years. But again, maybe I'm wrong, and luckily it will be very easy to verify if I am. I'll check back in January 2022 and see if anything has changed.


Fair enough! Appreciate the discussion anyway.


It's disappointing the Flutter team members haven't addressed this justifiable concern about their big-picture strategy. I would really like to hear what they have to say on this.


On mobile, you can hook to low level native input events.

On a web browser, <input> is all you have and because of the abstraction you cannot build it from the scratch using lower events. Think iPhone text selection.

Flutter on web may cater a specific category of graphical intensive apps, but not all apps because <canvas>. It will fall to the same uncanny valley where Java applets where back in 00s.


I don't understand how breaking accessibility with Flutter wouldn't mean that companies that use it on the web are violating the ADA.


I don't know what that is but I assume it's some kind of American nonsense I don't care at all about.


Multiple countries around the world have legal standards around accessibility. Then you have the ethical, DE&I, and business reasons to enable disabled users equal access to the web platform and apps through screen readers and other assistive technologies, i.e., accessibility. It’s certainly not a uniquely American concern.


I assume that you just haven't run into this specific term before, but if that's not the case then comments like these are why the web community overall should oppose web technologies that leave accessibility decisions solely up to end developers or that don't make accessible options the default.

The web works as well as it does because (in general) it's accessible by default. There are lots of open problems on the web regarding accessibility, but we should be moving towards being more accessible by default, not less -- because if we want a universally accessible app platform, developers and corporations can not be trusted to make these decisions on their own, and laws will only affect specific industries and countries.

That's part of why Flutter devs talking about dev decisions that can increase accessibility ring kind of hollow to me. Accessibility has to be something that's pushed at a technological and cultural level if we want the web to be a platform that leads the way forward on these issues.


Accessibility is American nonsense?


You think the word "accessibility" is the part that I had not heard of?


[Flutter ... here]

Currently I'm counting four or maybe five different HN users in this thread indicating this affiliation. I appreciate this open look into the organization. We're probably getting a more honest idea about what really goes into the sausage. Still, your PM might be less happy about this thread...


Actually, PMs love open, honest feedback. Keep it coming!

Chris Sells PM, Flutter


Recognize the name! Interesting to hear you moved from Microsoft to Google.


My question is, if there is "more work to do on the Web", why is Flutter Web considered stable?


I happen to be on a 1.5 Mbps connection at the moment, and "about a second" sounds wonderful. The demo apps I opened took closer to 30-60 seconds to load.


Strange how I don't see many of your issues on my side.

(parent issue) Tab tabs through text fields only.

A) No lag on my laptop

B) Zooming to 400% reveals pure vectors for text as well as control decorations, even the fingerprint icon. Only the logo becomes pixelated but that one could of course simply be an SVG instead and not Flutter's problem.

C) Yes, this is a common issue with web apps. One often needs to look at web browser focus. I'm unsure if an event is even sent to the page as the page itself loses focus.

D) I think it does and this is just a tech demo for adaptive interfaces if you want them.


Could be the browser/platform you're using? I'm not sure. I've seen some reports here that the demos work better in Chrome, but that's not exactly a point in Flutter's favor; this is supposed to be a cross-platform toolkit after all. Regardless, odd.

A) I'm on Firefox on a Mac Book Pro. My feeling is that should be able to handle a login form, but I mildly suspect that Flutter's dev team is not testing on Firefox at all.

B) Here's what I see when zoomed to 400%. No vectors anywhere, not even for text: https://i.imgur.com/7QFC40v.png Nothing that I see on the page is being handled as an SVG. Very strange to me that you're seeing vector graphics, as that would imply that the form isn't being rendered onto a Canvas for you?

C) This shouldn't be a problem with web apps that use :focus/:active CSS selectors. I understand if a from-scratch webapp doesn't handle focus loss, but I would expect any GUI toolkit to be able to.

D) On the web touch already for the most part just works. There's nothing on this login page that should require a separate interface. I think it's a problem if Flutter only provides adaptive interfaces "if you want them"; in a good GUI framework you should be getting the stuff that the web already handles for free regardless of whether or not you "opt in" to having your site work on an iPad.


I think you're missing the point of touch mode: mouse and touch actually work fine in both modes. The touch mode is just there to demonstrate how Flutter adapts the layout depending on the target modality: see how the controls get larger when you select touch mode.

The Medium post[1] about Web support explains some adaptations they made for Desktop browser, including:

  We also increased the default content density, because mouse pointers support a tighter density than touch devices.
I expect that in a "real" app the default mode is adapted automatically based on the device type.

[1] https://medium.com/flutter/flutter-web-support-hits-the-stab...


B.2) I bet that it doesn’t respect a wheel multiplier either. It is 3 down keys by default, but I set it to 6 (7 at summer). Even VSCode annoyingly does not, but at least it has its own setting for that, which still only affects text buffers and not everything else.


I know I do almost nothing on HN but complain about accessibility, but it's really important to me because, well, that's how I uze my tech. And so far, sadly, Flutter hasn't impressed either with its previous versions. Edit boxes in particular were a major pain point, and things like you're describing were also less than optimal. I never knew where the focus was and what it was doing. With broken markup there was at least ways around it. But I'm scared of things that render on the canvas. Most browsers actually get this right and have support for these things that don't require ugly hacks if you use the DOM. And there is no real way to interface with assistive tech from JavaScript except through it. So you have to somehow still actually represent your apps UI in the Dom in some way.


It strongly reminds of mid-2000s sites written in Flash


To be fair there were some flash sites I’ve still never seen anything that equals. I think the way flash marketed to more designers and content creators was both what made it awesome and maybe its downfall.


It is the same. But at least runtime, WebAssembly and canvas are open source and natively integrated to the browser. Less security holes, but the same UI integration problems.

Good for games.


I went there. It didn't register my first attempts to tap into the email field. I tapped the password and it worked after that.

But a demo site asking to register an account to see the demos? I gave up. It almost like they are not interested to show their demos.


Yup, that happened to me. Then I clicked again and tab worked correctly.

It will be hard to overlook little details like this -- and there will be a million tiny details like this -- when decades of browser development have led us to expect a DOM experience that Just Works for UX like that.


Strange - I didn't see that behaviour, then did on a reload, then didn't again on the next reload. ??


> flutterfolio.com

I can't experience this problem, for my browser only displays for this site a beautiful, immaculate, plain white page :)


If your situation is like mine, you have to wait for some fifteen seconds or so. And then greeted with a login input. Also, my CPUs were at around 50 % the whole time.

I'm sorry, but if that's the “future of web UIs”, I'd rather stay with the “troglodytes”, who write simple HTML forms with a bit of vanilla scripting here and there.


Haha I just read your comment, totally forgot about it, then tried to do the same thing and it happened to me too. Firefox.


On safari it doesn't do that if the contents are blank, but if you type something in the email box, tab directs to the address bar. Weird.

Works fine on Firefox and Chrome.


Also, try to select any text on that page. This is Flash all over again IMO.


works on firefox


> couples it with a very beautiful SDK and component framework

I would not call the flutter SDK and component framework "beautiful" nor would I ever add the adjective "very". I have actually found it to be very verbose compared to alternatives I've used in the past. In some ways I suggest it is over engineered.

> offers a far better programming language than js could ever be

Dart is a bit of an odd duck language to me. I think of interesting ideas like the cascade notation (using .. to do sequences of operations on the same object).

Perhaps it is due to having worked a lot in Typescript and having my brain molded to code that fits that shape but Dart feels clunky in comparison. I can't put my finger on why, but defining and instantiating classes feels so heavy compared to the functional type code most Typescript seems to become. In Dart, I just feel like I'm creating massively indented component definitions with tons of properties and nested classes. Maybe I'm just finally accepting OOP and deep type hierarchies are things I want to leave to my past. I feel I can do 99% of what those things did with Algebraic types and functional composition. Nowadays I prefer that style and going back to heavy OOP feels bad.

With the dominance of classes, massive type hierarchies and quirky syntax - I'd just prefer to be working with a more react-ish framework in a language like Typescript. My feeling is Dart is a step in the wrong direction.


How many times has Google done this? And then gotten bored of their own work?

JavaScript, with all its many many warts, is widely supported, incredibly popular, and not going anywhere.

I'm not about to waste my limited weekend time learning Flutter 2, knowing it's going to be in the trash bin by 2023. I'd rather suffer through some more JS warts and get better at avoiding them.


> How many times has Google done this? And then gotten bored of their own work?

Google's history on this sort of thing isn't good but this will be much more stable than their other offerings. Dart is the primary language of the ads (i.e. money making) side of Google and Flutter is their best shot at making the language relevant elsewhere. I'm still not in a hurry to learn it but I'd be very surprised if it's in the trash bin within 5 years.


> How many times has Google done this? And then gotten bored of their own work?

They're still updating GWT, so I'm not sure what you me by that.


Maybe it's just me but I don't remotely think JS is a bad language since es6. Tooling is another story entirely.


Extremely same feeling here. Ditching IE11 support is a total game-change for the web. ES module imports just work and you don't have to go down a complex bundler rabbit-hole. Template literals make constructing HTML inside JS components a breeze. And if you do reach for a bundler the modern ones like snowpack and vite make the experience incredible with instant hot module reload on change--the feedback loop for development is like nothing I've ever experienced.


The problem with JS is not the tooling per se but the constant "upgrades" for the tools that exist. Sure, this week's hot new thing is Vite, but by this time next year it will be out of date with some other thing we're all supposed to use. In projects from the last 10 years, I see Gulp, Grunt, Webpack, Browserify, and now Vite - all doing mostly the same thing in different ways, with different config files.


You don't have to use any tools, plain old HTML, CSS and javascript still work just like they did 25 years ago.

Tools come and go, they serve a purpose like writing code in a more futuristic style and compiling it down to a broader browser support base. There will always be a treadmill like that in any language. Look at how C++ has evolved from its 90's roots to more modern C++11, 14, and 17 styles--each change also required more work for the tooling, compilers, build systems, etc. to learn. It's just in the C++ world there are far less people working on tools than in the web world.


I know someone using Gulp today for a successful web site. They don't have any worries.


What other languages have you been exposed to?


I’ve used quite a few. What are the popular scripting languages to compare with? Python, Ruby, PHP are probably the only real competitors (disregarding others like VB or Perl).

Functional programming is very difficult in those languages due to weird closures, bad lambdas, weird block/proc/lambda rules, etc. async from the ground up means that concurrency story is much better and allows lots of threading (with libuv or whatever low level library handling the difficult parts).

JS used to have less ergonomic syntax, but has benefited from adding it last, so it usually chooses the best version.

Stability of JS is much better. When the implementation is the spec, there are bound to be lots of little breakages. Asa result, there’s not much room for alternative implementations.

Tooling is far better than any other scripting language. Debugging and introspection tools are second to none in the category. All these other languages have broken compatibility so that old software won’t run on new versions. Webpack gets hate, but what other scripting language bundles its output? Babel gets hate, but if Python had something similar, the v2/3 switch would have been no big deal and all the “I can’t use that because REHL doesn’t support that version yet wouldn’t be an issue either. Likewise, minifiers reduce download size, improve performance by removing and simplifying parts of the code and improve parse time, but other scripting languages don’t bother.

Type support via typescript is miles ahead of the competition.

Finally, performance is one or even two orders of magnitude better compared to other scripting languages (luaJIT being a notable exception). In fact, modern JS JITs can come very close to the performance of Java or even C in many cases.

JavaScript isn’t the end all, be all of programming, but it’sa very solid choice with good reasons to like it.


Have you tried Elixir or any Scheme? If the scope is dynamic languages, both put JavaScript to shame with much more power, useful tools and far fewer non-sensical footguns.

If the scope is programming languages in general, since it was stated that JS isn't a "bad language" after all, then you can include a long, long list of type-safe languages that are much better for dealing with both its role in the browser and in the backend. Elm, Reason, F#, OCaml, Scala, Kotlin, Swift, Rust, Haskell, to name a few.


I necessarily confined myself to popular languages because of all the advantages that brings. If I could choose any language and magically have an awesome ecosystem, I'd definitely choose StandardML with my second choice being Scheme.

Most of the languages you mention are as fast or faster than JS. Most of them are also much more niche. Tooling for most of them is lacking. Others drag around a huge ball and chain in the form of the JVM or .NET (even the light versions are generally much bigger than v8).

Reason/ReScript seems mostly abandoned by Facebook at this point. Elm is very deliberately a one-man show (I don't like that bus factor). Ocaml compatibility and tooling seem easy then drop off a cliff in practice. Haskell is way too worried about math and the illusion of purity (and finding people willing to deal with it is very hard). Swift is Apple-only and doesn't actually bring much to the table (honestly, it seems like a rip-off of Dart with tuples and ref counting instead of a GC). Rust is much lower level and writing something in rust will take far longer than in JS.


JavaScript is 26 years old, people were calling COBOL old in the 90s, when it was 30+ years old.

COBOL is still being updated, it even supports OOP now, yet it shows its age and its joints creak a little, just like JavaScript.


It has become from terrible to less terrible.


Here is the thing, just use script tags without any kind of npm, webpack or whatever is trendy, pure vanilaJS, it is a wonderful experience.

And hey, it might even become hipster trendy eventually.


Exactly - too often we see developers spending vast amounts of time on stuff that's "better" but by what metric? Often, it's better only by standards that matter to the developers, not the business paying the bills. In my experience, Flutter makes it very fast to ship a decent solution.


> Now, Google comes and creates a whole new UI toolkit from scratch

Worth remembering that this is not the first or even second attempt at this from Google. So I think people are fair when they are not just jumping along all happily as people have been burned before.


Flutter does not offer enough to justify learning new programming language.


Dart is extremely easy to pick up if you've written in any C style language.

Someone in our team had a small Android TV app working in 2-3 days with WebSockets, web views, some animations, etc.


Syntax, semantics, code organization and best practices, libraries, frameworks, debugging and debuggers, IDE support (preferably multiple IDEs for multiple platforms), LSP support, linters, profilers, disassemblers, dependency license checkers, dependency vulnerability scanners, package managers, package repository with support for private repos and proxying/mirroring, should I go on and on and on?

Your toy app takes 2 days to create and then you (or worse, someone else) have to support the crummy Visual Basic/PHP/Javascript/Mongo/ColdFusion/insert easy to use crappy tech here, forever.


> crappy tech

What kind of an argument is this?

Not wanting to learn all those things for multiple languages is valid. But "it would take a while" doesn't tell you anything about whether a language is crappy.

The odds are pretty close to 50:50 that the language you already know is the crappier one.


My main point is that developers chase shiny things and "easy to use" is one of the shiniest things out there.

Past a certain point, being usable in 2 clicks is a negative signal for overall tech quality. Most of the really solid techs need some extra configuration. The classic example of crappy tech is the DB tech that listens on 0.0.0.0 after installation, with no user + pass or admin/admin.


> Past a certain point, being usable in 2 clicks is a negative signal for overall tech quality. Most of the really solid techs need some extra configuration. The classic example of crappy tech is the DB tech that listens on 0.0.0.0 after installation, with no user + pass or admin/admin.

Yeah, but the post up there said 2-3 days. That's plenty of time to handle those important details that make a project non-instant.


Here are some benchmarks:

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

The Dart implementation seems much slower than the NodeJs implementation and it doesn’t bring anything new to the table? It added null safety today.

Anyone that knows if it has any feature beyond for example what Ocaml has?


To give context, the implementations for the same problem are completely different, e.g. javascript versions uses worker thrreads on 4 cores for most of the examples. To compare actual performance first similar approaches should be used.



Spectral norm is an interesting example because on single thread and without using SIMD, C, C++, Java, Javascript, Swift and Dart shows very similar performance characteristics (5-6 seconds). The loops are tight, there is not much to do for a decent compiler. it almost pure simple 64 bit floating point arithmetic.

Then you add multi-threading, and see a decent improvement, e.g. from 5 seconds to 1.5 seconds on 4 cores (almost all implementations show a similar gain)

And some languages with support for Vector operations further improves this to 0.7s

So this benchmark seems to be not very useful for comparing performance of any decent language. It could however be used for comparing improvements of using different techniques to solve the problem, or to showcase what new features brings to the table.


> … not very useful for comparing performance of any decent language.

Saying "any decent language" assumes we know without measurement the very thing that we need to measure.

Showing "very similar performance characteristics" is a valid outcome.


> worker thrreads on 4 cores

So how different are the "busy" measurements?

To understand actual performance first understand what approaches were used.


Uuh the benchmarks in this site is very misleading (for all languages). Do your own tests otherwise the numbers there are practically meaningless.


Yes, when others have not written the programs you would like to compare — write your own programs to compare.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

How programs are written does matter.


Of course it matters, What I am saying is that; here is a program written in language A, which uses all the tricks in the book to solve this particular problem, here is a another one written in language B, it uses a completely different technique / algorithm and isn't optimized to death. How is it valid to make a decision about performance if implementations and restrictions are wildly different? So to me the site offers very little of value and I can not take any comparison from there seriously.


> … if implementations and restrictions are wildly different?

What if we can all see implementations that are not wildly different?

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...

https://benchmarksgame-team.pages.debian.net/benchmarksgame/...


And as I explained on a different comment, performance of many different language / compilers for this particular benchmark are almost same "If" they use the same technique ( C, C++, Java, Swift, Javascript and Dart.)

But the argument here started as "Hey look language A is faster than language B" , while pointing out completely different implementations, which is, absurd.


> … while pointing out completely different implementations…

danielscrubs referenced measurements which showed similar performance for Dart and NodeJS programs, but did not mention that similar performance.


> … some benchmarks … seems much slower …

nbody dart 8.44s nodejs 8.37s

regexredux dart 4.89s nodejs 4.79s

Those don't seem much slower.


I think in the framework of choosing boring things, you are spot on. However, all innovation tends to be ten steps forward and eight steps back, so the way that I look at it is simple. For a given effort, are those two steps forward worth the total long term cost? Maybe, maybe not. Usually not, but... people are going to do silly things.

I look at flutter as a quick way to bootstrap a simple CRUD app, but... for what? How does it improve on the web? Not 100% sure, but I do like the down chain investments that flutter supports like Skia.

I'm a huge fan of canvas, but I recognize its limits for building apps. It's great for many things like games, and it is a 2D escape hatch. I'll admit that I get suckered into the lure of building a 2D canvas empire that is cross platform because it would be nice.


The fact is that even considering all those points, Flutter+Dart is still much easier to learn than Swift+iOS and Kotlin+Android (even separately). And I'm not even considering Desktop.


Sure, but you also get really powerful ecosystems with those languages. Which can't be said about Dart + Flutter, where most of those packages are amateur quality.

> Desktop

JetBrains Compose.


have you actually tried it? its ecosystem provides all of that


It's never about the language, most any language is easy to pick up. However picking up a whole new ecosystem with its associated dev tools, build tools, packaging, and different libraries is where the time consuming portion of new languages come in.


Exactly. When I scanned Dart's language spec, it looked just like any other C derived language. In terms of complexity, Flutter/Dart is no different than Android/Java. When I started writing Android apps, learning Java was the absolute easiest part of that process.


Yeah but it’s usefulness is really limited and just feels shoehorned into the project. Why couldn’t it have been Kotlin or TS? Something that mobile developers or web developers could jump into and keep a bunch of their existing tooling.


Then you would've needed to package a JVM or a JavaScript engine, making the app distribution a whole lotta different deal.


Kotlin doesn't just run on the JVM - it can compile to native binaries with Kotlin Native. It compiles to WASM and JS too.


At the time of Flutter development it couldn't do any of those things.


Thats a good point, I tend to forget how long Flutter has been around.


JetBrains Compose.


There's not much new in Dart. It's basically another AS3/ES4/"Java lite" from what I've seen.

I suspect you could learn it very quickly.


Flutter does not offer enough to justify tolerating such a terrible programming language*

Going from Kotlin, Swift or TypeScript (let alone more powerful languages) to Dart is like going back to the dark ages without something as basic as algebraic data types.


> It's not that good but it's gonna get there eventually, given the hype around wasm and <canvas> technologies

Is it though? Canvas is basically invisible for anything that doesn't have functioning eyeballs (which include not only screen readers, but also mundane things like your browser's ctrl+f functionality, google's crawler and siri). You know how people complain about some SPAs' back buttons and scrolling being terrible? I feel like this "next gen" tech is just gonna be more of the same excellent-in-some-aspect-but-completely-subpar-in-others stuff.


Can’t speak for others, but I still want a proper set of primitives and not yet another rightest-way-to-do-it sdk whose examples stutter on top hardware and will be great tomorrow. Time to go sleep I guess, will check it in 8 hours. All I want is untangling of the mess a css boxing model is, not just some buttons on canvas. I wrote gtk-flavoured widget drawing libs for few times in Lua+cairo ten years ago and these ran smoothly on a hardware than couldn’t even boot an OS today, except some rare stop the world gc issues Lua had back then. It was no big deal, and strange (not really) that Google Itself couldn’t beat that score.


FWIW, modern Typescript is the best mainstream-ish language I've used in production. Dart is decent, but I don't think it's that good.


The only thing I really dislike about it is the fact that in the end, it’s still just a layer on top of JavaScript, so you lose all types at runtime and stuff like object literals and classes are still not “complete” in my eyes. Otherwise it’s pretty good. I’d also like beter arrow syntax, something where you can properly write shorthand like in Scala for example.


Because Google is focused on language and tooling development, but forgot to create a killer app example with publicly available source code. Show us a minor Google property re-done in Flutter with code examples and people would flock to it.

But. They. Won't.


> forgot to create a killer app example with publicly available source code. Show us a minor Google property re-done in Flutter with code examples and people would flock to it.

Can you think of a "minor Google property" that is open source?


Its a hard resource-intensive problem to dogfood your own OSS at a company as large and diverse as Google. But hard problems haven't stopped Google in the past.

What you're trying to create is the same spark in your users as PHP and React did to the web. The "oh wow I could do...." that while technically possible before the product existed, is completely re-framed by relatively minor improvements to the DX. You want to inspire an entire generation that may have passed on mobile and cross platform app development due to the verbosity and pitfalls of the iOS and Android ecosystems.

I think a killer app example is the ticket to do this. It may not be the only way, you could blow a huge marketing budget, you could convince another large tech company to do it, but doing it yourself is probably the quickest (or only way) to get it done.


Maybe some android utility that doesn't need Google integration.. Let's say calculator app from next android version?


I mean... if we ported Android Calculator to Flutter, would that really impress or convert anyone?


> Not to mention that Flutter is already better and easier to use than the existing native tools for both Android and iOS.

Flutter is not better or easier than SwiftUI. Especially in accessibility or native performance.


> Now, Google comes and creates a whole new UI toolkit from scratch, couples it with a very beautiful SDK and component framework and offers a far better programming language than js could ever be but we're still nagging

All of these things, more or less, already exist in great variety in the JS ecosystem (angular, react, vue, redux, webpack, etc.). Many people have also already adopted other languages such as TypeScript, which is easier to learn for someone coming from JS, and superior to Dart imo.


We're nagging because the apps suck and stick out like a sore thumb. Maybe Flutter will be the one to get there and be the holy grail of cross platform UI development, but the developer community has been burned by this promise so many times, we're going to have to see the final product before getting excited.

Just because a project is ambitious doesn't mean we should all jump on board, particularly when similar projects have crashed and burned, and there's really nothing stand-out about Flutter that separates it from prior efforts.


I don't understand why more resources aren't being put into Qt and making that easier to use or building a more "web-developer-friendly" abstraction layer on top.


I don't know if they've changed their approach over the past year, but the last time I looked at Qt demos for the web, I was solidly unimpressed.

At the time, they were making almost all of the same mistakes that Flutter is, and the devs I talked to seemed to be of the opinion that those problems wouldn't be fixed until browsers started adding brand new capabilities specifically for them.

Looking now at the demos at https://www.qt.io/qt-examples-for-webassembly, a lot of the same problems are jumping out at me. A complete lack of accessibility features, poor handling of scroll events, large load times, unfocusable fields, lack of keyboard controls, etc...

Halfway through playing with their pizza app, the page just froze and stopped responding to any clicks at all. Maybe those demos are outdated?

Blazor and Rust are showing a lot of promise here, but from what I know about Qt I'm much less optimistic, because Qt is used to handling everything about rendering itself -- and as Flutter is showing that's just not a good approach to building web GUI frameworks. But (again, purely from what I've seen) trying to layer on a system where Qt is actually interacting with the DOM seems like it would require a somewhat difficult shift in its architecture. Maybe I'm misunderstanding the problem though.


> Looking now at the demos at https://www.qt.io/qt-examples-for-webassembly, a lot of the same problems are jumping out at me. A complete lack of accessibility features, poor handling of scroll events, large load times, unfocusable fields, lack of keyboard controls, etc...

I found that hard to believe. But, clicking that link and trying the pizza demo... Yikes. It's not exaggerated at all.


Qt for WebAssembly: Pizza Shop Application exit (TypeError: undefined is not an object (evaluating 'handle[name]'))


May I ask what browser and version you ran this in? It does look dated but ran okay for me on Firefox 86 and Chrome 89.


Yeap, Safari 14.0.3


When I try that link I get: RangeError: WebAssembly.Memory(): could not allocate memory

So no pizza demo for me.


Whoa, yeah, none of those Qt demos are good or even seem to work properly. Yikes.


At least you got the pizza demo to work at all. All I got was a large Qt logo with the message: Application exit (TypeError: undefined is not an object (evaluating 'handle[name]'))


For the moment the only useful usecase of qt for webassembly I found is: https://qmlonline.kde.org/ It's really useful to share some bits of QML but otherwise I wouldn't recommend using Qt for the web as much as I wouldn't recommend to use Flutter for the web.


The pizza demo didn't even let me input text into the credit card input boxes..


These demos remind me of Flash..


I don't even fully understand why "cross-platform UI development" is such a holy grail. Is it that expensive to separate your business logic from UI and write the small UI layer in whatever the platform's "best practice" native language is? Is it that hard to find developers who know more than one programming language? With a lot of these frameworks and higher level abstractions, if you go off the toy-app happy path, you end up fighting the framework and tools more than you're writing your app anyway.


> Is it that expensive to separate your business logic from UI and write the small UI layer in whatever the platform's "best practice" native language is?

I mean... yes? There is a ton of incidental complexity (i.e. unrelated to the business domain) involved in creating nice user experiences. If dev salaries weren’t so high then sure, more companies would probably spend the money to repeat the same work across several platforms, but right now? No way.

That said, I still think I agree that you give up more than you gain by going cross platform, at least for now, but I totally get how companies look at how much it’s costs to hire and says “you know what? I’ll take a cross-platform compromise”


Not to mention the LARGE realm of internal tools where you need something functional as conveniently as possible and aren't trying to drive a consumer-product-level market-differentiated experience.


It also takes time to ensure the feature is developed for all platforms. Due to low usage you may not bother developing for that platform. Thus feature in one platform lag other.

I worked for a company where we did iOS release after very 3 android release coz android was 80% users and iOS 20%. Mind you this was a cross platform Iconic/Cordova app. Now think if we did native. iOS users would have to wait even longer


Companies are too efficient for that, even if dev salaries were cheaper they would still want to fund just one version and pocket the difference, and eventually market competition will make that the norm.


Not only that, but corporations are not everything. What about one and two person shops? It would really be nice to be able to develop a product without first having to invent the universe.


Counterexample: banks started with shitty cross-platform UI type apps, but those received low customer satisfaction figures so most of them have now switched over to native apps. A similar thing happened with Facebook.


The Web is a shitty cross-platform UI toolkit For building apps. It’s fairly popular.


+1

Furthermore users don't care about the technology used to build the application if it works, that's the unfortunate reality.


Users are not knowledgable enough to know what technology was used to build a product, but many have repeatedly complained about non-native UIs.

Heck, Lotus Notes went from being a market leader to an also-ran and user complaints about UX to corporate IT departments definitely played a role in convincing those departments in switching away.

More recently, this also happened with many mobile apps made with cross platform/HTML5 toolkits. They got low review scores and low user engagement across many firms, prompting a switch to native.


Lotus notes UI issues were extraordinary. Nothing comparable to the native iOS vs Flutter app difference


It’s not just a “small UI layer” — there’s an entire stack that goes with it. Want to build iOS apps? Can’t do it on Windows or Linux; you have to buy a Mac, run macOS, learn that whole stack, install Xcode, figure that whole thing out, learn how the App Store works, including all of its rules and regulations. But that’s not all—you also have to figure a CI pipeline for that whole thing too.

Rinse and repeat for every platform.

That’s what makes the web beautiful: you write the app once and it mostly runs everywhere. You have to figure out the infrastructure I described above once and you’re done.

Or at least that’s how it use to be before the major platform players realized how lucrative it is to charge developers App Store fees.


> Is it that expensive to separate your business logic from UI and write the small UI layer

Not sure what apps you've built, but usually that business logic is the minority of the codebase. The rest of the stuff is boilerplate, like drawing boxes, describing layouts, handling events, managing state. All this has nothing to do with business logic.

Ideally, I want to write it once that I want a row of buttons what colors they have and what function should be called when the user clicks on it.

I did what you describe and extracted all the logic in a small component I manage and the result was very banal, extremely straight forward code with was essentially "business logic". The 90% rest was building the UI based on it.


Last major one I worked on that needed to be cross platform was a GPS navigator, which had massive functionality in C and C++ under the hood, called from the platform-specific UI/event handling code through Objective-C-to-C++ on iOS, through JNI on Android, and directly on PC native platforms. It worked pretty well. The ratio of platform-specific to platform-independent code was very small, so it was not like writing the app N separate times. Major engineering savings AND each platform's build had its own UI idioms that users of those platforms were accustomed to. Guess I never realized this was a controversial approach to take!


> Guess I never realized this was a controversial approach to take!

It’s not about controversy. It’s just that in most apps, the UI is far more than 10% of the code base.


>Guess I never realized this was a controversial approach to take!

No, just non-represenative of most apps, who are closer to CRUD than "GPS Navigator".


And write your shared business logic in what language? If it's a C library perhaps you could do this on iOS and Android, but how is that going to run in a browser?

I'm aware of things like the LLVM based C to JS compilers, but they're not really viable for anything non-trivial.

That's why a lot of shops are writing the same logic N times in N languages and frameworks. It can actually be easier than having to target something these wildly different platforms share.


If your business logic is in C - well you are in luck! Use emscripten to compile this to WASM and you can use it in the browser. This approach is very much viable. Large scale commercial web-applications like Figma are written in C++.


I'm aware of things like the LLVM based C to JS compilers, but they're not really viable for anything non-trivial.

emscripten/WebAssembly is pretty viable.


Well, if “viable” means “doable but really fiddly”.

C/C++ is fine on iOS (at least when interoperating with Obj-C, Swift is trickier).

C/C++ is “doable but really fiddly” on Android, same as web. There’s a compiler toolchain but not much IDE support, and you have to do all the JNI marshaling yourself.

So C/C++ is only barely usable for common cross-platform code, and yet it’s the best option. What other language are you going to use?

It’s kind of ridiculous, but that’s the way it is. Programming languages are all the same in principle, but in practice they don’t interoperate well and they can’t easily be used everywhere.


> and you have to do all the JNI marshaling yourself.

After 10 years of Android, while I understand the goal is to force developers not to write unsafe native code, Android team could have already provide better tooling.

However they have always behaved as the NDK was something they had to offer, not something they actually wanted us to use.


> but in practice they don’t interoperate well and they can’t easily be used everywhere.

...and yet, it's still much better than replicating the same code in different languages just to support different platforms.

The idea that a platform dictates the language to be used for creating applications on that platform has always been ridiculous, just because it was the status quo on the web for a bit over a decade doesn't mean it's a good idea that should be copied :/


I at least agree with this! It’s a big shame that the major mobile OS platforms bless only one or two languages for targeting their devices, and are at best neutral, at worst hostile to developing in other languages.


I'm not commenting on any other platforms, but I maintain a few C/WebAssembly libraries and they work exactly as expected without being unreasonably large. C-in-JS has been viable for a number of years now.


I realise it works, I just don’t think it’s really useful for what was asked for, a way to write common cross-platform business logic for a platform-specific UI.

Unless there are some great new tools I’m not aware of, C on WebAssembly seems about the same as C on Android. You can compile stuff just fine, and run it, but actually connecting it up to any substantial UI written in JS/Java is going to be incredibly tedious.

For a computation library with well-defined inputs and outputs, and that “just works” and doesn’t need any debugging in situ, it makes a lot of sense. But I think business logic by definition is going to need a much richer interaction with the UI, and that’s what makes it hard.


The interaction between C and Javascript offered by Emscripten is a lot better than JNI on Android. I wish the Android NDK would steal a few ideas from Emscripten, but all the Android teams at Google don't seem to be able to look outside the nice comfy bubble they've created for themselves.

With Emscripten, you can embed Javascript source code directly into the C code and then call the embedded JS function from the C side as well as C functions from inside Javascript.

E.g. JS embedded in C code:

https://github.com/floooh/sokol/blob/4c56a2ee15d81cac91b738b...

...called from C:

https://github.com/floooh/sokol/blob/4c56a2ee15d81cac91b738b...

...and a C function:

https://github.com/floooh/sokol/blob/4c56a2ee15d81cac91b738b...

...called from a JS function embedded in the C code:

https://github.com/floooh/sokol/blob/4c56a2ee15d81cac91b738b...


Not bad! Sounds like the tooling has improved since I last looked.

How about debugging? Is it possible to step through a mix of C and JS stack frames?


The Chrome devtools have added experimental DWARF debugging support, but for big projects that's still a bit of a hassle:

https://developers.google.com/web/updates/2020/12/webassembl...

The embedded Javascript can be debugged as usual.

In my case I usually debug the platform-agnostic code compiled natively in IDEs like Visual Studio or Xcode, and for the HTML5 specific code (which is just a few hundred lines) traditional "printf-debugging".


Fair enough, and I strongly agree with the general point about the need for a solid cross-platform framework either way.

I don't see why you couldn't write your entire business logic, state management, etc. in C or Rust and treat it effectively like a client-side server, but I've never used wasm in that way so I can't speak from experience there. Either way, I can certainly see how that would require some extra effort, and of course it would only really be useful for applications that don't offload most of their work to a server.


Generally speaking the "connecting it up" between c/wasm + js or C + java/kotlin on android can be completely automated with codegen. It's really not tedious at all.


you release feature X. The first person writes it for the web. The web version was easy, because the feature relied on URL deeplinking, which is nice and easy with browsers.

You then realize that Windows doesn't really offer such a concept as easily. You think about application URLs. That mostly works, but it takes a couple weeks for the Windows team to get it working.

You implement the feature over on Macs as well copying the Win strategy. But a recent Mac OS update causes a bunch of permission popups that mess with another thing. Now you're messing around with that, and your internal users are pissed (cuz they're all on Macbooks).

There is no Linux version, luckily.

I mean... OK, yeah, you still have to deal with platform differences even when using Electron. But you are in the same boat with like.... Slack, Discord, etc etc. You get _all_ that shared knowledge, a unified code base. And in theory you throw any of your engineers at the problem and they can try very hard googling "Electron [issue] windows".

I also bemoan the fact that _even Slack_, with its billions of dollars, didn't feel the need to have a native application. But I do get it, especially when there's a lot of pressure to ship.


While I realise you’re just providing an example, Windows has supported deep linking in one form or another since Windows 3.1 (DDE, specifically topics), but also HTTP-style application URLs (eg app://command?options=opts) ever since ActiveDesktop and WebView.


The blog exactly answers this.

------------------------

Google Pay switched to Flutter a few months ago for their flagship mobile app, and they already achieved major gains in productivity and quality.

By unifying the codebase, the team removed feature disparity between platforms and eliminated over half a million lines of code.

Google Pay also reports that their engineers are far more efficient, with a huge reduction in technical debt and unified release processes such as security reviews and experimentation across both iOS and Android.


That's very interesting in light of the facts that

1) This announcement seems to claim that Flutter 2 apps can be deployed as web apps as well as mobile apps, yet

2) This very morning I received an email from Google stating that pay.google.com is going away and the service can only be used via the mobile app going forward.


> Google Pay switched to Flutter a few months ago for their flagship mobile app, and they already achieved major gains in productivity and quality.

I'm not sure about the quality. I'm bullish on Flutter but the iOS reviews for the app are awful.


>Is it that expensive to separate your business logic from UI and write the small UI layer in whatever the platform's "best practice" native language is?

Yes.

>Is it that hard to find developers who know more than one programming language?

Who said everybody has a team or this luxury?


Because developers only want to work with their favorite language/frameworks and managers don't want 7 different teams.


Working on an app that's running on... 6 different OSs/UI toolkits on last count, yeah, that "small UI layer" is costly. And yes, finding devs that know more than one language/one UI toolkit is hard. (Heck, for some UI toolkits, finding developers is hard period)


Just imagine trying to build a mobile startup company and having to write 2-3 copies of your app (Android, iOS, Desktop). No thanks!

Nobody needs native UI. It's time we get passed that!


People with disabilities frequently do.


Isn't the licensing for Qt a very curious and weird quagmire? Maybe it's better these days but I remember about 10 years ago there was a weird divide and unanswered questions about if you could really take a bet on using Qt and not be violating GPL.


No. 10 years ago it was 100% fine. About 25 years ago there was a licensing issue, and the Gnome project talks about it as their reason to exist to this day (which amounts to spreading FUD at this point, IMO).


It's better these days. For desktop application development, Qt is available under the LGPL and the Qt commercial license.

Qt for WebAssembly is available under the GPL3 and the Qt commercial license, though.


Qt's QML + QtQuick follow the declarative and reactive programming paradigms and use JavaScript, and were released before React existed.


And it has a very nice developer experience :)


QT isn't neccesarily a crowd pleaser, and in 2020 it's starting to look a little long in the tooth. Don't get me wrong though, I love QT on the desktop, and it powers some of my favorite software out there. Ultimately though, I don't think QT's fate is on the web.


Oof remember when PhoneGap was the next big thing? RIP


Pure nonsense, phonegap has been renamed Cordova and is widely used. The Electron of smartphones is Ionic which is a sexy and performant superset of Cordova. PhoneGap (Cordova + Ionic marketshare) has a bigger marketshare than flutter and react native! Source: https://www.appbrain.com/stats/libraries/tag/app-framework/a... Ionic is a gift and it will only get more widespread, the myth that chromium is slow is increasingly dying. Also, did you notice the irony/hypocrisy that flutter is using the rendering engine made by chrome developers for Chrome developers ?


Ionic has released Capacitor as the successor for Cordova. And it's still compatible with Cordova plugins so all the work from Cordova days is not wasted. Ionic is definitely a gift.


I remember big corps betting on phonegap and sencha for mobile 7 years ago. I also remember big corps betting on GWT.

Those were painful days...


Funnily enough, Sencha still can't be reliably recreated by any lib/framework/browser built-ins du jour (without sinking as much effort as Sencha did): https://examples.sencha.com/extjs/7.3.0/examples/kitchensink...


true, just like wysiwyg we have for react/vue/angular is still joke when compared to delphi/visual studio


Time is on webview apps' side. IMO cordova/phonegap got too big too early and the industry still has a revulsion that may not be justified anymore. I don't think they will ever come to dominate, but I do think hybrids will eventually go back to using webviews.

If groundbreaking UX is your core competency you need native. Hybrids get you neither the best feel nor the best dev leverage. Hybrids are selling the exact same dream phonegap has. But they let developers distance themselves from the bad rep and claim they're doing something different. Alternatively, at the other end, they get developers to build essentially native apps while pretending to save a lot of time.


On this note, I have 60% fond memories of Appcelerator Titanium and 40% frustrating memories :)


Yup, really they had the right idea in that it was native components that were hoisted by JavaScript binding... it really lost steam because it became easier to just build native Swift (and later kotlin android). It was a solid play at the problem in it’s time. Note: I worked at Appcelerator in the “gogo” years and it was great, and they/we almost made it happen in a real way.


Man those are some rosy glasses you got. I've got 20% fond memories, 80% frustrating memories : )


> Not to mention that Flutter is already better and easier to use than the existing native tools for both Android and iOS.

No, it's not. It's easier to start with, which is infinitely different from "easier to use". Once you get of beginners phase you see that native toolkits are equipped with battle tested solutions unlike Flutter.

With SwiftUI and Compose there's literally no upsides to Flutter except portability and even that Compose has potential to snatch.


So now every website will require enabled WebAssembly to run god knows what code and I will have to install an anti-virus for my browser? No thanks. JS might be a bad language, but it's even worse in how it's abused with frameworks, tracking, etc for no good reason.

edit: funny how I can discuss extremely controversial political topics here and never have any of my comments killed, but having a negative opinion about wasm and JS frameworks is just a step too far lol.


WASM is still stuck within a highly protected sandbox, so you don't need to run anti-virus software for your browser.


Bitcoin miners?


...that run only when the tab is loaded. Non-issue.


better than rootkits


Wasm can't do anything JS couldn't do already.


There are a few things that WASM can do that JS can't (at least not now):

- Memory management without GC - Unboxed data structures - SIMD - Shared-memory multi-threading - Precompiled snapshots (does not need to be recompiled on page reload)


Bytecode caching has been a browser feature for years[0]

JS has atomics and shared memory arrays which also basically bypass garbage collection [1]

JS had working simd.js implementations in both Firefox and Chrome until they were pulled in favor of WASM

[0] https://v8.dev/blog/code-caching-for-devs

[1] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

[2] https://github.com/tc39/ecmascript_simd

https://blog.mozilla.org/javascript/2015/03/10/state-of-simd...

https://01.org/blogs/2014/bringing-simd-javascript


I should clarify, in the context of the reply I was referring to security. Wasm is inherently as secure as JavaScript.


It can do integers.


BigInt landed in ES2020 and has been supported in something like the last 10-20 versions of Chrome and Firefox, so no huge worries about using it (the "current" browser without support is IE11).

The `123|0` type hint is also recognized and implemented by most browsers too. It forces a 31-bit integer on most platforms (and can offer a significant performance boosts if you're running a tight algorithm).

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...


What JS can do is already bad enough.


> edit: funny how I can discuss extremely controversial political topics here and never have any of my comments killed, but having a negative opinion about wasm and JS frameworks is just a step too far lol.

I'm not surprised. You probably happen to agree with the majority of HN on these topics so the upvotes outweigh the downvotes.


Flutters model really fundamentally isn’t there “right one”. It truly is the successor to Flash, but with Google behind it.

But if you want to make apps that feel actually native on their platforms, React has it handily beat. It’s a better fundamental model, that even with a slower language and runtime feels better in the end by far.


I recently got introduced to the Laravel framework in php. I think it's probably the best implementation of a monolith web framework right now. Php is very simple if you come from c/java and the framework provides you with so much functionality out of the box.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: