<?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: Phillip van der Merwe</title>
    <description>The latest articles on DEV Community by Phillip van der Merwe (@phillvdm).</description>
    <link>https://dev.to/phillvdm</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%2F1140342%2F4559d2e8-10f0-4073-bd12-970da3ffc37b.jpeg</url>
      <title>DEV Community: Phillip van der Merwe</title>
      <link>https://dev.to/phillvdm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/phillvdm"/>
    <language>en</language>
    <item>
      <title>Why Local-First has better DX</title>
      <dc:creator>Phillip van der Merwe</dc:creator>
      <pubDate>Tue, 20 Aug 2024 17:51:37 +0000</pubDate>
      <link>https://dev.to/phillvdm/why-local-first-has-better-dx-5c0a</link>
      <guid>https://dev.to/phillvdm/why-local-first-has-better-dx-5c0a</guid>
      <description>&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/ovdcUtW4tWY"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>localfirst</category>
      <category>reactnative</category>
      <category>flutter</category>
    </item>
    <item>
      <title>Local-first for FlutterFlow</title>
      <dc:creator>Phillip van der Merwe</dc:creator>
      <pubDate>Tue, 23 Apr 2024 19:25:46 +0000</pubDate>
      <link>https://dev.to/phillvdm/local-first-for-flutterflow-2753</link>
      <guid>https://dev.to/phillvdm/local-first-for-flutterflow-2753</guid>
      <description>&lt;p&gt;Local-first / offline-first is an application architecture where data is stored "close to the user", in a database on their client device, and synced with a backend database in real-time.&lt;/p&gt;

&lt;p&gt;Some features of local-first:&lt;/p&gt;

&lt;p&gt;📡 Real-time data streaming&lt;/p&gt;

&lt;p&gt;⚡ Instantly reactive UI&lt;/p&gt;

&lt;p&gt;💾 Simplified state management&lt;/p&gt;

&lt;p&gt;🚫 Always available, offline-first functionality&lt;/p&gt;

&lt;p&gt;This video guide provides step-by-step instructions for configuring PowerSync with your FlutterFlow project that has Supabase integration enabled:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/eUcBCyPfVok"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>flutterflow</category>
      <category>localfirst</category>
      <category>database</category>
    </item>
    <item>
      <title>Local database &gt; cache 💸</title>
      <dc:creator>Phillip van der Merwe</dc:creator>
      <pubDate>Wed, 16 Aug 2023 22:49:19 +0000</pubDate>
      <link>https://dev.to/phillvdm/local-database-cache-4kfc</link>
      <guid>https://dev.to/phillvdm/local-database-cache-4kfc</guid>
      <description>&lt;p&gt;Most app developers don't really care about this argument, but they should. Here's why:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgrz61apdmbo6i7377rx5.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgrz61apdmbo6i7377rx5.gif" alt="Gif of mo cache mo problems" width="480" height="314"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Users want delightful apps
&lt;/h2&gt;

&lt;p&gt;We love products that take away mental overhead. The less thinking we have to do to get something done, the better. Using a cache will always require: &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;more thinking from users
OR&lt;/li&gt;
&lt;li&gt;more thinking from app developers to work around limitations that will require more thinking from users.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1q2qkmdj0x2dxstf0in9.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1q2qkmdj0x2dxstf0in9.jpg" alt="Pedro Pascal eating a sandwich" width="480" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Caches are breadcrumbs, users want sandwiches
&lt;/h2&gt;

&lt;p&gt;Caching works by persisting downloaded data. When users are offline, they can follow the trail back but they can't keep on exploring.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WIN #1 for local database:&lt;/strong&gt; they let users explore parts unknown.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9v62lg8p91kx0pceuyw2.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9v62lg8p91kx0pceuyw2.gif" alt="Slap some tape on that leaky bucket" width="480" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Caches are leaky buckets
&lt;/h2&gt;

&lt;p&gt;Caches don't know how much data is on the way so they have to keep deleting data to make space available. Haven't accessed data recently? Too bad, you can't see it anymore.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WIN #2 for local database:&lt;/strong&gt; all data is there for you no matter how dusty it's become.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp0wt0i6onz2p5poeze91.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fp0wt0i6onz2p5poeze91.gif" alt="Hella fresh" width="500" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Caches keep stale data, users want fresh data
&lt;/h2&gt;

&lt;p&gt;Cached data needs to be redownloaded if it has been updated elsewhere. If offline users want to access data that hasn't recently been redownloaded, they can't.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WIN #3 for local database:&lt;/strong&gt; background syncing keeps local databases fresh.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Caches can cause slowness 🦥, users want fastness ⚡
&lt;/h2&gt;

&lt;p&gt;Because a cache introduces a secondary source of data, an app needs to run through logic to decide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Am I online?&lt;/li&gt;
&lt;li&gt;Can I request server data?&lt;/li&gt;
&lt;li&gt;Did the request succeed?&lt;/li&gt;
&lt;li&gt;Do I need to look for the data in the cache?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is usually fine, but not when connectivity is still &lt;em&gt;kind of&lt;/em&gt; available but very poor.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;WIN #4 for local database:&lt;/strong&gt; as the only source of data, apps don't waste time wondering where to fetch data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Easy, we'll all just use local databases from now on
&lt;/h2&gt;

&lt;p&gt;Not so fast! Big BaaS providers like Firebase don't have easy ways to do that. Why? Does it have something to do with how they charge for data transfer between your app and their cloud and if you had a local database you'd make fewer calls? I can't say. But sync and consistency is a hard problem to solve whether you're using Firebase or something else.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what are you doing about it?
&lt;/h2&gt;

&lt;p&gt;I'm working on an easy + (soon-to-be) open source way to solve sync and make using local databases easy for devs. Follow our progress &lt;a href="https://discord.gg/powersync"&gt;on discord&lt;/a&gt; or check out &lt;a href="https://www.powersync.co"&gt;powersync.co&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>flutter</category>
      <category>reactnative</category>
      <category>database</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
