Hashnode Lite: Why Flutter?

Hashnode Lite: Why Flutter?


6 min read

Not too long ago, I published the Hashnode Lite application to the Android store. I was able to accomplish this feat due to the stellar GraphQL API released just days earlier by the Hashnode team. I got a lot of kudos from the community (even Sandeep himself) about the effort. In this post, I will try to explain why I chose to use Flutter to build this application.

Why not X?

The two most common ways of building applications are natively and using a cross-platform solution.

Why not native?

Writing the same feature twice, only in different languages and platforms, and having to learn all of them, seemed wasteful.

I believe firmly in multi-platform. In my opinion, the frontend community was fractured the second that the first app store became a thing. I remember building my first Swing, GWT, and JavaScript applications. I never recall thinking of myself as a [insert platform here] developer, because to me the tooling and the platform were implementation details.

Even if I never decide to release Hashnode Lite on iOS or web or desktop, I don't believe in walled gardens. I would never choose a technology that basically forced that on me. My solution would have always been cross-platform.

Why not React Native?

But Ryan, you love React! Why the betrayal?!

Believing that you must invest only in your current skillset for fear of losing productivity and wasting that knowledge is a sunk cost fallacy mindset. Once I threw out the "I already know JavaScript & React" arguments, Flutter made me more productive. There are several reasons for this:

  • Flutter has a complete toolkit for building UIs that is also very extensible, so I spend less time trying to figure out how to turn designs into code.

  • Flutter is generally faster to develop with given the speed of hot refresh & hot reload so I spend less time twiddling my thumbs in between saves.

  • Flutter's errors are better and continue to improve because of the features being built into the Dart language.

  • Finally, but maybe least importantly depending on the audience, Flutter resembles native apps in terms of performance.

I have yet to meet anyone with a similar path to Flutter that arrived at a different outcome.

I am fine with Dart

More specifically I am fine with Dart's trajectory and evolution as a language.

Dart as Flutter's language choice is possibly the most contentious point of critique. You don't have to venture far to find an article lamenting that Flutter isn't written in language X. I think the points are fair but I know based on past experiences that the Dart code I write 5 years from now will be completely different from what I write today.

Most modern multi-paradigm languages operate on the same core fundamentals and converge around the same features. This is why some iOS developers swear that JavaScript "looks just like Swift," and TypeScript is basically a more functional C#. Dart is similar enough to these languages that while I may miss features they aren't deal breakers.

Beyond that, Dart lets me build apps that are beautiful and fast and run everywhere. I can live with the fact that it's not winning beauty pageants itself. iOS developers didn't stop being iOS developers to spite Objective C. Likewise, I wrote JavaScript prior to ES6, so the "ugly" code does not phase me.

Side projects are for fun

Over the last several years, there is a long list of cross-platform solutions that I have experimented with. They include Electron, Tabris, NativeScript, React Native, Xamarin, Node Webkit, and Ionic just to name a few. In many cases, I gained experience building native plugins as well. I had fun and grew tremendously along the way.

Those solutions work for a lot of people. Native works for a lot of people. Flutter works for me, even as a developer who has excelled with JavaScript for most of his career. It is a natural fit that required a minimal amount of effort to set up, and programming for different platforms and going off the rails feels more like a feature and less like a hack.

Side projects are for career development

But Flutter is made by Google! Won't they just going to kill it!

There is a big difference between killing a free product that costs development and hardware resources to maintain and killing an open-sourced project. Remember GWT? If you're young enough, you probably have never heard of it. But it is very much still alive. Likewise, developers have been declaring the demise of Angular for years. It is still flourishing.

On that note, Flutter is trending upwards with no sign of slowing down. If we took the churning trajectory of popular JavaScript frameworks, it would reach the height of its popularity in the next 3 to 5 years. Even in the worst case where I only spend the next 5 years as a Flutter developer that is still 33% of my career. Spending 5-10 years nurturing technical depth before making a new investment has worked wonders for my career thus far - see JavaScript.

Stay tuned

Hopefully, you have a better understanding of why Flutter fits my needs. I am not dogmatic about any of the points I have made in this article. Flutter continues to work well for my needs, and I have not had any regrets since I started learning it.

I will continue this series of short articles explaining how I built the application. Feel free to peruse the source. If there's something missing or a bug that you find, don't hesitate to open an issue. I look forward to any feedback & collaboration from the community and hope this application will outgrow me :).

Sup?! I’m Ryan Edge. I am a Software Engineer at Diligent Corporation and a semi-pro open source contributor. If you liked this article, be sure to follow and spread the love! Happy trails