Live data from Hacker News

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

developers.googleblog.com

291–300 of 467 posts

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

#291

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…

I’m not convinced that Flutter needs to beat native to survive- it just needs to be better than React Native, Xamarin, and PWAs.

Which is going to be hard. Xamarin these days is really nice to work with.

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

#292

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…

> You can't do anything in it that fills like the web

Why "can't"? In this example they were making a game not a web, and they wanted it to feel like a game. The texts you see there are ultimately a plain old HTML p tag with selection and mouse interaction overridden, but I'd be surprised if you can't change those behaviours.

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

#293
post #268

Earlier quoted context omitted.

No. Mobile Dev is not anything close to web dev : developers don't have control of run time devices. Google is now mandating 64 bit APK for its apps (after years and years of trying) - that's a end device support issue. React native has had 64 bit problems for years. Viewmodel is a lifecycle aware component. Android Q will come with foldable-aware SDK. Will that be supported both on Dart & AndroidX/Kotlin ? Someone h…

As a developer you cannot expect that the technology you learned at university will be used forever ( or actually at all) in your professional life. Schools are supposed to teach you enough of the fundamentals to be able to adapt and learn the tech du jour on your own. The sooner your students learn that lesson the better.

this is not an issue with two languages targeting the same SDK. you are mistaken on these aspects - I'm not sure if you are an android dev, so please forgive me if I'm pedantic.

Kotlin vs Java is the situation you described. They both target the same underlying SDK. For example Pyspark vs Spark-scala. You can program in either, but you are still using the same paradigms - RDD, Graphframes, Dataframes.

Flutter and AndroidX are not even the same paradigm - the lifecycle management is completely different. Android development forces you to think in terms of Activities and Fragments since they are a lifecycle model. Flutter changes it entirely.

I'm pretty sure I can learn it fast, but the issue im asking is about investment. If you are running a company with 100 android devs, where will you invest your training and future architecture research. Or do you believe that the code of an app that's being used by a couple of million users for financial transactions can be ported to a new framework in a jiffy ? Just the testing and validation impact is huge.

The issue is that we are just coming out of a Java -> Kotlin transition that required significant investment on our part. Because of Google making their stand very clear that Kotlin was the future. So now, this is very confusing.

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

#294
post #245

Can someone from the Google team comment on what's going on - https://techcrunch.com/2019/05/07/kotlin-is-now-googles-pref... > Android development will become increasingly Kotlin-first,” Google writes in today’s announcement https://techcrunch.com/2019/05/07/google-launches-jetpack-co... > Google today announced the first preview of Jetpack Compose, a new open-source UI toolkit for Kotlin developers who want to use…

Internal politic wars at Google, with management having popcorns to see who wins at the end. If you are confortable with Qt, JavaFX, Xamarin, there is hardly anything to see with Flutter, plus they are based on programming languages that you actually want to have on your CV, instead of one that was dropped from Chrome and rescued at last minute by AdWords team. Plus, even Fuchsia is not so focused on Flutter anylonge…

I’m sure those are all great cross-platform solutions, and Qt in particular has been around forever and predates smartphones, but you never hear about high-profile app examples that use them. Unlike React Native, which has lost more high-profile companies that previously tried them than I’ve ever heard of any firm using Xamarin.

I wonder why is that. Doubtlessly you can make great apps with say NativeScript, or in Pascal with Delphi or Lazarus, but no one chooses those frameworks for some reason.

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

#295

Love the concept, love the push. But to be sincere, won't touch it with a pole because of Dart. However,... Why o why is this thing not written with/for TypeScript?

I've worked with a few interns that were interviewed and tasked with small scripts and libs to be developed in Dart. Most of the "got" the language in a few minutes, and were productive in a few hours. (Disclaimer: they were all using the IntelliJ community version with the Dart plugin, but hey, tooling is there for a reason).

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

#296

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…

[deleted]

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

#297

Earlier quoted context omitted.

Why not React / React Native?

If i understood it correctly, React Native basically gives you a JS runtime environment that handles communication with native APIs of the system and is shipped with your app. Flutter (and Dart) will transpile into native code and compile natively for your platform. So on React Native you will have that abstraction layer add runtime latency and package size of your app, while Flutter (Dart) really outputs native code…

Flutter gives you native code but not native UI. It reimplements and draws everything itself (mimicking the native look), like Swing or Qt.

React Native is the other way around - real native widgets backed by interpreted/jitted JavaScript code.

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

#298

Earlier quoted context omitted.

True, but (unfortunately) it's hardly an outlier in today's ecosystem.

Try importing `flutter/animation` — footprint goes WAY off the deep end. `animation.ddc.js` is 4.4MB alone (unminified), never mind the rest of the runtime AND userland application code. You can see this in the flutter_web/examples/gallery example. [`webdev build` failed for me in examples/gallery, so I'd love to see what a successfully minified version of that example looks like — I'm currently deeply skeptical.] Co…

DDC stands for Dart Development Compiler. It is a fast modular compiler that you use for quick edit&refresh development in the browser. It does not do any global optimizations, unlike dart2js - which is what you use for deployment.

If you write something like:

    import 'package:flutter_web/animations.dart';

    void main() => print('Hello, World!');
DDC would faithfully compile animations.dart as whole and ship that to your browser.

dart2js would include 0 bytes of code from animations.dart into the output.

> `webdev build` failed for me in examples/gallery

Maybe file a bug?

Here is what I get for Gallery:

    ╭─~/s/f/f/e/gallery ⟨master ⟩ ⟨9s449ms⟩
    ╰─» flutter packages pub global run webdev build
    ...
    Compiled 18,344,245 characters Dart to 1,914,077 characters JavaScript in 27.9 seconds
If I gzip the output I get around 500k.

Gallery uses a lot of Flutter so this is in some sense upper boundary for framework overhead.

Also it is still early days - I can clearly see this pushed down.

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

#299

Earlier quoted context omitted.

I’m not convinced that Flutter needs to beat native to survive- it just needs to be better than React Native, Xamarin, and PWAs.

Which is going to be hard. Xamarin these days is really nice to work with.

Perhaps, but for whatever reason React Native seems to still dwarf it. Maybe the companies that tend to churn out popular mobile apps just don’t invest in .NET?

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

#300
post #29

Earlier quoted context omitted.

As a user, I care quite a bit. As a developer, though, I get paid to tell people that their software doesn’t follow platform UI conventions and I run their code through mental checklists (“does the title animate properly during a controller pop, does this custom view break accessibility”) so I think it’s pretty obvious that I have a very specific slant on this issue. Keeping that in mind, I think that many users do c…

Slant is putting it mild - you gotta start putting a disclosure in these kinds of comments or something. You were a WWDC scholarship recipient, interned at Apple, and seem to base your career on Apple tech. You are not a typical user, you will notice things most ordinary people would never think to notice. The vast majority of apps on a phone aren't even kept open by a user long enough for it to matter. I say this as…

I agree. I have an app that is made with Ionic and has about 16,000 paying users. The target group aren't techies/designers. Nobody ever wrote me something like "your app feels weird". Users care more about what problem they can solve with the app.

One of my competitors has a native app, but they require an internet connection, and saving a data point has substantial lag. Parts of the UI (a graph) require a few seconds to be fully loaded, whereas my stupid Ionic app renders much bigger graphs much faster, has no "saving" lag, works offline etc.

My point is: you can screw up a native app easily as well, especially if you don't keep in mind what's blocking and what is not. Sure, at the end of the day, you can squeeze more performance and a better feeling out of a fully native app than anything Cordova-based, but this 5-10% optimization is something that non-techies really don't care about (unless maybe your app has no other USP).

Post reply on HN