3 ms·
BTW, for those looking for another option other than Flutter and React Native, check out NativeScript[0], or Nativescript-Vue[1]. Nativescript is different fro
by hardwaresofton 8y ago
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 https://docs.nativescript.org
[1]: https://nativescript-vue.org/ https://nativescript-vue.org/
- Apocryphon 8y agoIt'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?
- hardwaresofton 8y agotl;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-zWcmJ1plIcDNnRkK https://www.youtube.com/playlist?list=PLOU2XLYxmsIK0r_D-zWcm... [1]: https://www.youtube.com/watch?v=R9C5KMJKluE https://www.youtube.com/watch?v=R9C5KMJKluE [2]: https://github.com/dvabuzyarov/nativescript-exit https://github.com/dvabuzyarov/nativescript-exit