9 ms·
Flutter and Chrome OS
- seba_dos1 7y agoThat "seamless resize" GIF looks like a joke. I had to reread the paragraph a few times to make sure it doesn't show an earlier stack being now replaced with Flutter.
- lern_too_spel 7y agoiOS and Android apps didn't support resize until recently. Adding resize support requires additional, though usually small, work (listening to resize events). Presumably, this means that Flutter for Android does this automatically.
- Jare 7y ago> Adding resize support requires additional, though usually small, work Adding good resize support may require a serious rearchitecture of your display engine.
- saagarjha 7y agoiOS does not do live resize, FWIW.
- seba_dos1 7y agoIf resizing is a recent addition there, there's absolutely no excuse for what's seen on this GIF. It literally looks like a "this is why Wayland is better than X11" GIF, showing the X11 way.
- csande17 7y agoYeah, it almost looks okay until you notice the "demo" banner on the top-right sliding in and out of view as the system struggles to update the window layout.
- netdur 7y agoThat means the app is running on VM with debug mode, it is slower than production mode which is native not on VM.
- landr0id 7y agoWhy not run in release mode then to really show capabilities? Poor choice.
- seba_dos1 7y agoSo if hello world is that slow, imagine launching anything non-trivial in debug mode to debug it :P
- CraftThatBlock 7y agoDebug mode has the same performance for 10 lines vs 25k lines, it's really just that it's running in the VM, and has debugging symbol. Performance is almost the same as compiled in my experience, although things like launch and resizing are slower due to how the VM works
- Barrin92 7y agoIs there also planned support for Flutter on a plain old linux desktop, and if so is there a timeline for it?
- markdog12 7y agoI believe so: https://github.com/flutter/flutter/wiki/Desktop-shells#linux https://github.com/flutter/flutter/wiki/Desktop-shells#linux
- nvrspyx 7y agoWill Google ever provide a Chrome OS “distro” to install on non-Chromebook machines? 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. [1]: https://www.neverware.com https://www.neverware.com
- sowbug 7y agoDoubtful. Chrome OS without Verified Boot isn't Chrome OS.
- qhwudbebd 7y agoSomething similar I've wondered about is grabbing a (full) Chrome OS filesystem image and running the compositor/browser/interface in a chroot with a Linux installation more to my taste on the outside, including up-to-date upstream kernel, etc. 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.
- chronogram 7y agohttps://github.com/imperador/chromefy https://github.com/imperador/chromefy does a good job at that. 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.
- nvrspyx 7y ago> Using community built images of Chromium OS and scripts that “hack” it into a Chrome OS installation has been a huge pain. 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.
- qhwudbebd 7y agoIt wasn't quite clear to me from the article: are the resulting Flutter apps running under the Android emulation layer or are they proper Chrome OS apps? 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.
- csande17 7y agoFrom the article: > 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?
- qhwudbebd 7y agoAh, that's a shame. I don't think I'd want to use something that pulled in messy Android as a dependency on Chrome OS.
- krzat 7y agoThey may create dedicated shell in future. Proper desktop support in flutter is in very early stages currently.
- petecox 7y agoDart did transpile to JS, so a WebAssembly backend for a 'web native' Flutter experience on Chrome OS is imaginable. But their app delivery platform is the Google Play infrastructure, which packages Android apps.
- pjmlp 7y agoBecause this is Flutter/Dart team pushing their agenda, not the ChromeOS team embracing Flutter. 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.
- 0x70dd 7y agoIf I understand correctly, Flutter embedders use a low level rendering API that renders the UI similar to how a game is rendered - skipping native widgets altogether. This makes me wonder what's the battery consumption? Is it similar to electron?
- jcelerier 7y ago> This makes me wonder what's the battery consumption? Is it similar to electron? what makes you think that native widgets are the most efficient ? in the end what matters is how slim are your GL calls.
- kitsunesoba 7y agoNative UI toolkits (with “native” defined as system standard) have system hooks and access to functionality that third party toolkits don’t. Not sure about Android but on iOS I’m pretty sure that a Flutter app would have a battery impact closer to that of a 2D game than a traditional app, even if it’s reasonably efficient.
- skybrian 7y agoGames tend to animate all the time at 60 fps. That drains battery. Flutter is more like a regular UI in that it animates, but stops when idle. Though you could write a game in it.
- jcelerier 7y ago> Native UI toolkits (with “native” defined as system standard) have system hooks and access to functionality that third party toolkits don’t what makes you think that ? the time when scrollbars were rendered in-kernel is long gone.
- saagarjha 7y agoI believe the current situation is that first-party toolkits have much more insight into the OS and underlying platform than third-party developers can afford.
- tpush 7y ago"Because Chrome OS runs Android apps, targeting Android is the way to build Chrome OS apps." So, does that mean that Flutter apps for Chrome OS are limited by the Desktop capabilities of Android?
- CraftThatBlock 7y agoYes, since Android apps on Chrome OS actually have the most access to the system, more than websites.
- zengid 7y agoThis push to extend Flutter to be a UI solution for all kinds of platforms is really exciting. It looks like a huge piece of the puzzle is FFI support in the Dart VM, and it looks like they're working on it [0]. I think that basic support is going to be really important to give Flutter better support for rich multimedia like audio rendering. [0]: https://github.com/dart-lang/sdk/issues/34452#issuecomment-482136759 https://github.com/dart-lang/sdk/issues/34452#issuecomment-4...
- josteink 7y ago> This push to extend Flutter to be a UI solution for all kinds of platforms is really exciting. If they want it to be everywhere, they have to stop basing it on Dart.
- dstaley 7y agoWhat's an alternative AOT compiled language that's as accessible as Dart that also compiles to JavaScript? I don't think there's another more obvious choice.
- josteink 7y agoIt only needs to be compiled to Wasm these days and not pure JS. 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.
- dstaley 7y agoWASM isn't yet a viable candidate for a complete application. There's a lot of proposals out there to bring it in line with what you can do via JavaScript, but there's still a lot of things that JavaScript can do more performantly than WASM. Using a WASM language also means that interop with existing JavaScript is a bit of a hurdle, so I still feel that Dart is a good choice. That being said, there's nothing particularly interesting about the language itself; I'd feel the exact same way about any other language if they also compiled to pure JavaScript.
- hit8run 7y agoReminds me of Google Web Toolkit (GWT) back in the early 2000s. All of a sudden Google lost interest and kind of pulled the plug. This technology seems too risky for me to use in production right now.
- riku_iki 7y agoWhich UI browser framework has lifespan longer than GWT?
- coldtea 7y agoVanillaJS for one: http://vanilla-js.com/ http://vanilla-js.com/
- riku_iki 7y agoIt doesn't look like UI framework (templates + some MVC + components library) but more like set of small helper libs for JS.
- CraftThatBlock 7y agoThis is satire, VanillaJS is literally JavaScript. The import file is empty.
- skybrian 7y agoAnother way to think about it is that most web developers outside Google lost interest in GWT long ago (if they ever tried it), and Google was one of the last holdouts. It was also a rather gradual process. The team moved on to j2cl, but there are still occasional commits: https://gwt.googlesource.com/gwt.git/+log/refs/heads/master https://gwt.googlesource.com/gwt.git/+log/refs/heads/master
- leerob 7y agoAs someone who worked extensively with Dart in a previous role, I'm not sold on Flutter. 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 https://github.com/devhubapp/devhub
- netdur 7y agoNPM is enough reason to not use javascript but I haven't touched javascript since introduction of typescript.
- chrisco255 7y agoWhy? NPM is a fantastic package manager.
- TomMarius 7y agoBut a disastrous registry
- yegle 7y agoNPM introduced a new type of code injection.
- solarkraft 7y agoCould you explain the code injection vulnerabilities present in NPM that other package managers don't have?
- k_bx 7y agoI wish Google would develop protocols instead of frameworks, and only then put Dart (and others) on top. This way people would be able to choose their language on top, e.g. I'd love to use Elm, for one. No runtime errors, no mutability, opinionated built-in FRPish architecture. Dart has none of that.
- skybrian 7y agoThat's quite a tall order since any general-purpose UI framework is going to have a huge API surface area. 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.
- k_bx 7y agoWell, HTML is one example of general-purpose UI framework that's separate from JavaScript in a way that lets you replace JS with something else. Why can't something similar be done for Flutter components? 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.
- skybrian 7y agoThe HTML DOM API is in no way separate from JavaScript. It's a mutable API that's tied into the JavaScript garbage collector, uses inheritance (unlike some languages) and uses JavaScript values in method parameters and return values. The only way to access it (once a web page is loaded) is through JavaScript. 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.
- didip 7y agooof, the resize GIF is not selling it, actually it has the opposite effect to me.
- bsaul 7y agoFunny to see how iOS / Apple is currently working on their own cross-platform tech (marzipan), which means running iOS app on macOS with minimal changes (time will tell what this thing ends up looking like). On the other side, google is releasing a cross-platform tech that's actually cross-platform. As a currently mostly iOS native dev, i must say this makes me a bit nervous.
- fauigerzigerk 7y agoThe question is whether there is room for anything between actually cross-platform web technologies and actually native toolkits. So far, the success of technologies in between those two has been rather modest.
- kderbyma 7y agoIs it just me or is Google doing everything it can to 'use' Linux but not truly make things based on Linux.....why not just make a proper distro
- slezyr 7y agoHow would they lock-in their users then?
- watermans 7y agoWhat is the advantage of writing a Flutter app over a PWA or something like react-native?
- farahday 7y agoWhy don't you take literally 5 seconds to google that basic question? That question is answered on every flutter article, including OP.
- watermans 7y agoI did read the article and reviewing it again and searching for "react," "progressive," and "pwa" returns zero results. 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.
- sebe 7y agoI'm interested to try flutter out on chromeos, I might get a chromebox, the acer and hp i5 U series are the recommended ones for Android development. Developing flutter without the need for a simulator or a phone connected via usb, is cool. Maybe the next step is develope android flutter apps on android. 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 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.
- forgot-my-pw 7y agoFlutter probably wins in performance, but for smaller apps, React Native might be faster to develop. You should read on articles about apps that convert from React Native to Flutter to learn why they chose to do so.