<?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: rana bilal</title>
    <description>The latest articles on DEV Community by rana bilal (@ranab4b).</description>
    <link>https://dev.to/ranab4b</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4116942%2F373820df-d669-4d3e-84c6-f4db78afeb61.jpg</url>
      <title>DEV Community: rana bilal</title>
      <link>https://dev.to/ranab4b</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ranab4b"/>
    <language>en</language>
    <item>
      <title>#KotlinMultiplatform #ComposeMultiplatform #AndroidDev #MobileArchitecture</title>
      <dc:creator>rana bilal</dc:creator>
      <pubDate>Wed, 09 Sep 2026 06:55:06 +0000</pubDate>
      <link>https://dev.to/ranab4b/kotlinmultiplatform-composemultiplatform-androiddev-mobilearchitecture-2d6c</link>
      <guid>https://dev.to/ranab4b/kotlinmultiplatform-composemultiplatform-androiddev-mobilearchitecture-2d6c</guid>
      <description>&lt;p&gt;Two different bets&lt;/p&gt;

&lt;p&gt;Flutter’s bet is total UI ownership. One rendering engine (Impeller), one widget tree, pixel-identical output on iOS and Android. You get to visual parity fastest, at the cost of leaving your native UI investment behind — native accessibility semantics, platform-specific animations, and deep OS integrations all have to be re-built or bridged.&lt;/p&gt;

&lt;p&gt;Kotlin Multiplatform’s bet is shared logic, native UI. Your networking, caching, validation, and view-model layer live in commonMain; each platform still renders its own UI — natively, or via Compose Multiplatform if you also want to share UI code. You keep native performance characteristics and existing UI investment, at the cost of a slower path to full UI parity if that’s actually your goal.&lt;/p&gt;

&lt;p&gt;The framework&lt;/p&gt;

&lt;p&gt;Before touching a single shared module, I run a team through four checks:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Audit your last two quarters of production bugs. Bucket them: UI bugs (layout, rendering, platform-specific visual glitches) vs. logic bugs (state management, race conditions, data inconsistency between platforms). If logic bugs dominate, that’s where KMP earns its keep fastest — you fix the bug once, in commonMain, instead of twice.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Audit your native codebase’s actual quality, not its age. A five-year-old native UI layer that’s clean, well-tested, and fast is sunk cost you should protect. One that’s already accreted years of workarounds is a much weaker argument against a rewrite.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Map your team’s skill distribution honestly. A full UI rewrite needs buy-in from engineers who didn’t choose it. If half your team is strong in Kotlin and weak in Dart, that’s not a blocker — but it is a cost you should schedule for, not discover.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prototype your riskiest shared module first. Not your easiest win — your riskiest one. If your team’s hardest, most stateful, most platform-divergent piece of logic (often offline sync, or anything touching background work) can’t share cleanly, you want to know in week two, not month six.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;What a shared module boundary looks like&lt;/p&gt;

&lt;p&gt;A minimal expect/actual boundary for something like secure storage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight kotlin"&gt;&lt;code&gt;&lt;span class="c1"&gt;// commonMain&lt;/span&gt;
&lt;span class="n"&gt;expect&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SecureStore&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;putString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;getString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// androidMain&lt;/span&gt;
&lt;span class="n"&gt;actual&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SecureStore&lt;/span&gt; &lt;span class="n"&gt;actual&lt;/span&gt; &lt;span class="k"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;private&lt;/span&gt; &lt;span class="kd"&gt;val&lt;/span&gt; &lt;span class="py"&gt;prefs&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;EncryptedSharedPreferences&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="cm"&gt;/* ... */&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;actual&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;putString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;edit&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nf"&gt;putString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;actual&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;getString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;=&lt;/span&gt; &lt;span class="n"&gt;prefs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// iosMain&lt;/span&gt;
&lt;span class="n"&gt;actual&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SecureStore&lt;/span&gt; &lt;span class="n"&gt;actual&lt;/span&gt; &lt;span class="k"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;actual&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;putString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* Keychain wrapper */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;actual&lt;/span&gt; &lt;span class="k"&gt;fun&lt;/span&gt; &lt;span class="nf"&gt;getString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt; &lt;span class="nc"&gt;String&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="cm"&gt;/* Keychain wrapper */&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The value isn’t the boilerplate — it’s that your repository layer above this boundary, your view models, your business rules, are now written once and tested once.&lt;/p&gt;

&lt;p&gt;What actually breaks this migration&lt;/p&gt;

&lt;p&gt;Two failure modes I’ve watched teams hit: starting with the core (auth, networking) before the team has calibrated on anything smaller, and treating the migration as a big-bang rewrite instead of an incremental, always-shippable path. Both are avoidable by running step 4 honestly, before committing to a timeline anyone will hold you to.&lt;/p&gt;

</description>
      <category>android</category>
      <category>flutter</category>
      <category>ios</category>
      <category>mobile</category>
    </item>
  </channel>
</rss>
