Learning Lab
Published in

Learning Lab

Flutter vs NativeScript: a Web Developer’s perspective

#13 — A comparison between Flutter and NativeScript from the eye of a web developer

How to learn Flutter?

Once again, I followed the Learning Lab methodology.

  1. Defining the scope of the topic
    The scope of this topic is knowing how to start a flutter project and how it is structured and therefore learning Dart’s syntax.
  2. Choosing a learning resource
    I only used one resource, the official documentation, it’s very good and complete: https://flutter.dev/docs
  3. Defining a project
    I took one of the projects I had in my backlog of ideas that we agreed on with my friend: Infinideas — An infinite feed of crowdsourced ideas (from Twitter and Reddit).

Things Flutter do better than NativeScript

Let’s start with the positive side of Flutter 👍.

Performance

The app built with Flutter is more responsive than the one I built with NativeScript, especially the scroll it’s sleek! Nevertheless, we can see some lag on the animation when opening a webview!

Integration with Android Studio and VSCode

Installing Flutter is very easy and it integrates itself perfectly in both Android Studio and Visual Studio Code thanks to a very good official extension.

Debugging

Debugging is very easy because of this strong integration described above but also because Flutter uses Dart’s language which is typed. It will not compile if types are not respected which is not the case with NativeScript and can lead to some errors and a lot of time for debugging.

Community

Both Flutter and NativeScript have a good community. I was using a lot the NativeScript Slack full of nice and helpful people, and issues on Github or StackOverFlow to solve most of my problems. Nevertheless, Flutter’s community seems a bit bigger since it has more canals, you can see it here: https://flutter.dev/community

Things both Flutter and NativeScript are good at

Let’s be honest, both Flutter and NativeScript are very good framework they come with a lot of good stuff 🙂.

Command Line Interface

Both Flutter and NativeScript comes with good CLI tools, that you can use to install updates, libraries, or just to check if everything is good (type tns doctor or flutter doctor )

Build in the cloud with Codemagic & Sidekick

Thanks to Codemagic and Sidekick you can build and sign your app (Android and iOS) in the cloud without having a Mac! That’s awesome for a windows user like me. Note that I didn’t try Codemagic, it’s more a CI/CD tool for Flutter whereas Sidekick is a GUI tool to manage your NativeScript project (run, build, change assets, icons, …). Also, there is not an official tool for CI/CD tool for NativeScript, you can use any such as Travis or CircleCI.

Libraries

At the time I am writing there are 3246 Flutter libraries and 1200 NativeScript libraries. It’s a strong advantage for Flutter that is younger! But keep in mind that you can use many of the NodeJS libraries with NativeScript since the app comes with a Node runtime. Similarly, Flutter apps can use any Dart library!

Things NativeScript do better than Flutter

Flutter is good, but it has a lot of downsides, at least for the web developer that I am 🤔!

Framework choices

NativeScript is perfect for Frontend Web Developers you have the choice between Angular, VueJS or simple Vanilla JS with XML for templating.

Templating language

Templating languages is for me what is totally missing in Flutter.

This is how I felt while building the UIs with Flutter!

Separation of concerns

In both previous example I poorly did the separation of concerns, I know! I should have the content out of the template, my bad, it was just faster to do it like this.

Ease to build a web version

Flutter let you use the same codebase to build a web version but the web version will look exactly look like your mobile app as you can see in this example: https://flutter-web-demo.firebaseapp.com

Ability to test on an iOS device from a Windows laptop

Last but not least, thanks to Nativescript Sidekick, I was able to test on an iOS device from my windows device, and that’s awesome.

Check out the result

Check out Infinideas our new app built with Flutter 🚀

Conclusion

Both Flutter and NativeScript are very good frameworks. Even though I prefer NativeScript, my friend Etienne enjoyed developing with Flutter 🙂.

--

--

How to learn one topic every month

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sandoche ADITTANE

Hello, I’m Sandoche Adittane. I learn about one topic every month and write a post about it!