Live data from Hacker News

Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

developers.googleblog.com

421–430 of 467 posts

Re: Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

#421
post #368

Earlier quoted context omitted.

Yes, Flutter is still there. I didn't say it was removed, only that it is being downgraded to one among many options.

I don't think scenic is written in Rust. A big chunk of the source code in the topaz layer (the view layer) is still written in dart. With that said, many were actually surprised when it was revealed that ermine (the new fuchsia shell) was written in dart/Flutter [1] since earlier code for it was in Rust [2]. Guess that didn't pan out. [1] https://fuchsia.googlesource.com/topaz/+/refs/heads/master/s... [2] https://fu…

Who said anything about Scenic being written in Rust?

Re: Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

#422
post #415

Earlier quoted context omitted.

For embedded devices the only good toolkit is Qt and the licensing costs are pretty high. Flutter for embedded is interesting in this regard.

Flutter is very similar to Qt: signals and slots are similar to streams and sinks, and the BLoC pattern is similar to the state machine paradigm in Qt. I've been loving Flutter and Dart, developing with it seems almost too easy.

With the big difference that JavaScript and C++ are CV worthy languages, while Dart is fighting for its survival.

Re: Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

#423
post #239

Earlier quoted context omitted.

(I'm the Flutter TL.) As far as the bit about Flutter goes: Flutter was started by engineers from the Chrome team, and myself (who worked in the open source team as editor of the HTML standard). We had no relationship with the Dart team at all until some times into the project, when we were looking around for a language to replace JavaScript in our project (codenamed Sky at the time). We considered a large number of…

What other Javascript replacements did you consider?

Languages I recall us considering include: Java, Kotlin, Swift, C++, Dart, Lisp, Lua, ObjectPascal, Python, C#, Go, Rust, TypeScript, JavaScript itself, Perl.

I wish I had our notes from back then, but I looked for them recently and couldn't find them. Our best theory is we did it on paper or on a whiteboard. :-(

Re: Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

#424
post #311

Earlier quoted context omitted.

What makes you think Flutter is in any way similar to Flash?

the way it is tied into chrome with "native" apis and only difference as far as I can tell is the fact it ships the "runtime" along with itself instead of it being everywhere as flash was. Resulting in massive sizes for mobile apps

We compile to JS for execution on the browser. We don't use the NPAPI or Pepper plugin APIs. We intend to work on any standards-compliant browser. (I used to be the editor for the HTML standard, so I have some skin in this game.)

What size would you consider acceptable for a mobile Web app?

Re: Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

#425
post #100

Earlier quoted context omitted.

You didn't even mention the Closure library which was released and then practically abandoned. We invested so much into Closure where I worked, with the promise that this is what Google used internally, when suddenly Angular dropped out of Google and that sucked up all the oxygen in the room.

I mean, okay, but which other things that you would have selected would still be a good choice today? Would you be happy if you'd gone with Ember or Backbone?

Yes we looked at all of those as well as Sproutcore. There weren't a lot of good options. Lots of people were using ext.js and yahoo ui library and dojo. Closure was among the better options at that time.

Re: Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

#426
post #166

Earlier quoted context omitted.

Pardon me making a joke at your expense cornstalks, but... Is this what a culture that AB tests 34 shades of blue looks like? I think we can handle the conversion here in the HN comment section !

Ha, at first I thought "cornstalks" was a new slang reference for Googlers and was just over my head.

Well if it wasn’t, it certainly is now. Thanks for that typeformer.

Re: Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

#427

It feels wrong architecturally for Google to be pushing this right now: 1) Dart was intended as a Java like language and is inferior to Kotlin, a language they just endorsed on Android yesterday. Dart feels like a step back, not forward. The message is confusing from Google on this front. They have a huge Kotlin developer community already. Why push Dart at all? 2) World + dog is moving towards compiling Kotlin and m…

If you just look at the languages, Kotlin has a lot of nice features that Dart doesn't currently have. Non-nullable types, extension methods, and data classes are on the top of my mind.

If you look at Kotlin and Dart as implementations, then there are differences under the hood. Kotlin is deeply married to the JVM. That has a lot of obvious pros: you can seamlessly interop with your existing Java code, reuse the existing JVM ecosystem, and incrementally migrate your code to Kotlin a file at a time. There are trade-offs to this, though. Kotlin fundamentally doesn't own its runtime. It gets the JVM for free, but anything the JVM lacks, it has little easy way to acquire.

Dart is both its own language, and its own ecosystem and runtime. This means the adoption cost is higher, and our growth has been slower. We had to build more from scratch. But the return on investment is that we have a runtime that is deeply tuned for Dart and the needs of our users. For example:

* Our garbage collector is tuned for the frequently-allocated but short-lived objects that get constructed every frame by a reactive framework.

* When you deploy your app, we compile your Dart code ahead of time, all the way to machine code, statically link in the runtime, and give you a standalone native executable. Our deployment model is closer to C/C++ than to Java or C#.

* Our runtime object representation faithfully understands the full language. For example, there's no type erasure, and generics are represented at runtime. You can ask a list if it's a List or List at runtime and it will tell you true.

* We can expose interesting debugging, profiling, and other diagnostic hooks from the runtime to tools. For example, the Flutter Inspector [0] will show you the bounding boxes of every widget on screen from the running app on your device. Touching one navigates your IDE to the corresponding source code. We can do that because we have the ability to plumb things all the way through the IDE, parser, compiler, runtime, and debugger, because it's all a custom stack.

* Likewise, the near-instant hot reload stuff we do works because the language design, Flutter framework design, IDE integration, compiler, and runtime all work in concert to enable that. Even non-obvious things like the fact that static fields are lazily initialized in Dart make this stuff easier.

Of course, the Kotlin+JVM advantages are real too. It's a question of which trade-offs are right for you today, and tomorrow. One thing I'm particularly excited about right now with Dart is that we're in a much better places to evolve the language quickly now that we've moved to 2.0, a full static type system, and a shared front end.

Right now, we're implementing non-nullable types. Ours will be fully sound, unlike in Kotlin and TypeScript, because they have to handle values flowing in through interop. We're also implementing extension methods. I'm hoping we can do something a la data classes not too long after. If we pull that off, I hope users will feel that we're at parity at the language level and then it becomes more a question of which tools are the best ones for your need.

[0]: https://flutter.dev/docs/development/tools/inspector

Re: Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

#428

This is the example flutter app for the web - https://www.nytimes.com/games/prototype/kenken#/ This is flash. You can't do anything in it that fills like the web - no copy paste, right clicking causes things to happen. I don't expect games like this to have links and proper bookmarkable urls, but I doubt it'll work as expected if it did. This is the epitome of the problem with flutter - it re-implements the UI, creat…

> There's a reason why flash died out

A never-ending parade of actively-exploited security bugs?

Re: Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

#429

Earlier quoted context omitted.

Package size for Flutter apps is a lot larger than RN, even the RN Android build that ships it’s own JS runtime. There are complaints everywhere of simple apps reaching 100MB size. As for runtime latency, I’ve recently worked on a RN app that outperformed its native sibling. Looking forward to the Fabric release.

Not really true, you are likely comparing a debug build. An Android Flutter apk sits around 4MB for smallest app. Most of my apk sizes are around 8MB-10MB w/ Flutter

I haven't written any myself, going from reports online that builds are a lot larger than expected. That minimum size is for an app without any components or other modules. The RN app I mentioned was ~6MB with a fully blown app, state management, heavy data layer, hundreds of components, animation, i18n, a handful of native modules, encryption, and so on.

In short, Flutter doesn't really have any advantage in size over RN.

Re: Flutter: a Portable UI Framework for Mobile, Web, Embedded, and Desktop

#430

Earlier quoted context omitted.

Why not React / React Native?

React Native has a JavaScript layer that hurts performance and it is not truly native as they say. Just do a reach on flutter vs react native and you'll see better explanations and comparisons.

I’m not sure this really matters for a lot of things anymore. Sorting a few hundred text items in a list, for example, is going to be so fast on modern smartphones that it will not make much of a difference whether it’s done in JavaScript or native.

Maybe a poor example, but I suspect the only times it really makes a difference is significantly computationally expensive tasks

Post reply on HN