Flutter and Chrome OS
developers.googleblog.com
developers.googleblog.com
[0]: https://github.com/dart-lang/sdk/issues/34452#issuecomment-4...
If they want it to be everywhere, they have to stop basing it on Dart.
That means pretty much any existing language with a natural following and a LLVM-based compiler can be a reasonable candidate.
Dart literally has no natural/non-artificial following or use-cases outside Google. Trying to sell Dart via Flutter will only harm Flutter and nothing else.
People not interested in Dart won’t change their mind over yet another UI framework.
What do you consider a "non-artificial following"? There is definitely a community around the language, and other companies have certainly used and are currently using it.
For the vast majority of use cases, JavaScript (or TypeScript) is going to be a better solution than Dart.
Like it or not, JavaScript is the #1 player on the web and if you're trying to scale and share resources or code at all, you want your engineers to be proficient in JS. Yes, Dart is similar, but it's not JS. And it's not _just_ the language: it's the ecosystem. Linting, formatting, package managers, debugging issues, Googling problems, Stack Overflow answers, etc.
Also - Guess how much of that Dart specific knowledge was useful in my current role? None. It's gonna be hard to hire devs who want to work on Dart IMO.
My opinion: You can have Android, iOS, Web & Desktop with 95%+ code sharing between them using React Native + React Native Web -> https://github.com/devhubapp/devhub
As someone who doesn’t use much JS/npm, but who did work with dependency graphs in software systems in a former life, my (largely academic) study suggests that this is an intractable problem in npm — that is, a solution is such a big change from npm foundational usage that it’s far more likely to be solved with an npm replacement than an npm change. I would welcome sources that either refute or confirm this.
If you really dislike NPM that much, GitHub might be here to save the day.
I have absolute no idea how to fix package management for javascript, NPM has its own problems that long fixed by other package mangers for other languages, it been years NPM still broken.
JS might be the #1 player, but there's no reason to be against attempts to challenge the status quo.
Now try justifying that ideology to upper-management :)
There were so many benefits to the PC compatible/DOS monoculture in computing. Competition drove down prices, the need to be compatible meant that many new advancements were done in a standardized way, and everybody got a flourishing software ecosystem to use. Monocultures come with _tradeoffs_, but you could argue that without a few of them coming along at the right time, computers would be way behind where they are now.
In a decade, Apple has had little trouble convincing developers to take up not one but two weird languages statistically nobody was using before. I don't think the languages themselves (and even their ecosystems) are what drives or fails to drive adoption.
Are we talking frontend or backend here? Historically JS has ended up 'king' solely because it's the only language browsers support - but do you not think WebAssembly has the power to change things here?
And on the backend... I'd dispute that it's used for a majority of backend applications. Perhaps a majority of new applications?
Try: https://github.com/obsidiansystems/obelisk
Example app: https://github.com/srid/Taut
Dart is meh, but because Google owns it, they can change it to Flutter needs (and they are already doing that). I can see it becoming very nice language in few years, but right now it's good enough.
Adding good resize support may require a serious rearchitecture of your display engine.
I’m aware of things like CloudReady by Neverware[1] which seem to have some investment from Google, but last I checked, it did not have support for Android or Linux. Using community built images of Chromium OS and scripts that “hack” it into a Chrome OS installation has been a huge pain.
I’d love to test a full-featured Chrome OS on my machines, but I’m not dropping money for a Chromebook despite how cheap they may be because I have plenty of machines that it could run (with good performance) on.
Could perhaps even prune away all the stuff that's not used/wanted in this configuration. Essentially using Chrome OS as an alternative and conveniently pre-built graphical interface on the front of a proper Linux box, give the only non-command-line program I use is a browser anyway.
I've not actually tried doing this, so maybe it's just doomed to failure or has more downsides I haven't thought of than upsides.
After trying it out and looking into it more, as well as trying out a normal Chromebook, Chrome OS just doesn't seem very interesting to me. You can't even disable mouse acceleration or set a hostname, and the devices are stuck on the same kernel forever. Bit of a let down, although the A/B root is nice.
That's actually the exact project I was referring to with the quoted bit above. I was on mobile and didn't have the chance to look up the exact project. However, I had a bunch of issues when I tried it months ago. I don't necessarily blame the script because I'm not sure if the trouble was caused by the script, my hardware, or user error on my end. I didn't really have the patience for it since I could get all the same functionality from any run-of-the-mill Linux distro (Fedora in my case) + Chromium + Anbox.
It's great that Chrome OS can run legacy Android stuff, but it'd be a shame if the ugly design of Android started to leak into Chrome OS proper in a way that makes it hard/impossible to deprecate.
> Because Chrome OS runs Android apps, targeting Android is the way to build Chrome OS apps.
The screenshot of "The Flutter ChromeOS lint rules in action" also appears to show an Android app manifest.
Which, honestly, seems like kind of a strange design to me. The whole point of Flutter is to be a cross-platform app framework; why not just add a ChromeOS backend to it instead of running the Android version inside an Android emulation layer?
But their app delivery platform is the Google Play infrastructure, which packages Android apps.
Just like the Android team, usually answers with a political correct "It is nice to have options" when asked about Flutter and Android. They were pretty clear at this year's IO that Android's future is now Kotlin, with Java takind a 2nd place and C++ a 3rd one.
"Because Chrome OS runs Android apps, targeting Android is the way to build Chrome OS apps."
Note that they're not saying it's a good way to build Chrome OS apps, they're saying it's "_the_ way to build Chrome OS apps".
The article is about chromeos and flutter, to make it clearer, they could have said, "targeting Android is the way to build, Flutter, Chrome OS apps."
Targeting Android to create Flutter chromeos apps currently seems to be the go, this may change once flutter for the web and or the linux desktop support is fully baked.
Right now, Google seems like a rudderless ship floating in a sea of possibilities created by a bunch of very talented kids suffering from ADHD.
I think someone at Google should grab the helm and actually do some steering.
"Flutter was started by engineers from the Chrome team, and myself (who worked in the open source team as editor of the HTML standard)." https://news.ycombinator.com/item?id=19856079
Your comment highlights one potential downside, ie. people not trusting the company because it looks confused on the outside.
> Because Chrome OS runs Android apps, targeting Android is the way to build Chrome OS apps.
> targeting Android is the way to build Chrome OS apps
I don't think this is "legacy" as far as the Chrome OS developers are concerned. Android emulation is newish and improving. Before that, Chrome apps were written in JavaScript using a similar API to Chrome extensions. (They used to run in any Chrome browser, but were deprecated except on Chrome OS.)
It looks like this is going to be an OS where all apps run in a sandbox of some sort. Nothing is really native, but there is a variety of sandboxes.
It's a bit murky at the moment. It seems like they plan to do a full rewrite for the open web but right now they have the Android stack working in ChromeOS and that let's you start building flutter apps in a windowed, mouse and keyboard environment.
what makes you think that native widgets are the most efficient ? in the end what matters is how slim are your GL calls.
Flutter is more like a regular UI in that it animates, but stops when idle. Though you could write a game in it.
what makes you think that ? the time when scrollbars were rendered in-kernel is long gone.
This is a significant power consumption concern.
How, if at all, does this work with Flutter? Seems like it would be like trying to get a screen reader to describe a game.
I don't think this is supposed to be the case, from reading the documentation. But I can't get any labels inside my application to be read aloud.
As a currently mostly iOS native dev, i must say this makes me a bit nervous.
So far, the success of technologies in between those two has been rather modest.
So, does that mean that Flutter apps for Chrome OS are limited by the Desktop capabilities of Android?
It was also a rather gradual process. The team moved on to j2cl, but there are still occasional commits:
But Elm runs in a browser, so it should work fine on Chromebooks.
I guess you could use the Linux container for Elm development, but I don't know what the rough edges are for doing web development that way.
There's an example of elm-bootstrap library, where bootstrap components were reused, but Elm logic was added on top instead of JS one. Why wouldn't refactoring Flutter into Flutter-core similarly work?
Also, I didn't understand your comment about the container and how it's related to this.
To interact with it from another language, you need at least an adapter layer that does foreign function calls to JavaScript, or you need to compile the entire language to JavaScript like Elm does. Elm works because Elm is specifically designed to compile to JavaScript and they put a lot of effort into making it smooth. (And bootstrap is part of the same JavaScript ecosystem.)
In theory you could do the same thing for Flutter by compiling some other language to Dart. It seems unlikely anyone would make the effort any time soon, though.
Regarding the Linux container, it's not directly related; I was just pointing out how someone might do Elm development on a Chromebook.
I think the article opens by stating a pretty strong disadvantage:
Flutter apps run as Android apps and so are less "native" than something like a PWA or react app, which would just run in the browser.
The article doesn't address my concern at all and I was hoping to have some constructive feedback about that concern, which did not happen.
With regards PWAs, maybe more so on mobile, flutter apps are AOT, Ahead Of Time, compiled for release so they should have better start up times than apps that run on a vm.
The flutter wiki has stuff on the diffent modes. https://github.com/flutter/flutter/wiki/Flutter%27s-modes
Debug mode "Optimizes for fast develop/run cycles." runs on the Dart VM and allows for statefull hot reload.
You should read on articles about apps that convert from React Native to Flutter to learn why they chose to do so.