1. 13

tldr: There is a side project I’d like to build, and I’m wondering if Dart & Flutter is the way to go for the app development.

I’m a backend dev, so I’m not worried about the db or api. But, I have very little experience with mobile, and… not to be too harsh… but I’m curious if it’s worth it to learn Dart & Flutter for the apps.

Just so it’s clear, I don’t care what the “hottest” framework or language is. I’m more concerned about building something for fun, and getting valuable experience at the same time. I respect all the work many people have put into Dart and Flutter, and I’m impressed by what it can do. That being said, if Dart is something that won’t be around after a few years, then I’d rather not spend my time using it for this project, and do it with different technology / do a different project.

I don’t know much about the language or the decisions being made by Google in terms of the project, so I would appreciate your thoughts. I’ve only ever made two apps with Dart & Flutter.

Thanks!

  1.  

  2. 9

    If you haven’t built it yet and want to target mobile, skip native for now and just build a Progressive Web App (PWA). It’s (arguably) easier, has a wider reach, and doesn’t lock you in to app store ecosystems. Plus there are some technologies that actually let you minimize the actual amount of JavaScript or native code that you need to write and still maintain an almost-native look and feel, e.g. Ruby on Rails with Turbolinks and Stimulus ( https://youtu.be/SWEts0rlezA ), or the upcoming Phoenix LiveView ( https://dockyard.com/blog/2018/12/12/phoenix-liveview-interactive-real-time-apps-no-need-to-write-javascript ) which I’m really excited about.

    1. 3

      It’s important to note that not all mobile phone APIs are available to a PWA (notably the storage story is non-trivial), and in my personal experiment performance seemed somewhat worse (though it was a one off and I’m not an expert, so I may have just botched something).

      1. 3

        True, PWAs are not equal to a native app. But if you haven’t actually built anything yet, and don’t know anything about native development (i.e. if you’re at the ‘Should I learn Dart?’ stage), they are an easier starting point, with a wider reach.

      2. 1

        just build a Progressive Web App (PWA)

        Is there a store ecosystem for these?

        1. 3
          1. 1

            So… Android only? I’m just wondering how all this will fix the ecosystem lock-in.

            1. 1

              Totally agreed. I personally do not endorse a store owned by a given platform.

              Ideally PWAs would have PWA stores, also operating in the same model. It’s unlikely though that Apple and Google would provide the necessary system APIs for such stores.

              1. 1

                I personally do not endorse a store owned by a given platform.

                That’s not the discussion here. Someone asked if there’s a store ecosystem for PWAs, the answer is yes.

                Ideally PWAs would have PWA stores,

                Hence Google Play Store for Android Chrome.

                Anyway, at least PWAs are not locked in to the Google or Apple platforms like native apps are. That’s the whole point of my suggestion.

                1. 1

                  I am not sure what you are replying to.

                  In fact, my original answer above says exactly “the answer is yes”.

                  1. 1

                    Apologies, I misread your comment.

                    1. 2

                      No harm done.

              2. 1

                Because it’s a webapp; you can host it yourself and market it on other channels than just the Play Store. And because it’s a webapp, you’re not locked in to any company’s platform.

            2. 2

              There was a store for websites called “Yahoo” and it was once one of the biggest internet companies, but it’s no longer a store.

            3. 6

              Dart is a fun language and now that they have added a sound type system it’s only going to get better over time so I think it is a worthwhile learning investment regardless of what kinds of projects you plan to work on. At one point I was considering it for server-side code and it is a good match for that stuff as well. Dart can compile code to what are called snapshots which is a single file that can be loaded into the Dart VM and acts basically like a single binary deployment if you already have the binary for the VM.

              1. 6

                Hard to recommend Dart over TypeScript, which is an optionally-typed superset of JavaScript. Dart has mostly stayed within Google, whereas TypeScript is everywhere and has a thriving community.

                1. 5

                  I’m an engineer on the Flutter team who spent three years working on Dart before that, so you should keep my potential biases in mind as you read my answer.

                  If your goal is to have fun, Dart is very quick to pick up for anyone familiar with Java or C++. Think Java without as much boilerplate. If your goal is fun, there are far flashier choices – Dart falls squarely on the ‘boring’ end of the language spectrum, but it’s simple and easy to get productive with. You can pick up the basics in an afternoon and be familiar with the bulk of the language and core libs within a week. Effective Dart is a decent resource for answering style/usage questions you might have.

                  As to whether you should try Flutter, I’d encourage you to give a couple codelabs a go and decide for yourself whether it fits your interests. Things I feel we do well today are the fast edit-refresh dev workflow, clean encapsulation of state, and UI-as-code. I realise that last point may be controversial – see Gilad Bracha’s A DOMain of Shadows for one take on this. Where Flutter still has some very rough edges are in our support for adding Flutter to existing apps, fully interoperating with existing Android and iOS tooling, and (to some degree) in the difficulties associated with compositing core UIKit/Android views within Flutter views. Given the goal is fun, I’d equally encourage you to play with other frameworks and see what best fits your personal preferences.

                  As to whether Dart/Flutter will be around in a few years, this is a question that developers have been asking since before Dart 1.0 in ~2013. I can’t read the future any better than anyone else, but I can say there are millions of lines of Dart checked in at Google powering many core revenue-generating apps (e.g. AdWords web and mobile), so I’d like to think that’s somewhat decent assurance we’ll be around for a bit.

                  1. 4

                    Dart is not much fun to learn, you already know it if you have ever written some Java or C++. At least this is my impression. I would go for more fun and less shiny things if you do not need your app to be 100% native looking.

                    I still think that Dart is in need of more tooling. I encountered issues trying to debug HTTP interactions and I had to create a library to dump as HAR my problematic requests. I was wondering if things recently got better and I found some HTTP client generators in the like of retrofit (jaguar, chopper) maybe you could have more luck with gprc as a transport but I have not investigated much the workflow and debuggability. Going for a custom HTTP client is a lot of work and maybe you could use some help from dio.

                    As you are already a backend developer I would go for some minimal frontend development, maybe throw in TypeScript or Elm which may be more interesting and fun.

                    1. 4

                      Edited after I realized you’re not starting from zero with Flutter, but if anyone else wants to see my reactions after playing with an earlier verison a little, here they are on HN. The tour and playground can help give a feel for Dart. In some ways feels like JS, in others like a statically-typed OO language with inference.

                      It doesn’t seem likely to disappear because Google uses it for a lot (there are over a million lines, says this post), especially in the AdWords division. (Here’s a vaguely related piece from 2016.) Dart 2.1 and Flutter 1.0 are both pretty recent, and they do things like present on Firebase Dart support at I/O. The gap between (seeming) interest inside Google and outside is kinda amazing, really.

                      If Web apps are also interesting to you, TypeScript seems like the typed JS-ish lang with open-source support and momentum. I don’t know nearly as much about React Native as about Flutter but TS+React Native might be a thing to look into. Also, if native feel isn’t that important and you just need to get certain functionality out, building your thing as a local webapp and using whatever the current PhoneGap-y thing is an option.

                      1. 2

                        I’d say go for it. If you have a MacBook, then cross platform development is open to you since Apple only knows of one operating system. Otherwise, I’d point you to towards Kotlin Native. Gives you the feel of a battle-tested language.

                        1. 2

                          Short answer: yes!

                          I also mostly do backend things, and Flutter is the only UI library I can say I’m good at. It’s really easy, it’s fast, and things more or less just work.

                          Dart itself is pretty eh though. It’s just Java but slightly different. I only use it for Flutter.