News for hackers. Stuff that matters.
Re:Flutter: the good, the bad and the ugly by hardwaresofton on Friday November 23, 2018 @08:23PM (#18519890)
BTW, for those looking for another option other than Flutter and React Native, check out NativeScript[0], or Nativescript-Vue[1].

Nativescript is different from react native because it includes a native call translation layer -- you can write JS that actually uses native runtime objects. It's also got excellent support for cross platform applications that reach down to native on both platforms, and can meld right in with a fully native app as well, and is thoroughly F/OSS (they take the marketplace approach to monetization).

Nativescript different from Flutter in that it has nothing to do with the tirefire that is Dart. Nativescript is OSS and is taking the marketplace approach to capitalizing and recently they got Hot Module Reloading as a result of integrating more closely with webpack/other capable bundlers.

I've recently done projects (one larger client app, another a small personal project) in both and kept some notes on what I liked about Nativescript vs Flutter (I'm pretty biased for Nativescript now), not sure if I'll make a blog post about it but here are some hopefully interesting points:

- Performance tradeoffs are roughly the same for dart vs nativescript, do hard work in an isolate (dart) or webworker(nativescript)

- Flutter's reactivity is 10x more tedious than Nativescript-Vue. Making an entire other class and doing all these overrides for what should be a basic feature is pretty ridiculous, though everyone's fine with it because they just right click in their $IDE.

- Flutter's data management is not great -- everything they've made so far seems like a hack. I'm uncomfortable with the build function being on the state object conceptually, InheritedWidgets are just using context as a grab-bag, the BLoC pattern is so complicated.

- State<MyPage> & StatefulWidget being separate classes and the State<MyPage> having the build function unsettles me. I don't know if it had to be this way because of dart 2's type system (which is subpar in my experience, Typescript is better because it at least offers duck-typed interfaces)

- Dart is terrible. It is a modern language yet it lacks almost none of the advances of modern languages, Dart 2 was a near rewrite and it it still manages to be less compelling than Typescript, and nowhere near languages like Go, Rust, Crystal, etc. I am kind of suspicious google is pushing this language just because they invented it and can control it -- I don't know a single redeeming quality of dart, especially if you consider dart 1 before you consider dart 2.

- Flutter subtly forces you into either Material Design or Cupertino -- this surprised me. Flutter subtly pushes you towards material design, which I have no interest in, and I think most people actually trying to create unique app experiences wouldn't either. This is a double edged sword, in Nativescript you have to seek out native-looking components, but in Flutter they're forced upon you especially at the beginning, and I prefer the former.

- Automatic sending of crash logs to Google -- who thought this was a good idea? And to make it opt-out instead of opt-in?

- Flutter probably has the better longer term viability because it's being embedded into Fuschia and other things google is doing.

- I expect Nativescript to eventually take on WASM and really open up the choices for languages to use with it.

[0]: https://docs.nativescript.org

[1]: https://nativescript-vue.org/

Re:Flutter: the good, the bad and the ugly by Hixie on Tuesday November 27, 2018 @03:45PM (#18546499)
We definitely don't intend to push you into Material... can you elaborate on that? What would we have to change for you to think we were not pushing you into Material?

Regarding the crash logs, it has definitely helped us improve stability. We do try hard to notify you that it's happening. It's opt-out because people don't tend to opt in to that kind of thing and so the data would be more or less useless (not representative of real usage) if we made it opt-in.

Re:Flutter: the good, the bad and the ugly by hardwaresofton on Wednesday November 28, 2018 @09:12PM (#18557515)
Sorry for the delay in response, I didn't see this. I think the problem is kind of endemic -- it's kind of like all the documentation and everything always starts from a Material component. Like if you look at provided scaffolds and you see CupertinoScaffold in the Widget Index[0], you might expect MaterialScaffold to be an option as well, but it's just "Scaffold". Little things like this indicate that you expect "MaterialScaffold" to be the default resting state. 99% of the time when I'm writing an app I have the design already and it may or may not be in material style or Cupertino style -- I personally would expect a framework to offer general tools first then the specializations. There are a bunch of other example of components that only really work correctly in the Material context. It's not a huge thing, and Google does have a pony in the race (which makes it easier for me to tinfoilhat about it), you have every right to push material as the default/make it easier to work with -- but I enjoy not having any such bias with Nativescript, even if it costs me slightly more work to get components that are stylistically coherent with either paradigm.

From an engineering standpoint I absolutely understand the automatic crash logging, it's good that you're able to get the user data. I think you guys are just fine as I'm more tinfoil-hatty than 99% of the usual developer will ever be -- the average developer won't care. I don't know realistically how it could be improved without sacrificing that useful data, but maybe a notice @ install time? I just never saw any mention (I read through the docs, watched lots of video), and was surprised -- maybe the negative impression was amplified because I was having issues with flutter at the time. My thought/reaction at the time was that "Oh so a weird crash and you're sending the details back without me explicitly allowing it? classic google".

To wrap this up, I do want to thank you (I'm assuming you're on the flutter team) for the hard work -- drawing every pixel and building a composable, considered system to do that is very hard, and you've expanded the mobile development landscape, Flutter is unique in it's approach AFAIK, and I mention it any time I talk about the mobile dev continuum. Building flexibly to support multiple embedders is awesome and I'm sure flutter will go far.

[0]: https://flutter.io/docs/reference/widgets

Re:Flutter: the good, the bad and the ugly by Apocryphon on Friday November 23, 2018 @08:49PM (#18519965)
It's always interesting to hear about lesser-known cross-platform solutions. Why do you think Nativescript never got the buzz that React Native, Flutter, Xamarin, or web-focused efforts like Ionic, have?
Re:Flutter: the good, the bad and the ugly by hardwaresofton on Saturday November 24, 2018 @12:32AM (#18520625)
tl;dr - Progress (the company that sponsors Nativescript) doesn't the market/advertising dollars compared to Facebook/React, and Google/Flutter or MS/Xamarin.

Well I think the biggest difference is purchasing power of the companies behind those other solutions in terms of marketing. Flutter has gotten this the most right, so far -- they make very published developer resources, and market aggressively, they have things like the Flutter Development Show[0], and little 30 second clips introducing parts of the platform[1] . It's a good thing (they're innovating in the documentation/dev experience space), but taken cynically it's just a marketing ploy.

I hate to say it, but lately people have been applying the same advertising and marketing logic they use on consumers on developers rather than necessarily making the best product they can and letting word spread organically. It's a bit of a chicken and egg problem -- you usually can only build the best product with help from others, which means getting in front of them, but usually you want to make a good thing so you can justify getting in front of the developers in the first place... So people put out shitty tools, then just iterate after the community shows up and finds out there are lots of rough edges (see: mongo, react, dart, etc).

The last I'll say on the subject is that "developer evangelists" are basically paid marketers/advertisers.

Nativescript also has this thing where it was popular years ago, but has recently seen a surge in popularity -- you have projects like nativescript-exit[2] (which provides a cross platform way to exit the app from JS) that have code from 2 years ago. This is actually a really great point for nativescript, because solidly written plugins like nativescript-exit really are solid -- I very recently used it in a project and it just worked. The integration points available in Nativescript have a very high potential (not to say other platforms don't).

[0]: https://www.youtube.com/playlist?list=PLOU2XLYxmsIK0r_D-zWcm...

[1]: https://www.youtube.com/watch?v=R9C5KMJKluE

[2]: https://github.com/dvabuzyarov/nativescript-exit

Re:Flutter: the good, the bad and the ugly by papasound on Thursday November 29, 2018 @06:29PM (#18565176)
NativeScript really? i had enough of XML in the last 20 years, it's also Telerik, well it's enough of that as well. I really like Fluter's new mindset.
Re:Flutter: the good, the bad and the ugly by hardwaresofton on Saturday November 24, 2018 @12:38AM (#18520650)
lots of grammatical errors in this comment... but this one was the worst:

"lacks almost none of the advances" -> "lacks almost all the advances" (I was talking about the typing stuff...)

Apologies for the repeating of several points... This comment is pretty badly written and I can't edit it now.