<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Taylan Kasap on Medium]]></title>
        <description><![CDATA[Stories by Taylan Kasap on Medium]]></description>
        <link>https://medium.com/@taylankasap?source=rss-42f11f2cbc57------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*pDHcXyIiANUrv_xTsIaHTQ.jpeg</url>
            <title>Stories by Taylan Kasap on Medium</title>
            <link>https://medium.com/@taylankasap?source=rss-42f11f2cbc57------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 22:27:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@taylankasap/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Layout Service — The Backbone of Modanisa Website Replatforming]]></title>
            <link>https://medium.com/modanisa-engineering/layout-service-the-backbone-of-modanisa-website-replatforming-a0f9cca7ca46?source=rss-42f11f2cbc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/a0f9cca7ca46</guid>
            <category><![CDATA[replatforming]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[legacy]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[strangler-pattern]]></category>
            <dc:creator><![CDATA[Taylan Kasap]]></dc:creator>
            <pubDate>Tue, 31 May 2022 10:21:42 GMT</pubDate>
            <atom:updated>2025-09-09T13:48:35.339Z</atom:updated>
            <content:encoded><![CDATA[<h3>Layout Service (Strangler Fig Pattern)— The Backbone of Modanisa Website Replatforming</h3><figure><img alt="Working on the legacy is similar to struggling with broken blinds." src="https://cdn-images-1.medium.com/max/576/1*WtDnzOLDuFIL19e6OgVgOQ.gif" /></figure><p><strong>Legacy projects</strong>, can’t live with them, can’t live without them. They’re a misery to work with but they also create a lot of job openings, which is nice I guess.</p><p>We also have one of those…</p><h3>The Problem That Needs to Be Solved</h3><p>As it stands Modanisa website is a monolith built on good old LEMP stack (Linux-Nginx-MySQL-PHP). By itself being a monolith is not the main problem. We probably wouldn’t have made a move on replatforming, if not for other issues. It’s called legacy and it’s a combination of issues such as:</p><ul><li>No automated tests</li><li>Slow for all users (both customers &amp; employees)</li><li>Too many bugs</li><li>Poor or non-existent monitoring/logging</li><li>Tech is outdated/unsupported</li><li>There is no documentation</li></ul><p><strong><em>More relatable list:</em></strong></p><ul><li>Developers don’t want to work on it</li><li>Adding a feature creates bugs in seemingly unrelated areas</li><li>When you get an error during some action you retry and it works</li><li>Only certain people know which parts work how or worse, no one knows how those parts work because the relevant people left the company</li><li><em>“if it works don’t touch it”</em></li></ul><p>Some of these may be true for even non-legacy projects, but if you have most of these issues then I’m sorry but it’s probably a legacy.</p><p>In addition to these issues we also wanted to change our tech stack from LEMP to whatever the projects require. We started with Go, Vue and NoSQL but there is nothing preventing us from using other tech too as the need arises. And while we are at it we moved to microservice architecture. But this post is not going to be about monolith vs microservice so let’s leave it at that.</p><h3>Options at Hand</h3><h4>1. Refactoring</h4><figure><img alt="n times later, legacy project becomes the refactored legacy project which is square root of n times better." src="https://cdn-images-1.medium.com/max/750/1*GXdkcN-YisjLw3ZFElfnSQ.png" /></figure><p>Depending on the project it might be possible to solve issues caused by legacy without rewriting the whole project. Not for us though.</p><h4>2. Complete Rewrite (Big Bang Replatforming)</h4><figure><img alt="2 years later, legacy project becomes the rewritten legacy project which is same but better (not really)." src="https://cdn-images-1.medium.com/max/750/1*7v9eZEqx0yYA-QLISXOOYw.png" /></figure><p><strong>Pros:</strong></p><ol><li>In total, takes less time and work compared to strangler fig pattern (we will talk about that below).</li></ol><p>To be honest I can’t find any other pros. Let me know in the comments.</p><p><strong>Cons:</strong></p><ol><li>Until replatforming finishes it doesn’t add any value to the business, which makes it difficult to convince the stakeholders to wait and be patient.</li><li>Because of feature freeze in the legacy codebase, it also stops adding any value even to the legacy business. And if you choose not to enforce feature freeze, then the rewritten project also needs them so you will have to implement the same feature twice at the same time.</li><li>If replatforming suddenly needs to be stopped — and that’s not a rare thing — , incomplete project goes to waste.</li><li>When creating the new project it’s very possible to accidentally skip some undocumented features in the legacy system.</li></ol><p>Let’s continue with our next option.</p><h4>3. Strangler Fig Pattern</h4><figure><img alt="few months later, legacy project becomes smaller legacy + modern. And few months later, it becomes even smaller legacy + larger modern. And so on." src="https://cdn-images-1.medium.com/max/750/1*4JqXdywWJnZleVkCO3AxQg.png" /></figure><p>This pattern is about gradually replacing your project piece by piece with replatformed tech until the legacy disappears.</p><p>Originally the name got popular as Strangler Pattern but apparently Fowler hopes the name will catch on as <strong>Strangler Fig</strong> rather than <strong>Strangler </strong>as he mentioned in his <a href="https://martinfowler.com/bliki/StranglerFigApplication.html">original post</a>:</p><blockquote>… The original post was entitled “Strangler Application”, and when used, the pattern is often referred to as a “strangler”. But its usage often gets separated from its metaphorical root, and takes on a unpleasantly violent connotation.</blockquote><blockquote>…</blockquote><blockquote>If I rename the post to “Strangler <em>Fig</em> Application”, and use the term “Strangler Fig” as much as possible, then hopefully that would reduce the violent connotation by reinforcing the metaphorical link that is the whole point of the name. …</blockquote><p>With strangler fig pattern while it’s technically possible to not touch the legacy codebase, it’s not a viable option in reality. Because more often than not, that codebase doesn’t have a proper architecture to implement the strangler fig pattern properly. So you will have to add little pieces of codes here and there.</p><p><strong>Pros:</strong></p><ol><li>Changes are reflected in the production website as you develop it, hence the <strong>business can reap the fruits</strong> of the renewed functionality without waiting for replatforming to finish.</li><li>And that makes it <strong>easier to convince the stakeholders</strong>.</li><li>Not much is wasted even if replatforming suddenly stops. <strong>Which reduces the risk.</strong></li></ol><p><strong>Cons:</strong></p><ol><li>In total, takes more time and work compared to complete rewrite. Especially if you intend to use microservices and your team is not used to microservice architecture.</li></ol><p>Let me know of other cons.</p><p>I tried not to list the pros/cons of microservice architecture because strangler fig pattern does not enforce microservice architecture — although they get associated most of the time.</p><p>Among these options strangler fig pattern is the best option for us — and to be honest for the most projects. So let’s talk about the details.</p><h3>Strangler Fig Pattern Options</h3><p>Choosing strangler fig pattern was just another step. Now we need to choose how to implement it.</p><h4>1. Adding Conditional Calls to Legacy Codebase</h4><p>This simply means calling the new microservices within legacy codebase if that part is replatformed and using the old legacy system if it’s not replatformed yet.</p><p>We didn’t want to tinker too much with the legacy system because it’s written in PHP and we’re trying to switch to Go. So for us it doesn’t make much sense to go with this option.</p><h4>2. Micro Front-end</h4><p>Micro front-ends are great, but you need to know the page layout for it to work. Unfortunately we — the replatforming team — don’t know the page layout, legacy does. While searching for options we’ve stumbled upon a project called <a href="https://github.com/zalando/tailor">Tailor</a>. It felt close to what we needed but as far as we could tell Tailor was also designed for page layouts known by the new system rather than the legacy system. Apparently to work with the legacy you need to <a href="https://github.com/zalando/tailor/issues/313">implement custom solutions</a> and also to get cookies &amp; headers you need to customize it even more. At that point it made more sense to create our own solution.</p><p>Which brings us to the next and main item.</p><h4>3. Custom Layout Service</h4><p>This service sends a request to the legacy website (from now on will be referred to as <strong>upstream</strong>), replaces necessary front-end parts and serves the updated website to the user. Let’s break it down.</p><p><strong>Sending request to the upstream </strong>means we need to wait for the upstream AND the replatformed website. Which is worse than the original response time. To solve this we need to tell the upstream that x, y, z parts are replatformed so you don’t need to generate them for this request.</p><p><strong>Replacing necessary front-end parts </strong>means we need to know which parts to replace, and replace them with what. This also comes in 2 parts:</p><ol><li>Which parts to replace gets deduced from the intersection of our configuration and the user’s parameters. E.g. 50% of users using the website in Sweden with English language should see the replatformed slider on the homepage.</li><li>Getting correct replacements from our new services.</li></ol><p>As you can see generating the correct replacements is not Layout Service’s job. If it was, that would mean we are replatforming monolith with another monolith. Instead we delegate that work to our microservices. Which means we are replatforming monolith with microservices.</p><h3>Conclusion</h3><p>We still have long way to go until replatforming is finished. No matter which option you choose, replatforming takes long time — relative to the legacy project’s size.</p><p>When our replatforming is finished we will become independent of legacy codebase and we will be able to drop it completely. At that point we can probably drop the Layout Service too since services specifically designed for micro front-ends should be enough and simpler.</p><p>If you have a migration project in your hands similar to what we had to go through you will also need to research and choose the best suited option for you.</p><p>Good luck to you all.</p><h3>Acknowledgements</h3><p><em>Special thanks to </em><a href="https://www.linkedin.com/in/kilicoglutuncay/"><em>Tuncay Kılıçoğlu</em></a><em> for sharing his knowledge about the beginning of the Layout Service.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a0f9cca7ca46" width="1" height="1" alt=""><hr><p><a href="https://medium.com/modanisa-engineering/layout-service-the-backbone-of-modanisa-website-replatforming-a0f9cca7ca46">Layout Service — The Backbone of Modanisa Website Replatforming</a> was originally published in <a href="https://medium.com/modanisa-engineering">Modanisa Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to setup Flutter development environment for Android on Linux… I mean Windows]]></title>
            <link>https://medium.com/@taylankasap/how-to-setup-flutter-development-environment-for-android-on-linux-i-mean-windows-261552d79031?source=rss-42f11f2cbc57------2</link>
            <guid isPermaLink="false">https://medium.com/p/261552d79031</guid>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[wsl]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Taylan Kasap]]></dc:creator>
            <pubDate>Sat, 09 Apr 2022 21:28:05 GMT</pubDate>
            <atom:updated>2022-05-29T06:52:00.362Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5-DbTGSbfGRhYYD-" /><figcaption>Photo by <a href="https://unsplash.com/@f12r?utm_source=medium&amp;utm_medium=referral">Fahim Muntashir</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Well, you guessed it. I’m talking about WSL. (Why Windows at all? For me, gaming)</p><p>Stack used in this post: Windows, WSL, Ubuntu, Flutter Version Manager, VcXsrv, Android SDK tools, Android device</p><p>I won’t get much into Windows + WSL + Ubuntu setup. You probably already have it. But if you don’t, not to worry. It’s pretty easy. Here’s the <a href="https://docs.microsoft.com/en-us/windows/wsl/install">official documentation</a>.</p><p>After it’s done let’s start with Flutter Version Manager (fvm).</p><p><strong>Side note:</strong> It’s also okay to install Flutter without fvm but I prefer to install my software with version managers because I know “stuff” happens in the future and version managers help a lot.</p><p><em>Here’s the </em><a href="https://fvm.app/docs/getting_started/installation"><em>fvm documentation</em></a><em> in case this post gets outdated.</em></p><p>We want to install fvm to Linux, not the Windows. Currently, recommended way is installing it with <a href="https://brew.sh/">homebrew</a>.</p><pre>brew tap leoafarias/fvm<br>brew install fvm</pre><pre># You should now have fvm command<br># If your CLI can&#39;t find fvm command add this to your .bashrc file<br>export PATH=&quot;/home/linuxbrew/.linuxbrew/bin:$PATH&quot;</pre><pre>fvm install stable<br>fvm global stable</pre><pre># Add this line to your .bashrc file<br>export PATH=$PATH:$HOME/fvm/default/bin</pre><figure><img alt="Output of properly working `flutter --version` command" src="https://cdn-images-1.medium.com/max/670/1*vXPcWxhsIcpgehXNrzepGw.png" /><figcaption>`flutter — version` command should now work</figcaption></figure><p>Run flutter doctor to see issues with your flutter setup. It will show Android related issues. We’ll fix them later.</p><h4>Next tool: VcXsrv</h4><p>Why VcXsrv? Actually, what is even VcXsrv? In short, it’s a way for WSL2 to run apps with GUI.</p><p><strong>Side note:</strong> There is an <a href="https://github.com/microsoft/wslg">official alternative</a> but until it is more available for common use I intend to stick with VcXsrv. By the time you read this post, if wslg is available for your setup, you may want to skip installing VcXsrv, otherwise let’s continue.</p><p>Okay, now why: Because I don’t want to bother with keeping Android related software (SDK platforms, build tools, cli tools, platform tools etc.) up to date with just command line. So we will install Android Studio to do it for us. You don’t have to use it for coding though, you can still use your favorite text editor. This might take longer to setup (in terms of waiting) but is easier to use.</p><figure><img alt="Android Studio SDK Manager" src="https://cdn-images-1.medium.com/max/728/1*-9QGbIO6c6tDszW-TO23dA.png" /><figcaption>Android Studio SDK Manager has pretty easy to use UI</figcaption></figure><p>At the time of writing <a href="https://sourceforge.net/projects/vcxsrv/">VcXsrv is available on SourceForge</a>. Install it.</p><p>Run XLaunch.</p><figure><img alt="VcXsrv display settings" src="https://cdn-images-1.medium.com/max/499/1*T191HjOjr088ZQG934lSrg.png" /><figcaption>Select Multiple windows</figcaption></figure><figure><img alt="VcXsrv client startup" src="https://cdn-images-1.medium.com/max/499/1*R2_X-fBjjaCXBtbRKWFS-w.png" /><figcaption>Select “Start no client” option</figcaption></figure><figure><img alt="VcXsrv extra settings" src="https://cdn-images-1.medium.com/max/499/1*16pfNnAkhu7SWl2anHyvYg.png" /><figcaption>Make sure “Disable access control” is checked</figcaption></figure><p>Now you can see VcXsrv icon in system tray. Hover over it. You should see something like YOUR-COMPUTER_NAME:0.0 - 0 Clients. We will use this in a moment.</p><p>If you want to test what VcXsrv does, right click icon &gt; Applications &gt; xcalc</p><figure><img alt="A calculator GUI" src="https://cdn-images-1.medium.com/max/228/1*fL6ZR8NRzXvgaeb3a81jrw.png" /><figcaption>Some calculator with old looking UI</figcaption></figure><p>What’s the big deal? Well, xcalc is a Linux app!</p><p>Now for WSL to be able to access this we need to define an environment variable in our .bashrc file:</p><pre>export WSL_HOST_IP=`grep nameserver /etc/resolv.conf | sed &#39;s/nameserver //&#39;`<br>export VC_XSRV_DISPLAY=&quot;0.0&quot; # This value is from the tray icon<br>export DISPLAY=&quot;$WSL_HOST_IP:$VC_XSRV_DISPLAY&quot; # Only DISPLAY is important, other variables are for clarity</pre><p>You can install xcalc to WSL and test it if you want. Not required though.</p><p>Now our GUI environment is ready, let’s install Android Studio to WSL.</p><p>So <a href="https://developer.android.com/studio/index.html">download Android Studio</a> for Linux and extract it (tar -zxvf filename.tar.gz) to wherever you like. I use this path: /usr/local/android-studio</p><p>Create some alias if you prefer.</p><pre>alias studio=/usr/local/android-studio/bin/studio.sh</pre><p>Run studio and you should see it running through VcXsrv. Let it do its thing (download SDK, platform tools, cli tools etc.)</p><p>Set environment variables in your .bashrc</p><pre>export ANDROID_HOME=$HOME/Android/Sdk<br>export PATH=$PATH:$ANDROID_HOME/emulator<br>export PATH=$PATH:$ANDROID_HOME/tools<br>export PATH=$PATH:$ANDROID_HOME/tools/bin<br>export PATH=$PATH:$ANDROID_HOME/platform-tools</pre><p><strong>Your .bashrc should look like this if you’ve followed all steps in this guide:</strong></p><pre># Homebrew<br>export PATH=&quot;/home/linuxbrew/.linuxbrew/bin:$PATH&quot;</pre><pre># Flutter Version Manager<br>export PATH=$PATH:$HOME/fvm/default/bin</pre><pre># Android paths<br>export ANDROID_HOME=$HOME/Android/Sdk<br>export PATH=$PATH:$ANDROID_HOME/emulator<br>export PATH=$PATH:$ANDROID_HOME/tools<br>export PATH=$PATH:$ANDROID_HOME/tools/bin<br>export PATH=$PATH:$ANDROID_HOME/platform-tools</pre><pre># VcXsrv on WSL Host<br>export WSL_HOST_IP=`grep nameserver /etc/resolv.conf | sed &#39;s/nameserver //&#39;`<br>export VC_XSRV_DISPLAY=&quot;0.0&quot; # This value is from the tray icon<br>export DISPLAY=&quot;$WSL_HOST_IP:$VC_XSRV_DISPLAY&quot; # Only DISPLAY is important, other variables are for clarity</pre><p>And your flutter doctor -v output related to Android should be mostly green. You may just need to run flutter doctor --android-licenses.</p><p>We’re almost there.</p><ol><li>Create a sample app: flutter create flutter_application_1</li><li><a href="https://developer.android.com/studio/debug/dev-options#enable">Enable developer mode</a> on your Android device.</li><li>In the developer settings enable USB debugging &amp; wireless debugging.</li><li>Connect your device to your PC with the cable.</li><li>Run adb devices and you probably won’t see your device listed even though it is connected.</li><li><strong>If</strong> adb devices returns empty list download platform tools for Windows: <a href="https://dl.google.com/android/repository/platform-tools-latest-windows.zip">https://dl.google.com/android/repository/platform-tools-latest-windows.zip</a> and run adb.exe tcpip 5555 (note that adb.exe --version output may need to be the exactly same with the one inside of WSL)</li><li>Unplug the cable.</li><li>Get your device’s IP address from Settings &gt; About &gt; Status (varies from device to device). You should see something like 192.168.1.5</li><li>Run adb connect 192.168.1.5 (WSL). If this step gives you an error message try disabling and enabling Wi-Fi on the phone.</li><li>Run adb devices and you should see it in the list.</li><li>Now you can run flutter run in your project and should see it appear on your device.</li></ol><p>When I first tried I got an SDK version related error. If you also get same error here’s the diff for fix:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yY_wLzZiXRbvrGilbjNulg.png" /><figcaption>Update compileSdkVersion &amp; targetSdkVersion in android/app/build.gradle &amp; ext.kotlin_version in android/build.gradle</figcaption></figure><p>Of course this is to just see the app on your device. Don’t forget to check which versions you should support depending on your requirements and update these accordingly.</p><p>By the way, this was my first blog post. I hope it was helpful.</p><p>Cya</p><h4>References</h4><ul><li><a href="https://stackoverflow.com/questions/55076924/how-to-connect-a-device-with-adb-over-wifi-when-making-app-with-flutter">https://stackoverflow.com/questions/55076924/how-to-connect-a-device-with-adb-over-wifi-when-making-app-with-flutter</a></li><li><a href="https://stackoverflow.com/questions/69034879/how-can-i-resolve-the-error-the-mincompilesdk-31-specified-in-a-dependencys">https://stackoverflow.com/questions/69034879/how-can-i-resolve-the-error-the-mincompilesdk-31-specified-in-a-dependencys</a></li><li><a href="https://stackoverflow.com/questions/67699823/module-was-compiled-with-an-incompatible-version-of-kotlin-the-binary-version-o">https://stackoverflow.com/questions/67699823/module-was-compiled-with-an-incompatible-version-of-kotlin-the-binary-version-o</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=261552d79031" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>