<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ray Khoury</title>
    <description>The latest articles on DEV Community by Ray Khoury (@rjk).</description>
    <link>https://dev.to/rjk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1829726%2F88d5dce4-4636-48cf-863e-9f7742211a42.png</url>
      <title>DEV Community: Ray Khoury</title>
      <link>https://dev.to/rjk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rjk"/>
    <language>en</language>
    <item>
      <title>Evaluating Flutter for Desktop Web App Development</title>
      <dc:creator>Ray Khoury</dc:creator>
      <pubDate>Sat, 03 Aug 2024 07:19:37 +0000</pubDate>
      <link>https://dev.to/rjk/evaluating-flutter-for-desktop-web-app-development-inj</link>
      <guid>https://dev.to/rjk/evaluating-flutter-for-desktop-web-app-development-inj</guid>
      <description>&lt;p&gt;I recently explored the possibility of using &lt;a href="https://flutter.dev/" rel="noopener noreferrer"&gt;Flutter&lt;/a&gt; to develop a web app for a client. You might ask why I was considering Flutter since this client really only needed a web app developed and didn't need the cross-platform support Flutter is known for. But I was considering it for a different reason - I had used it recently for some mobile development and was impressed by its fantastic developer experience. In particular it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Uses the Dart programming language which is sane compared to JS (statically typed, no weird historical quirks)&lt;/li&gt;
&lt;li&gt;Includes an extensive standard library&lt;/li&gt;
&lt;li&gt;Includes fully functioning Material UI components&lt;/li&gt;
&lt;li&gt;Provides an SDK with very nice tooling, like a built in package manager, code formatter, linter and build system&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In contrast to typical frontend web development there is no mess choosing and setting up 10 tools and libraries and dealing with their quirks, complexities and compatibility issues. With Flutter, everything just works out of the box.&lt;/p&gt;

&lt;p&gt;Despite all this, after some analysis I concluded that Flutter still has some problems on web which I considered showstoppers for this project:&lt;/p&gt;

&lt;h4&gt;
  
  
  Problem 1: Performance
&lt;/h4&gt;

&lt;p&gt;Performance for web just isn't there yet. I say this after testing both the CanvasKit and the &lt;a href="https://docs.flutter.dev/platform-integration/web/wasm" rel="noopener noreferrer"&gt;new wasm support&lt;/a&gt;. A couple of examples you can test at home are the &lt;a href="https://wonderous.app/web/#/home/wonder/petra?t=0" rel="noopener noreferrer"&gt;Wondrous App&lt;/a&gt; and the &lt;a href="https://ubuntu.github.io/yaru.dart/" rel="noopener noreferrer"&gt;Yaru widgets&lt;/a&gt; (try scrolling the section YaruIcons on this). While both these apps work reasonably well on high end computers, there is noticable lag - especially when scrolling - on slower devices. Responsive UI is super important to delivering a product that feels high quality. &lt;/p&gt;

&lt;p&gt;This is an area where HTML/CSS/JS excel after the many, many years of optimizations in browser rendering. It's amazing how smooth and performant scrolling is on web pages, even crappy ones that have hundreds of unoptimized HTML elements and even when running on outdated hardware. It will take some time for Flutter (and other upcoming platforms that rely on their own rendering in the browser) to catch up.&lt;/p&gt;

&lt;h4&gt;
  
  
  Problem 2: Lack of Desktop Components
&lt;/h4&gt;

&lt;p&gt;Prebuilt UI components dramatically speed up development, so it's important to have suitable libraries available. The Material UI components shipped with Flutter are great for mobile, but are not great for desktop development. I consider this a problem with Material more generally. You might argue that Google has made Material work for all its desktop properties, but they actually need to stray pretty far from the prebuilt Material components to do this well. For example, there are no prebuilt Material components for the toolbar and menus in Google docs - things which are super common in desktop apps.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff8o9rbwrmvdewux1hxhr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ff8o9rbwrmvdewux1hxhr.png" alt="Google Sheets UI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The options outside of material, for desktop development, are scarce. A couple of other options I found which were nice, but not-quite-there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;a href="https://github.com/ubuntu/yaru.dart?tab=readme-ov-file" rel="noopener noreferrer"&gt;Ubuntu desktop components&lt;/a&gt; implemented in Flutter (since Ubuntu is using Flutter for some desktop apps now)&lt;/li&gt;
&lt;li&gt;The &lt;a href="https://serverpod.dev/stockholm/#/" rel="noopener noreferrer"&gt;Stockholm components&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These libraries are either lacking in certain important components, aren't very customizable or still feel clunky on the web. For example, neither of these provides text fields which feel quite right, with selection behaviors differing slightly from native.&lt;/p&gt;

&lt;h4&gt;
  
  
  Problem 3: Uncertainty around Google's investment
&lt;/h4&gt;

&lt;p&gt;Flutter is open source but the project is still controlled by Google. Google's recent layoffs have raised questions about their continued investment in various projects like Flutter. While I have confidence that there is enough momentum behind Flutter mobile that its support will live on for a long time, I don't have the same confidence for the web target. I could see it being deprioritized, especially if it does not serve Google's needs. It gives me encouragement that someone like Ian Hickson (one of the original devs behind HTML5) has left Google but &lt;a href="https://ln.hixie.ch/?start=1700627532&amp;amp;count=1" rel="noopener noreferrer"&gt;continues to work on Flutter&lt;/a&gt;. But making a bet on a technology that still has some fundamental issues is the wrong thing to do for a paying client.&lt;/p&gt;

&lt;p&gt;Flutter is still an amazing platform and I hope web support continues to improve to the point where it can be a viable alternative to the HTML/CSS/JS ecosystem mess for more apps.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>flutter</category>
      <category>desktop</category>
    </item>
  </channel>
</rss>
