<?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[XapoLabs - Medium]]></title>
        <description><![CDATA[XapoLabs is a space for technological achievements of the team building Xapo Bank — The simplest way to bank with Bitcoin. We believe Bitcoin will do for money what the internet did for information. http://xapobank.com - Medium]]></description>
        <link>https://medium.com/xapolabs?source=rss----a0e519fef8b7---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>XapoLabs - Medium</title>
            <link>https://medium.com/xapolabs?source=rss----a0e519fef8b7---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 03:50:01 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/xapolabs" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[️When Collaboration Goes Too Far: How Software Engineers Slip Into Product Owner Roles]]></title>
            <link>https://medium.com/xapolabs/%EF%B8%8F-when-collaboration-goes-too-far-how-software-engineers-slip-into-product-owner-roles-faf7c311a8cc?source=rss----a0e519fef8b7---4</link>
            <guid isPermaLink="false">https://medium.com/p/faf7c311a8cc</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[product-management]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[leadership-development]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Jakub Łęgowik]]></dc:creator>
            <pubDate>Mon, 25 Nov 2024 12:14:13 GMT</pubDate>
            <atom:updated>2024-11-25T12:14:13.342Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dAIwvdbMUjdMuGTK" /></figure><p>Collaboration is the secret sauce of successful teams. When engineers, product owners, and designers come together to tackle challenges, magic happens — features align with business goals, and users benefit. 🎯</p><p>In my previous article:</p><p><a href="https://medium.com/xapolabs/from-no-to-lets-figure-this-out-breaking-silos-between-it-and-business-stakeholders-6d175b0ff7a5">🚀 From “No” to “Let’s Figure This Out”: Breaking Silos Between IT and Business Stakeholders</a></p><p>I explored how collaboration helps teams move beyond siloed thinking and align their efforts. <strong>But here’s the catch: collaboration only works when everyone stays in their lane.</strong></p><p>What happens when collaboration crosses the line? Imagine this: <em>a Software Engineer or Technical Leader, eager to help, starts defining user stories, prioritizing features, or setting sprint goals. Before they know it they’re doing the Product Owner’s job. </em>🤔</p><p>This well-intentioned overreach is more common than you think, and it comes at a cost. <strong>When roles blur, projects lose focus, responsibilities become unclear, and teams risk building the <em>wrong</em> thing at the expense of tech excellence. </strong>Additionally, when Technical Leads (TLs) take on Product Owner (PO) responsibilities, they often sacrifice the strategic planning required to maintain technical excellence, leading to long-term inefficiencies and missed opportunities.</p><p>This article dives into how software engineers can collaborate effectively without stepping into product owner territory. You’ll learn to:</p><ul><li>Recognize the subtle signs of overstepping.</li><li>Set boundaries that protect your time and expertise.</li><li>Partner with Product Owners to drive clarity and alignment.</li></ul><p>Let’s explore how to keep collaboration productive and avoid falling into the rabbit hole of role confusion. 🕳️✨</p><h3>🔗 Breaking Free from Silos: Why Collaboration Matters</h3><p>For years, engineers and business stakeholders worked in silos, each focused on their own corner of the project. Engineers handled the code, while stakeholders tossed over requirements like a hot potato. The result? Misaligned goals, wasted resources, and teams stuck in a cycle of frustration. 😤</p><p>The antidote? Collaboration. By aligning on the <em>“why”</em> before tackling the <em>“how,”</em> modern teams have rewritten the rulebook. Engineers, POs, and designers now come together to co-create solutions from the start.</p><p><strong>But here’s the catch: collaboration doesn’t mean engineers should start wearing a Product Owner hat.</strong></p><p>Strong partnerships flourish when every team member understands their role:</p><ul><li>🎯 <strong>Product Owners (POs)</strong> focus on the “what” and “why,” shaping the product vision and ensuring alignment with business objectives.</li><li>💻 <strong>Engineers</strong> focus on the “how,” crafting scalable, reliable solutions to realize that vision.</li><li>🤝 <strong>Technical Leaders (TLs)</strong> connect the dots by asking questions, identifying the right team members for tasks, assessing skills, and setting realistic delivery timelines. They ensure clarity, alignment, and seamless collaboration between strategy and execution.</li></ul><p>This isn’t about working in silos — it’s about owning decisions while actively challenging one another to achieve the best outcomes. Product Owners, Technical Leaders, and Engineers must ask the right questions, push back when needed, and collaborate to refine ideas.</p><p>When each role respects its boundaries but remains engaged in constructive dialogue, the team operates efficiently and avoids the confusion of overlapping responsibilities or unclear ownership. 🚫</p><h3>🚨 When Collaboration Becomes a Rabbit Hole: Helping vs. Overstepping</h3><p>Engineers are natural problem-solvers, bringing immense value when they dig into the business, brainstorm ideas, and help shape solutions. Their expertise can be a game-changer — but sometimes, their eagerness to help crosses the line, leading to unintended pitfalls. 🤔🚧</p><p>Often, engineers step up to fill gaps when Product Owners (POs) aren’t fully prepared — clarifying goals, defining target personas, or prioritizing features. While it may seem helpful at the moment, this overreach often backfires:</p><ul><li>🧠 <strong>Lost Focus:</strong> Engineers divert their energy to tasks outside their expertise, diluting their impact.</li><li>🤷‍♂️ <strong>Blurred Accountability:</strong> POs and stakeholders start leaning on engineers instead of addressing the real gaps.</li><li>💸 <strong>Wasted Resources:</strong> Without a solid vision, projects veer off track, often leading to costly rework.</li></ul><p>In their effort to help, engineers may unintentionally take on roles that aren’t theirs, leading to:</p><ul><li><strong>Scope Creep</strong>: Engineers may take on areas like product strategy or operations, often at the expense of core technical priorities such as architecture, quality, scalability, or infra-cost efficiency. The result? Technical excellence quietly takes a backseat.</li><li><strong>Role Confusion</strong>: Lines blur between engineers and Product Owners (POs), leading to inefficiencies and duplicated efforts.</li><li><strong>Burnout</strong>: The mental load of juggling technical execution and business alignment can overwhelm engineers, especially when these roles demand different skill sets.</li></ul><h4>🔁 The Danger of Endless Cycles</h4><p>The most harmful outcome is when collaboration shifts from solving problems to endless cycles of discussions and follow-ups. Engineers end up stuck in the middle, neither fully focused on their technical expertise nor able to provide long-term value in a product strategy role.</p><p><strong>Key Takeaway:</strong> Collaboration is essential, but it must have boundaries. Engineers thrive when they focus on the <strong>“how,”</strong> while Product Owners own the <strong>“what”</strong> and <strong>“why.”</strong> When roles are respected, the team works harmoniously, avoids overreach, and delivers sustainable success.</p><p>What begins as good intentions can snowball into inefficiency and confusion. The solution? <strong>Collaboration with clear boundaries that let everyone play to their strengths. 🎯💡</strong></p><h4>💰 The Hidden Cost: When TLs Lose Focus on Technical Strategy</h4><p>While collaboration is essential, it’s equally important to recognize the hidden costs of overstepping. For Technical Leads (TLs), stepping into the shoes of a Product Owner (PO) often comes at the expense of strategic technical planning.</p><p>When TLs focus too heavily on product-related decisions — such as defining scope or prioritizing features — they lose the time and capacity needed to plan critical technical improvements. This can have far-reaching consequences:</p><ul><li>🛠️ <strong>Neglected Technical Upgrades</strong>: Infrastructure enhancements, performance tuning, and reducing technical debt often get sidelined, hindering long-term efficiency and growth.</li><li>📉 <strong>Weakened Tech Strategy</strong>: Without focused leadership, the team may miss opportunities to future-proof systems or innovate.</li><li>⏳ <strong>Increased Operational Complexity</strong>: A lack of technical foresight can lead to more rework, higher costs, and scalability challenges.</li></ul><p>Strategic planning is a core responsibility of TLs. It’s their role to assess the technical landscape, identify potential risks, and advocate for improvements that drive scalability and reliability. When this focus is diluted, the entire team suffers.</p><p>By maintaining boundaries and staying aligned with their primary responsibilities, TLs can ensure that technical excellence remains a cornerstone of the product development process.</p><h3>🕳️🐇 How to Stay Out of the Rabbit Hole</h3><h4>🏖️ Avoid Building on Quicksand: Focus Efforts Where They Matter</h4><p>In high-performing teams, the instinct to push for more features or faster delivery often feels natural. While this drive can be productive, it can also lead to a dangerous cycle of escalating expectations: <em>deliver more, deliver faster.</em></p><p>But at some point, the critical question must be asked:</p><blockquote>“Why should we go faster?”</blockquote><p>Without a clearly defined target audience or a solid direction, speed won’t fix underlying issues. An unclear business vision only amplifies confusion, leading to both technical and operational debt. <strong>It’s easy to feel like we’re doing <em>so much</em>, but the hard truth is we might not be doing the <em>right</em> things.</strong></p><p>Mature teams should recognize when it’s time to pause, realign, and redirect resources to other priorities until clarity is achieved. This balance requires team-wide alignment, particularly between the Product Owner (PO) and Technical Leader (TL). By working together, they can prevent the chaos of chasing unclear visions and ensure the project stays on track.</p><p><strong>Sometimes, the best decision isn’t to move forward — it’s to pause.</strong></p><h4>🛑 Master the Skill of Recognizing the “No-Go Moment”</h4><p>One of the most valuable skills for engineers is knowing when a project is not ready to proceed. This ability helps avoid unnecessary delays or misaligned efforts, allowing the team to focus on meaningful work without engineers stepping into the PO’s role.</p><p>Here are the key signs of a project’s “no-go moment”:</p><ul><li><strong>❓ Unclear Success Metrics:</strong> If the PO can’t clearly define what success looks like, it’s a red flag. Engineers need measurable goals to align their work with business outcomes.</li><li><strong>🧩 Undefined Problem Space:</strong> A product idea without a well-defined problem to solve is just noise. Engineers can’t — and shouldn’t — waste time guessing.</li><li><strong>🌀 A Collection of Vague Ideas:</strong> If a project feels more like a mix of opinions than a coherent plan, it’s time to pause and realign.</li></ul><p>When faced with a “no-go moment,” it’s crucial to stop and ask critical questions:</p><blockquote>“What does success look like?”</blockquote><blockquote>“Who is the target user?”</blockquote><blockquote>“What assumptions are driving this initiative?”</blockquote><p>Pausing to gain clarity isn’t about slowing down — it’s about making thoughtful decisions that prevent wasted effort and set the team up for long-term success. Recognizing the “no-go moment” ensures that every step forward is purposeful, strategic, and aligned with clear goals.</p><h4>💡 Provide Constructive Pushback</h4><p>When a Product Owner (PO) is unprepared, forging ahead can often do more harm than good. Instead of proceeding blindly, engineers can take proactive steps to support and guide the PO in strengthening the project’s foundation:</p><ul><li><strong>🔍 Highlight the Gaps:</strong> Identify areas where the plan lacks clarity, such as missing success metrics, undefined problem spaces, or vague assumptions. Be specific about what’s unclear and why it matters.</li><li><strong>🛠️ Facilitate Alignment Workshops:</strong> Collaborate with the PO and team to define measurable success metrics, solidify the target audience, and clarify the initiative’s objectives. Workshops or structured discussions can create a shared understanding and actionable direction.</li><li><strong>🕒 Advocate for a Pause:</strong> If critical elements of the vision are still missing, don’t hesitate to suggest postponing the project. It’s better to delay than to waste time and resources on a misaligned or undefined initiative.</li></ul><p>Constructive pushback isn’t about criticism — it’s about ensuring the team has a solid foundation to build on, setting the stage for meaningful and sustainable progress. However, it’s equally important to avoid stepping into the role of the Product Owner. The key is to help, guide, and facilitate without taking over their responsibilities.</p><p>From experience, I know this balance is tough to maintain, but it’s the only way to empower both engineers and POs to excel in their respective roles while fostering true collaboration.</p><h4>⚖️ Balance Priorities Without Overstepping</h4><p>Collaboration is more than working together — it’s about navigating competing priorities. Internal technical needs, like infrastructure upgrades, often clash with external business goals, such as launching new features. So, how do you avoid falling into the rabbit hole of taking over a Product Owner’s role while finding the right balance?</p><p>Here’s an example:</p><ul><li><strong>🛠️ Engineers identify infrastructure optimizations</strong> that require some refactoring but could save $160/month and reduce operational complexity.</li><li><strong>💰 The business proposes a new product</strong> expected to generate an extra $10,000/month in revenue.</li></ul><p>At first glance, the business project seems like the obvious choice. But it’s not always so simple:</p><ul><li><strong>Short-term Wins:</strong> The product promises revenue but comes with risks. Is the vision clear? Are success metrics defined? Are there symptoms of “No-Go Moment”? Without these, you’re betting on uncertainty.</li><li><strong>Long-term Gains:</strong> Infrastructure improvements may not seem exciting, but their benefits go far beyond saving $160 a month. They reduce cognitive load, simplify complexity, and improve reliability, leading to fewer incidents and faster fixes. Streamlined systems also boost scalability, operational efficiency, and long-term cost savings — laying the groundwork for sustainable growth.</li></ul><p>The key is asking: <strong>What delivers the most value over time?</strong></p><p>Balancing priorities doesn’t mean choosing one over the other. It’s about making informed, collaborative decisions without engineers stepping into the PO’s shoes.</p><p>Engineers should guide the conversation — highlighting risks, benefits, and trade-offs — while letting the PO own the final decision on <em>what</em> and <em>why</em> to build. However, it’s crucial for the PO to understand the importance of technology. Decision-making shouldn’t just prioritize business-focused projects; it must also account for other categories, such as reducing technical debt, improving operational stability, or optimizing flows.</p><p>By considering both business goals and technical needs, POs can balance immediate outcomes with long-term sustainability, ensuring both short-term wins and foundational growth align for maximum impact. 🚀</p><h3>🔑 Key Takeaways: Keeping Collaboration Balanced and Productive</h3><ol><li><strong>Clear Role Definitions</strong>: Engineers solve technical challenges; Product Owners (POs) define product vision. Boundaries empower teams to excel in their strengths without role confusion.</li><li><strong>Collaborative Problem Exploration</strong>: Involve engineers early for technical insights, but let POs steer the “what” and “why.”</li><li><strong>Empowered Product Ownership</strong>: Confident POs set success metrics, prevent chaos, and keep engineers focused on technical priorities.</li><li><strong>Transparent Communication</strong>: Open dialogue ensures concerns are addressed without overstepping roles, maintaining alignment and trust.</li><li><strong>Focus on Technical Excellence</strong>: Engineers thrive when dedicated to architecture, quality, and scalability — key drivers of innovation and long-term value.</li><li><strong>Teamwide Maturity</strong>: Balanced priorities and aligned efforts avoid burnout and foster sustainable success. Collaboration should empower, not blur, roles.</li></ol><h3>🌟 <strong>Conclusion: Building Together, Staying in Your Lane</strong></h3><p>Collaboration is the backbone of successful product development, but its power lies in each role embracing its unique responsibilities. Technical Leads (TLs) and Software Engineers add immense value by refining scope and addressing gaps, but overstepping into Product Owner (PO) territory dilutes focus and undermines long-term success. True teamwork means leveraging diverse expertise to complement — not compete — with each other.</p><p>The key to iterative product success is aligning the “Three Amigos” — TL, PO, and Designer — within their domains of business, technology, and design. Without clarity on objectives or a shared understanding of goals, teams risk inefficiency, confusion, and misaligned priorities. When roles blur, ownership falters, and the product’s scalability and direction suffer.</p><p>Balance is the foundation of effective collaboration. POs should lead with business priorities, TLs must focus on technical strategy, and Designers should steer user experience. Staying aligned through transparency, clear communication, and accountability enables teams to build sustainable, impactful products. <strong>Together, we achieve the best outcomes by respecting boundaries and excelling in our respective lanes.🚀</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=faf7c311a8cc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xapolabs/%EF%B8%8F-when-collaboration-goes-too-far-how-software-engineers-slip-into-product-owner-roles-faf7c311a8cc">🕳️🐇When Collaboration Goes Too Far: How Software Engineers Slip Into Product Owner Roles</a> was originally published in <a href="https://medium.com/xapolabs">XapoLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ From “No” to “Let’s Figure This Out”: Breaking Silos Between IT and Business Stakeholders]]></title>
            <link>https://medium.com/xapolabs/from-no-to-lets-figure-this-out-breaking-silos-between-it-and-business-stakeholders-6d175b0ff7a5?source=rss----a0e519fef8b7---4</link>
            <guid isPermaLink="false">https://medium.com/p/6d175b0ff7a5</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[leadership-development]]></category>
            <category><![CDATA[engineering-mangement]]></category>
            <category><![CDATA[leadership]]></category>
            <category><![CDATA[leading-engineers]]></category>
            <dc:creator><![CDATA[Jakub Łęgowik]]></dc:creator>
            <pubDate>Mon, 28 Oct 2024 16:33:29 GMT</pubDate>
            <atom:updated>2024-10-28T16:33:29.183Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*ge1MpVMYaWni663q-i7A2Q.png" /></figure><p>Throughout my journey from Software Engineer to Technical Leader and now as a Technical Tribe Lead, I’ve seen firsthand how the divide between IT and key stakeholders — such as leadership, product teams, and other contributors involved in building the product — can lead to misunderstandings, frustrations, and even missed opportunities.</p><p>For a long time as a member of the engineering team, I was stuck in a mindset where <strong>my job was to say “no” to poorly defined requests and to push back against unclear requirements</strong>. But I’ve come to realize that a “no-first” approach doesn’t serve anyone. Shifting towards a partnership-based approach is the key to boosting collaboration, productivity, and shared success.</p><h3>🏗️ How I Got Stuck in a Silo Mindset</h3><p>I remember when my team’s typical response to business requests sounded something like:</p><blockquote>…“Give us clear acceptance criteria because we’re here to write code, not collect requrements — we’re not product people.”</blockquote><blockquote>“Are you serious? That’s not our job. Go handle it yourself!”</blockquote><blockquote>“This is unachievable with the current deadline! There’s no way we can deliver on time.”</blockquote><p><strong>The result? We were always passing the blame back and forth. Over time, I noticed that the stakeholders began treating us (engineers) as a group of complainers who pushed back against everything.</strong></p><p>This created a massive disconnect. 🧱 Business teams started throwing requests over the wall without considering our input, and we responded by robotically executing tasks, staying disengaged from decision-making. We’d become isolated, operating in silos. And honestly, it wasn’t a great feeling to be treated as a mere executor of tasks. 🤖</p><p><strong>To be clear, we did this to ourselves...</strong></p><p>🔧 We marginalized ourselves through our own behavior and turned into MERCENARIES focused solely on completing tasks. 💼 But is an engineer’s job really just about executing orders handed down by someone else? 🤔</p><p><strong>Shouldn’t we be solving problems? Isn’t problem-solving the true fuel that drives and motivates us?</strong> 🚀</p><h3>💡 Embracing a Collaborative Mindset</h3><p>I realized that something had to change. In today’s fast-paced environment, IT and stakeholders must collaborate more closely than ever. Instead of viewing product or strategy requests as disruptions or unwelcome intrusions, I started to see them as opportunities for collaboration. 🤝</p><p>I came to understand that stakeholders and IT professionals think from different perspectives. As a Software Engineer, when I receive a button request, I consider its purpose, how it integrates with other systems, and how to break its implementation into smaller, deployable units.<strong> I even question whether it’s essential to add that functionality.</strong> But for a non-tech person, a button is simply a button that needs to get the job done — and that’s completely okay! ✅</p><p>When stakeholders communicate their needs without providing full context, it’s not a reflection of undervaluing an engineer’s expertise — it often stems from a lack of understanding of the technical complexities. They may not realize that even minor details are vital for IT specialists to make informed decisions. <strong>Simply speaking, engineers need to understand the “WHY” behind every request.</strong></p><p>So, instead of shooting down requests with a flat “no,” I began asking questions like:</p><blockquote>“What problem are you trying to solve?”</blockquote><blockquote>“How will this change impact other parts of the system?”</blockquote><blockquote>“Could you walk me through your daily workflow in this part of the system?”</blockquote><p>This shift in mindset enabled me to guide stakeholders toward practical solutions instead of shutting down their ideas. 💬🎯</p><p>One of the most valuable tools in my engineering toolbox turned out to be shadowing. While some might argue, <em>“We don’t have time to spend 1 or 2 days with the FinOps team — we have tasks to deliver!”</em> 📅💻. <strong>The truth is that product building by software engineers often results in wasted effort when tasks aren’t clearly defined or understood from the start.</strong></p><p>Without clear expectations or well-defined requirements, misunderstandings lead to unnecessary redesigns and rework. This shows just how vital precise communication and early alignment are. Shadowing bridges this gap by giving engineers a deep understanding of the business processes they’re supporting. 🤝 By observing firsthand, we can eliminate miscommunication and work with the right context from the beginning. 🚀</p><p>This small investment of time prevents rework and leads to smarter, more efficient solutions. 🛠️💡</p><h3>🛠️ Facilitating, Not Doing</h3><p>A big lesson I learned was to strike a <strong>balance</strong> between helping the business team and taking on tasks that weren’t strictly in my domain. When a request came in that wasn’t quite IT’s responsibility, rather than rejecting it outright, I focused on <strong>facilitating their success</strong>. Sometimes, this meant creating a simple framework or putting together a document that helped them better understand the process. 📋💡</p><p>By asking thoughtful questions like, <em>“What’s your ultimate goal?”</em> or <em>“Have you thought about how this might affect other departments?”</em> I encouraged the business team to think more deeply and view their needs from multiple angles, helping them clearly define the problem space. This made them feel supported and helped me contribute meaningfully without feeling overwhelmed. 🧠🤝</p><p>Software Engineers, Technical Leaders, and everyone involved in building the product have a unique experience in facilitating such efforts. This expertise positions us to support and guide others.</p><p>Our mission is to simplify the work of operational teams, improve products, eliminate complexity, and solve problems through technology. We have the unique skills and abstract thinking needed to achieve these goals. After all, the success of the business team is our success as well. 💡🤝</p><p><strong>In summary, it’s essential that stakeholders provide us with the problems they need solved, not just a list of tasks.</strong> Understanding the core issues allows us to create effective solutions that align with their goals and drive real impact.</p><h3>💼 The Benefits of Collaboration</h3><p>Adopting a <strong>collaborative mindset</strong> changed everything. I realized that explaining technical details in a way business teams could understand didn’t just help them — it helped me too. I was no longer a silent executor; I was a part of the conversation, influencing decisions and shaping projects. 🛠️</p><p>For the business team, this partnership meant they were heard and supported without feeling dismissed. <strong>Over time, they started to see me and the IT team as valuable partners in solving problems rather than a group that only delivered roadblocks.</strong> And honestly, that mutual respect felt amazing. 🤗</p><h3>🌟 Conclusion: Building a Partnership-Based Future</h3><p>At the end of the day, all teams share the same goal: <strong>to deliver successful projects that drive the organization forward</strong>. By breaking away from the silo mentality and focusing on collaboration and understanding, I helped tear down those walls that had formed over the years. 💪🏽</p><p>Now, when a stakeholder approaches me with a request, instead of thinking, <em>“This isn’t my job,”</em> I see it as an <strong>opportunity to collaborate</strong>. I’ve learned that by guiding their efforts and encouraging deeper thinking, I can help build partnerships that lead to bigger wins for everyone. 🙌🏼</p><p><strong>***If you’re a stakeholder reading this:</strong> <em>REMEMBER to focus on presenting the problems and spend more time illustrating them from different perspectives, rather than defining specific tasks for engineers. </em><strong><em>Solving issues and making people’s lives easier is what they do best — that’s their expertise!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d175b0ff7a5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xapolabs/from-no-to-lets-figure-this-out-breaking-silos-between-it-and-business-stakeholders-6d175b0ff7a5">🚀 From “No” to “Let’s Figure This Out”: Breaking Silos Between IT and Business Stakeholders</a> was originally published in <a href="https://medium.com/xapolabs">XapoLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From Streamlined Teams to KPI Mastery: Xapo’s Blueprint for Business-Technology Alignment]]></title>
            <link>https://medium.com/xapolabs/from-streamlined-teams-to-kpi-mastery-xapos-blueprint-for-business-technology-alignment-ec091246a8d9?source=rss----a0e519fef8b7---4</link>
            <guid isPermaLink="false">https://medium.com/p/ec091246a8d9</guid>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[domain-driven-design]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[leadership]]></category>
            <dc:creator><![CDATA[Kamil Dziublinski]]></dc:creator>
            <pubDate>Tue, 14 May 2024 09:50:57 GMT</pubDate>
            <atom:updated>2024-05-14T09:50:57.822Z</atom:updated>
            <content:encoded><![CDATA[<p>In today’s rapidly evolving tech landscape, aligning business strategy with effective team structures and technology execution is crucial for organizational success. At Xapo Bank, we’ve pioneered a unique approach combining team topologies, Domain-Driven Design (DDD), and Key Performance Indicators (KPIs) to bridge this gap. <br>Here’s how we do it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/581/1*hwmMpFk058z7_pp1_Yzapg.png" /><figcaption>A partial glimpse into team topologies at Xapo Bank</figcaption></figure><h3>Foundation of Our Team Structure</h3><p>Adopting the ‘<a href="https://teamtopologies.com/">Team Topologies</a>’ framework by Matthew Skelton &amp; Manuel Pais fundamentally shifted our approach to structuring teams at Xapo Bank. Initially, the concept of Stream Aligned Teams (SATs) was met with curiosity and some skepticism. However, as we began to see the impact of this model — enhanced collaboration and streamlined processes — the value became undeniably clear. This wasn’t just a new team model; it was a strategic shift towards greater efficiency.</p><p>Stream Aligned Teams (SATs) are composed to be self-sufficient and usually consist of backend engineers, mobile engineers, technical leads, product owners, and designers. I intentionally didn’t use the word “cross-functional,” as there might be teams that don’t require all of those roles. For example, teams focusing on back office work won’t require front-end engineers, obviously. Other teams might require additional roles like web engineers, etc.</p><p>To support our SATs, we have multiple platform and enabling teams, such as Apps Platform, Platform Engineering, Data, Security, or Engineering Enabling team. Those teams focus primarily on improving efficiency of SATs (or other supporting teams).</p><p>Enabling teams are designed to step in, assist, and then step back. Their primary objective is to empower the main team, strategically planning their own redundancy as the project progresses and the main team is finally able to fully take over the newly introduced method, framework, etc.</p><p>Platform teams, like the Platform Engineering Team, develop internal platforms as a product to make the work of product-focused engineers much more efficient and, of course, ensure our infrastructure is robust.</p><p>The same rule applies to remaining supporting teams, depending on the need they have for their primary team topology. This helps them to understand the nature of their work, how to engage with other teams, set the right goals, and execute what is needed.</p><h3>Utilizing Conway’s Law to Our Advantage</h3><p>We’ve structured our setup to ensure <strong>Conway’s Law</strong> works in our favor. If you haven’t had a chance to hear what that is, in short, it explains how the software we build and the architecture beneath it resemble communication patterns and organizational structures within the company. In other words, bad team structures translate into poor architectural design and, with that, very often, poor time to market.</p><h3><strong>Empowering Teams with Domain-Driven Design</strong></h3><p>Responsibilities between our Stream Aligned Teams (SATs) are spread so that, on the one hand, teams have as much autonomy as possible and, on the other hand, cognitive load is on a healthy level. And this is where implementing Domain Driven Design is of great aid. A while ago, we did a discovery of all the subdomains that are present at Xapo Bank. With that, a division of bounded contexts also emerged.</p><p>The way we approached discovery was, through series of workshops. Our goal was to create a context map for our architecture. But to get there, we first started with big picture event storming done by all teams to discover subdomains.</p><p>After that, we utilized a helpful method to find details about discovered subdomains and map them to bounded contexts. For that, we used <a href="https://github.com/ddd-crew/bounded-context-canvas"><strong>Bounded Context Canvas</strong></a><strong>,</strong> as described by Nick Tune. We slightly adjusted the template for our needs, but below, you can see an example of one of the bounded contexts at Xapo Bank.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tkJF4MlhQ9SnrG0oSgT1Ug.png" /></figure><p>Last but not least, with all the information, our final goal was to create two versions of context maps.</p><ol><li>As is — reflecting the current situation</li><li>To be — reflecting where we want to get to</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/736/1*MeZCJUQFh3AIs9yyecAveQ.png" /><figcaption>A snippet of the diagram showing how different contexts talk to each other</figcaption></figure><p>If you’re curious about what those mysterious abbreviations like CF, OHS, D, U, etc. mean, I recommend you check out <a href="https://github.com/ddd-crew/context-mapping/blob/master/README.md">context-mapping GitHub from ddd-crew</a>, where you’ll be able to find useful explanations &amp; cheat sheets.</p><p>This exercise established clear ownership throughout our architecture, with each bounded context being managed by a specific team. While other teams can contribute as needed, having defined ownership is crucial for preventing disorder and maintaining organizational clarity.</p><p>I remember the initial resistance when introducing the concept of DDD. It was a major shift from a traditional approach to architecture, but the transformation in our project delivery speed was undeniable. Now, Domain-Driven design is ingrained in our engineering culture.</p><p>Of course, things are not perfect, but I believe continuous improvement is much more important than aiming for perfection from day one — the latter is expensive and rarely works anyway.</p><h3><strong>Bridging Business and Tech with KPIs</strong></h3><p>I described how team topologies helped us structure our teams to be efficient; I explained how Domain Driven Design is helping us spread responsibilities and ownership between our teams. One ingredient missing here that we felt is essential for a functional setup. How can the gap between business direction and technology focus be bridged? For that, we introduced the notion of tribes. These structural constructs combine multiple SATs, and the tribes reflect key business metrics Xapo Bank wants to focus on. This allows for interesting maneuvers, like sharing mobile engineers within a tribe based on prioritization instead of assigning them full-time to one team. It allows for more efficiency while maintaining the correct level of domain ownership.</p><p>An example of one such tribe was our Conversion tribe. Product teams (SATs) in that tribe had one KPI to improve. Conversion rate. In that metric, we track how many users who started the registration process became trial members. Clear ownership of one critical KPI for teams that belong to that tribe, like Customer Acquisition &amp; Onboarding (CAO) and Financial Crime Prevention (FCP), allowed them to prioritize initiatives to move the needle on this critical business metric. They had complete autonomy in making decisions like which parts of the funnel to improve and how. Improving UX, improving internal processes or even upgrading vendors. This setup had such effectiveness that it allowed us to increase the conversion rate by <strong>9x</strong>. This is an excellent example of a strategic use of KPIs.</p><h3>Adapting to Change</h3><p>You may have noticed I wrote that this tribe “was” called <strong>Conversion</strong> tribe. That is because it has evolved into <strong>Growth</strong> tribe. This change was more than symbolic—it reflected a deeper shift in our goals and strategy, focusing not just on conversion but on wider business growth. After surpassing our targets for conversion rates, it became clear that the scope of this tribe’s influence could be broadened. So, we refocused one of the teams to start collaborating very closely with our marketing team to enhance their work with technology. With that, we became much more efficient in our performance marketing, allowing us to bring more quality applicants with smaller marketing spend.</p><p>I mentioned the above change to emphasize the importance of evolving organizational structures. The pace of change is incredibly fast these days. To be a successful business, one needs to adapt to new demands quickly. Even at the moment of writing this article, I already know there will be new teams and tribes introduced in the near future, and that inevitably will also introduce evolutions to existing teams. <strong>And that is natural.</strong></p><p>The way our Technology department is set up and the way we collaborate with Product &amp; the rest of the organization allows for efficient delivery while maintaining elite-level reliability. Of course, just the organizational setup won’t suffice; this must be combined with high talent density, high-performing culture, and exemplary leadership at multiple levels. But that probably deserves a separate article ;)</p><p>In the swiftly changing landscape of global business, the only constant is change itself. At Xapo Bank, our adaptive structures not only support our current goals but are poised to evolve with our ambitious vision. Is your organization ready for the next shift?</p><p>How does your organization align business and tech? Share your strategies or thoughts in the comments below!</p><p>If you’re interested in learning more about Xapo Bank — The simplest way to bank with Bitcoin, explore the resources at <a href="http://xapobank.com/">xapobank.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ec091246a8d9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xapolabs/from-streamlined-teams-to-kpi-mastery-xapos-blueprint-for-business-technology-alignment-ec091246a8d9">From Streamlined Teams to KPI Mastery: Xapo’s Blueprint for Business-Technology Alignment</a> was originally published in <a href="https://medium.com/xapolabs">XapoLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Practical Approach to Increasing Team Autonomy with Command-Based Notifications Service]]></title>
            <link>https://medium.com/xapolabs/a-practical-approach-to-increasing-team-autonomy-with-command-based-notifications-service-36808f244285?source=rss----a0e519fef8b7---4</link>
            <guid isPermaLink="false">https://medium.com/p/36808f244285</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[domain-driven-design]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Michał Baran]]></dc:creator>
            <pubDate>Tue, 27 Jun 2023 09:24:36 GMT</pubDate>
            <atom:updated>2023-06-27T09:24:36.681Z</atom:updated>
            <content:encoded><![CDATA[<p>Most likely, all companies that sell products send notifications of any kind to their clients. Unless the company’s primary focus is on sending notifications, customer communication is likely considered a “supporting” bounded context. This shouldn’t take up too many resources, allowing the team to concentrate on other domains of the business that <strong>generate revenue</strong>, which is known as “core” bounded contexts. The client communication bounded context, which involves sending various types of notifications such as emails, push notifications, in-app notifications, and text messages (SMS), can be implemented in multiple ways.</p><h3>Every team integrates its own notification system</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AsMO1wAUNnZkyRouXThCyg.jpeg" /></figure><p>Integrating notifications independently in each team has advantages, such as not relying on other teams and being able to add new notifications to the team’s backlog whenever necessary. However, this approach also has a disadvantage that is not as obvious — responsibility and ownership are dispersed among all teams. It is unclear which team should take responsibility for solving issues such as exceeding the API rate limit. In a monolithic architecture, this approach may work since there is only one codebase and one SDK used by multiple teams. However, in a microservice architecture, the goal is not simply to divide the monolith into microservices but to build microservices based on bounded contexts that reflect actual business functionality in the company.</p><h3>Centralized notification service</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vAoyvPKNNkJpXQIFe8rURg.jpeg" /></figure><p>This approach offers a solution to the problem of dispersed responsibility as one team will be in charge of maintaining the service. However, it leads to a team cooperation issue where other teams might get stuck waiting on the notification service team to implement new notifications or the team that owns the notifications service have totally different priorities. It’s also not ideal to force other teams to contribute to the notification service as it takes time for them to learn and can cause bottlenecks like waiting for the code review. This can result in more engineering power being focused on the “supporting” domain rather than the more important “core” domains. Ideally, a solution that doesn’t require modification to the notification service would be preferred, allowing each team to focus on their priorities and only modify their own services as necessary. This would eliminate the need to worry about issues like external vendor API implementation, throttling, retrying, monitoring, and other related matters.</p><h3>The centralized event-based notification service</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gulxu8Tv0CJ54EYwEQJ9BA.jpeg" /></figure><p>In a microservice architecture, it’s common to have services communicate with each other using events. When important actions occur, like a user registering, services produce events that are sent to a queue. This can result in a large number of events covering most of the implemented business processes, which may lead to a desire to build an event-based notification service. However, teams built on bounded contexts in a DDD-aligned system aim not only to separate functionalities but also to provide autonomy for each team to make changes. There are two approaches to the event-based notification service.</p><p>The firs option is for the dedicated team that manages the notification service to handle any changes. This would require team members to grasp the intricacies of the event-producing service in order to determine when to trigger notifications. This can be a significant cognitive burden, particularly in complex domains such as cryptocurrency.</p><p>The second approach is that the notification service is owned by a dedicated team (Team B), but a member of another team (Team A) who is responsible for that sophisticated service may implement a new notification. This approach reduces cognitive load compared to the first approach, but Team A still needs to learn how the notification service works, contribute to it, and wait for Team B’s approval, which does not provide complete autonomy.</p><p>Furthermore, notifications frequently demand supplementary details such as currency and amount, and generally, all the necessary data is sent with the event. Regrettably, there are cases where the required information is missing. It is logical to include currency and amount in a sample event that reports money withdrawal. However, an issue arises when a notification necessitates a property that doesn’t fit within a specific bounded context, or when it is impossible to obtain the information at all. For instance, the current account balance is calculated in a different service after a money withdrawal, where generating another event for balance calculation is redundant.</p><h3>The centralized command-based notification service</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Snp7FUMG6bb2gUuYQoN2eg.jpeg" /></figure><p>To address the issue of lack of autonomy, a command-based notification service can be used. With this approach, Team A does not have to rely on Team B for implementation or contribute to a codebase that they are not familiar with when integrating a new notification. Instead, they can produce a message to a dedicated queue, which the notification service will use to send the notification to the user. The communication can be either asynchronous (queue-based) or synchronous (HTTP-based, such as REST). The notification service will handle retrying in case of downtime and throttling if traffic increases or if the API rate limit is exceeded. Changes to the API can be made in one place, and it will be clear which team is responsible for making those changes. This approach follows the Open Host Service (OHS) pattern, where an upstream (Team B in this case) provides an open API that downstream teams can consume.</p><p>Despite the benefits, this approach also has some disadvantages. When a new type of notification is added, the notification service might need to be modified, which means that Team B will have to handle the modification request. This means that every change request will add to Team B’s backlog. However, notification channels do not change as frequently as new notifications are introduced.</p><p>Some notifications, such as OTP, are critical and must be received immediately, while for others, a delay of a few seconds or even minutes may not be significant. As traffic increases, a single queue may become a bottleneck, not due to infrastructure limitations, but due to a lack of notification prioritization. To avoid being blocked by less important notifications, such as birthday wishes, critical notifications can be sent via a dedicated queue.</p><p>If you’re interested in learning more about Xapo Bank — Bitcoin Bank providing simple and safe usability to retail customers, explore the resources at <a href="http://xapobank.com/">xapobank.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=36808f244285" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xapolabs/a-practical-approach-to-increasing-team-autonomy-with-command-based-notifications-service-36808f244285">A Practical Approach to Increasing Team Autonomy with Command-Based Notifications Service</a> was originally published in <a href="https://medium.com/xapolabs">XapoLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring SwiftUI — A Broad Overview 1/4: SwiftUI vs UIKit]]></title>
            <link>https://medium.com/xapolabs/exploring-swiftui-a-broad-overview-1-4-swiftui-vs-uikit-74eda4bd3f0c?source=rss----a0e519fef8b7---4</link>
            <guid isPermaLink="false">https://medium.com/p/74eda4bd3f0c</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Razvan Bogdan]]></dc:creator>
            <pubDate>Tue, 27 Jun 2023 09:24:32 GMT</pubDate>
            <atom:updated>2023-06-27T09:24:32.388Z</atom:updated>
            <content:encoded><![CDATA[<h3>Exploring SwiftUI - A Broad Overview 1/4: SwiftUI vs UIKit</h3><h4>This article is the 1st of a series of 4 aimed at exploring the capabilities of SwiftUI. Happy reading!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JGvrVsp3nYmj4Uu92Oxpng.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jstrippa?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">James Harrison</a> on <a href="https://unsplash.com/photos/vpOeXr5wmR4?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>Intro</h3><p>SwiftUI has been around since 2019 already. It was first introduced by Apple with iOS13 and is built to be less verbose and intuitive than its UIKit counterpart.</p><p>It had a slow start, lacking a lot of functionalities which were already available in UIKit. One could say, it was released as a PoC. But slowly, it grew mature, and more and more projects are adopting it. With every release of iOS, Apple enriches SwiftUI’s capabilities by providing new functionality.</p><h3>SwiftUI vs UIKit</h3><p>Let’s explore some benefits of using SwiftUI over UIKit:</p><ul><li>its declarative syntax is more robust than UIKit’s imperative approach, allowing developers to define the desired outcome of a UI element, rather than detailing the exact steps needed to create that element;</li><li>its two-way-binding approach, where the UI gets updated automatically in response to data changes;</li><li>the code is more readable and easier to understand. Gone are the days when solving conflicts in <em>.xib</em> files or in programmatically-written UI were a thing;</li><li>allows for faster and more efficient development and debugging. Building UI using SwiftUI requires less code as it provides automatic layout management, reducing the risk for errors;</li><li>makes it easier to create and make use of custom reusable UI, also with the help of <em>Live Previews</em> which speed up the feedback process;</li></ul><h3>Example</h3><p>But it’s always better to have a visual example. For the sake of this exercise, let’s create a simple form containing two text fields and a button, without any logic. We will create the same UI in both UIKit and in SwiftUI and compare the results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*zWjG9vMOkXJ8AYHnIeRrSw.jpeg" /><figcaption>The user interface we will be building.</figcaption></figure><p>Here’s how this UI would be built programatically in UIKit:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5aaba5563badd910907cf6bacdcb17f8/href">https://medium.com/media/5aaba5563badd910907cf6bacdcb17f8/href</a></iframe><p>And this is how it would be built in SwiftUI:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffb7c462e5276632c107a082a04835a0/href">https://medium.com/media/ffb7c462e5276632c107a082a04835a0/href</a></iframe><p>Notice in the UIKit example the need to build element hierarchies manually and setup constraints using a really cumbersome way. SwiftUI takes away all that pain and adds the declarative sintactic sugar that makes it more efficient to implement and change UI related code.</p><p>Even more, notice the number of lines needed to create the ui in UIKit (31), compared to SwiftUI (13). And this is just a small example; in larger, more complex user interfaces the difference becomes even more noticeable.</p><h3>Conclusion</h3><p>As the SwiftUI framework is getting more and more mature and its community continues to expand, it is increasingly preferred as <strong>the</strong> choice of building the UI in iOS applications. Its growing popularity and versatility have led to its adoption by startups, scale-ups, and even bit-tech.</p><p>Read the rest of the series here:</p><ul><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-2-4-transitioning-from-uikit-to-swiftui-eabecf90274e">Exploring SwiftUI — A Broad Overview 2/4: Transitioning from UIKit to SwiftUI</a></li><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-3-4-architectures-in-swiftui-670c8b76c19e">Exploring SwiftUI — A Broad Overview 3/4: Architectures in SwiftUI</a></li><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-4-4-testing-in-swiftui-238907fe18d2">Exploring SwiftUI — A Broad Overview 4/4: Testing in SwiftUI</a></li></ul><p>Thank you for reading! Got a suggestion? Please leave it in the comments section, feedback is always appreciated!</p><p>Let’s connect on <a href="https://www.linkedin.com/in/bogdan-razvan/">LinkedIn</a>!</p><p>If you’re interested in learning more about Xapo Bank — Bitcoin Bank providing simple and safe usability to retail customers, explore the resources at <a href="http://xapobank.com/">xapobank.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=74eda4bd3f0c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xapolabs/exploring-swiftui-a-broad-overview-1-4-swiftui-vs-uikit-74eda4bd3f0c">Exploring SwiftUI — A Broad Overview 1/4: SwiftUI vs UIKit</a> was originally published in <a href="https://medium.com/xapolabs">XapoLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring SwiftUI — A Broad Overview 2/4: Transitioning from UIKit to SwiftUI]]></title>
            <link>https://medium.com/xapolabs/exploring-swiftui-a-broad-overview-2-4-transitioning-from-uikit-to-swiftui-eabecf90274e?source=rss----a0e519fef8b7---4</link>
            <guid isPermaLink="false">https://medium.com/p/eabecf90274e</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[swiftui]]></category>
            <dc:creator><![CDATA[Razvan Bogdan]]></dc:creator>
            <pubDate>Tue, 27 Jun 2023 09:24:28 GMT</pubDate>
            <atom:updated>2023-06-27T09:24:28.538Z</atom:updated>
            <content:encoded><![CDATA[<h3>Exploring SwiftUI — A Broad Overview 2/4: Transitioning from UIKit to SwiftUI</h3><h4>This article is the 2nd of a series of 4 aimed at exploring the capabilities of SwiftUI. Happy reading!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5bZfvv3yLN0x_jRypZXw5g.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@maxcodes?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Maxwell Nelson</a> on <a href="https://unsplash.com/photos/taiuG8CPKAQ?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3><strong>Intro</strong></h3><p>During the four years since the initial release of SwiftUI, there has been a growing trend of projects opting to use it over UIKit. One of the main reasons for this shift is that building UI via code is more scalable and easier for review and for conflict solving. Additionally, it might be because the tech-savvy developers always want to explore new technologies and experiment with them.</p><p>SwiftUI requires a minimum iOS version of 13, so if you plan to support older versions then you would need to also keep UIKit around. It is worth noticing that the first version of SwiftUI is somehow incomplete, and better features were introduced only in the latest iOS versions. From my experience, a bare minimum for a production-ready product would be iOS 15. Nonetheless, with every new iOS version, Apple invests more effort into leveraging the capabilities of SwiftUI, introducing new features and overall improvements.</p><h3><strong>Transitioning from UIKit to SwiftUI</strong></h3><p>When transitioning from UIKit to SwiftUI, it is important to note that the two frameworks are interoperable. This allows taking an incremental approach in introducing SwiftUI into the codebase and letting it run alongside UIKit, instead of taking a big-bang approach, halting the development of new features until all the codebase has been rewritten using SwiftUI.</p><h4>Bottom-to-top approach</h4><p>A recommended way of doing the migration would be a bottom-to-top approach. That means gradually using SwiftUI to build the UI for new features only. This has a significant advantage because it minimises the changes on the existing code.</p><p>Also, for the developers, it would be easier because it makes the learning curve a bit more manageable. Over time, as the developers gain more experience and the usage of this framework becomes staple , old screens will get converted too.</p><h4>UI components library</h4><p>In order to make the transition, one could start by building a collection of SwiftUI components that can be reused. This creates the incentive to use the new UI library gradually as new screens are developed, as it is more convenient to reuse existing UI components in a plug-and-play fashion.</p><p>Over time, the UI components will undergo changes and adaptations, and the most significant advantage of using reusable SwiftUI components is that these changes can be applied in only one place. Since these components are reused throughout the entire UI codebase, any changes made to them will be reflected in every instance where they are used. This promotes consistency and reduces the need to make changes to each instance of the component individually.</p><h3>Example</h3><p>But let’s take an example. Let’s take a look at the UIKit code that I used in my <a href="https://medium.com/p/74eda4bd3f0c">previous article of the series</a> and how we can rewrite it in SwiftUI by making use of the interoperability. Yes, you guessed, we are going to use UIHostingController for this.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ffb7c462e5276632c107a082a04835a0/href">https://medium.com/media/ffb7c462e5276632c107a082a04835a0/href</a></iframe><p>The SwiftUI view will be embedded as following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9d2e4b32f4564157230d6d82c367d914/href">https://medium.com/media/9d2e4b32f4564157230d6d82c367d914/href</a></iframe><p>The UIHostingController is a UIKit view controller that manages a SwiftUI view hierarchy, and is used when integrating SwiftUI into a UIKit view hierarchy. We use it to hold all our user interface and embed it into the UIKit view hierarchy.</p><p>That’s trivial, all that we need to do is:</p><ul><li>add the UIHostingViewController to the UIViewController as a child</li><li>set its frame size to match the already existing frame size</li><li>notify the UIHostingViewController that the move is complete</li></ul><h3>Conclusion</h3><p>UIKit and SwiftUI can coexist thanks to the interoperability. When making the transition to the latter, plan a bottom-to-top approach by incrementally introducing new features that use the new UI framework, reducing more and more the percentage of UIKit codebase in the project. You may start by creating a SwiftUI design system of reusable components that can be shared across the whole UI spectrum. This approach makes it easier for the developers to ship new UI, incentivising the transition.</p><p>Read the rest of the series here:</p><ul><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-1-4-swiftui-vs-uikit-74eda4bd3f0c">Exploring SwiftUI — A Broad Overview 1/4: SwiftUI vs UIKit</a></li><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-3-4-architectures-in-swiftui-670c8b76c19e">Exploring SwiftUI — A Broad Overview 3/4: Architectures in SwiftUI</a></li><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-4-4-testing-in-swiftui-238907fe18d2">Exploring SwiftUI — A Broad Overview 4/4: Testing in SwiftUI</a></li></ul><p>Thank you for reading! Got a suggestion? Please leave it in the comments section, feedback is always appreciated!</p><p>Let’s connect on <a href="https://www.linkedin.com/in/bogdan-razvan/">LinkedIn</a>!</p><p>If you’re interested in learning more about Xapo Bank — Bitcoin Bank providing simple and safe usability to retail customers, explore the resources at <a href="http://xapobank.com/">xapobank.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eabecf90274e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xapolabs/exploring-swiftui-a-broad-overview-2-4-transitioning-from-uikit-to-swiftui-eabecf90274e">Exploring SwiftUI — A Broad Overview 2/4: Transitioning from UIKit to SwiftUI</a> was originally published in <a href="https://medium.com/xapolabs">XapoLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring SwiftUI — A Broad Overview 3/4: Architectures in SwiftUI]]></title>
            <link>https://medium.com/xapolabs/exploring-swiftui-a-broad-overview-3-4-architectures-in-swiftui-670c8b76c19e?source=rss----a0e519fef8b7---4</link>
            <guid isPermaLink="false">https://medium.com/p/670c8b76c19e</guid>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[apple]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Razvan Bogdan]]></dc:creator>
            <pubDate>Tue, 27 Jun 2023 09:24:24 GMT</pubDate>
            <atom:updated>2023-06-27T09:24:23.961Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Exploring SwiftUI — A Broad Overview 3/4: Architectures in SwiftUI</strong></h3><h4>This article is the 3rd of a series of 4 aimed at exploring the capabilities of SwiftUI. Happy reading!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*9XC3B6jU4OFHpz99" /><figcaption>Photo by <a href="https://unsplash.com/@altumcode?utm_source=medium&amp;utm_medium=referral">AltumCode</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Intro</h3><p>As SwiftUI is becoming the framework of choice for building user interfaces for iOS apps, developers are tasked to rethink the architectures they use in order to leverage SwiftUI’s capabilities. But sometimes it can be hard to transition from e.g. a <em>one-way-data-flow</em> type of architecture to a <em>two-way-data-flow</em> using states and observers. And with a handful of available architectures to chose from, developers must carefully consider all factors before making the decision.</p><p>Next, let’s have a look on some of the most popular architectures that fit well with SwiftUI. Disclaimer: this list is not exhaustive.</p><h3>MVVM</h3><p>Acronym for<em> Model-View-ViewModel</em>, MVVM is one of the most popular architectures for building iOS apps. In this pattern, the ViewModel acts as a bridge between the View and the Model, responds to changes happening in the view and updates the Model. MVVM facilitates separation of concerns and testability, but can also promote a reactive approach based on states and events. When using SwiftUI, the ViewModel becomes an <em>ObservableObject </em>that will be observed by the View, which will update itself based on the emitted changes.</p><p>Let’s see it in action:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/602d7fd7800a995416e2669a8a5f6a48/href">https://medium.com/media/602d7fd7800a995416e2669a8a5f6a48/href</a></iframe><p>Some developers may argue that using MVVM with SwiftUI is <a href="https://developer.apple.com/forums/thread/699003">over-engineering</a>, and that there’s no benefit of introducing another component because the View itself <strong><em>is</em></strong> a ViewModel. I think it’s better to weight in more arguments such as coupling or testability before making a decision.</p><p>Full code is available on my <a href="https://github.com/bogdan-razvan/swiftui-mvvm-demo">Github</a>.</p><h3>VIPER</h3><p>Acronym for <em>View-Interactor-Presenter-Entity-Router</em>, VIPER is a newer software architecture aimed to solve problems related to segregation of concerns that other architectures have, by introducting specific single-responsibility components. In short, in a VIPER architecture the View communicates with the Presenter, which in turn asks the Interactor for data in the form of Entities. When the business is done, the Presenter asks the Router to navigate to another VIPER component. In order to have VIPER working with SwiftUI and not breaking the VIPER concepts, a few changes need to be applied to the pattern.</p><p>Here’s an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8004d19d41195c60058df34fb1096b66/href">https://medium.com/media/8004d19d41195c60058df34fb1096b66/href</a></iframe><p>It’s true that VIPER introduces a lot of boilerplate, and some even say this architecture is not suited for SwiftUI’s declarative approach.</p><p>Full code is available on my <a href="https://github.com/bogdan-razvan/swiftui-viper-demo">Github</a>.</p><h3>TCA</h3><p>Acronym for <a href="https://github.com/pointfreeco/swift-composable-architecture">The Composable Architecture</a>, TCA is a fairly new architecture that grew a lot of traction recently (at the time of writing, it has 8.5k stars on Github). It came as a solution for the issues that some other architectures had, and addresses the state management, testability or composition, allowing to break down large features(or screens) into smaller independent components while providing many useful tools. TCA is based on State and Actions — which are self explanatory, a Reducer which dictates how the state is modified based on each performed action, and a Store that manages all this logic.</p><p>This is how it works:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/695b55de53832e6ea92eac92853275c3/href">https://medium.com/media/695b55de53832e6ea92eac92853275c3/href</a></iframe><p>TCA framework is similar to Redux — a React library, and is close to a State Machine — a model that changes states based on inputs or actions.</p><p>Full code is available on my <a href="https://github.com/bogdan-razvan/swiftui-tca-demo">Github</a>.</p><h3>Conclusion</h3><p>While there is no such thing as a “correct” architecture to choose for a SwiftUI project, choosing the closest to that can be tricky and depends on various factors such as the complexity of the app, the developers’ experience and the project’s requirements. Every architecture has pros and cons that need to be considered before making the decision. Ultimately, the decision depends on the project’s specific needs and the team’s experience.</p><p>Read the rest of the series here:</p><ul><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-1-4-swiftui-vs-uikit-74eda4bd3f0c">Exploring SwiftUI — A Broad Overview 1/4: SwiftUI vs UIKit</a></li><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-2-4-transitioning-from-uikit-to-swiftui-eabecf90274e">Exploring SwiftUI — A Broad Overview 2/4: Transitioning from UIKit to SwiftUI</a></li><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-4-4-testing-in-swiftui-238907fe18d2">Exploring SwiftUI — A Broad Overview 4/4: Testing in SwiftUI</a></li></ul><p>Thank you for reading! Got a suggestion? Please leave it in the comments section, feedback is always appreciated!</p><p>Let’s connect on <a href="https://www.linkedin.com/in/bogdan-razvan/">LinkedIn</a>!</p><p>If you’re interested in learning more about Xapo Bank — Bitcoin Bank providing simple and safe usability to retail customers, explore the resources at <a href="http://xapobank.com/">xapobank.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=670c8b76c19e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xapolabs/exploring-swiftui-a-broad-overview-3-4-architectures-in-swiftui-670c8b76c19e">Exploring SwiftUI — A Broad Overview 3/4: Architectures in SwiftUI</a> was originally published in <a href="https://medium.com/xapolabs">XapoLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Exploring SwiftUI — A Broad Overview 4/4: Testing in SwiftUI]]></title>
            <link>https://medium.com/xapolabs/exploring-swiftui-a-broad-overview-4-4-testing-in-swiftui-238907fe18d2?source=rss----a0e519fef8b7---4</link>
            <guid isPermaLink="false">https://medium.com/p/238907fe18d2</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[apple]]></category>
            <dc:creator><![CDATA[Razvan Bogdan]]></dc:creator>
            <pubDate>Tue, 27 Jun 2023 09:24:20 GMT</pubDate>
            <atom:updated>2023-06-27T09:24:19.943Z</atom:updated>
            <content:encoded><![CDATA[<h3>Exploring SwiftUI — A Broad Overview 4/4: Testing in SwiftUI</h3><h4>This article is the 4th of a series of 4 aimed at exploring the capabilities of SwiftUI. Happy reading!</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eUhA3Q1KDR-YPhhi" /><figcaption>Photo by <a href="https://unsplash.com/ja/@ion66574?utm_source=medium&amp;utm_medium=referral">Ion (Ivan) Sipilov</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Intro</h3><p>Testing is an essential part of software development lifecycle because it helps ensure the UI looks as expected, the underlying business logic code does what it’s supposed to, and that the business requirements are fulfilled. Detecting bugs and defects early on during the development cycle is important as the cost of fixing these issues increases significantly if discovered later. As the saying goes, fixing a bug in production is 100x more expensive than fixing it during development.</p><p>Two of the most common testing techniques are unit testing and UI testing. While UI testing is focused on testing the app’s user interface, unit testing is aimed at testing independent pieces of code. There are other testing techniques like <em>snapshot testing</em> but I won’t go into that just now.</p><p>Both unit and UI testing processes can be automated and integrated with CI tools such as <strong>Bitrise</strong>, <strong>CircleCI</strong>, <strong>Jenkins</strong>. This has a number of benefits that help streamline the development process:</p><ul><li><strong>fast feedback:</strong> integrating tests in CI provides a fast feedback cycle. Rules can be setup in the CI, e.g. running the tests for every pull request. This allows the engineers to quickly make changes to the code and run the tests again;</li><li><strong>identifying problems early:</strong> running tests in CI ensures that any code changes that break the business logic can be caught early on in the development;</li><li><strong>increased code quality:</strong> having a higher test coverage should mean having a higher certainty that the codebase if free of errors. New code changes can be easily tested for desired functionality without the need for manual testing.</li></ul><h3>Unit Testing</h3><p>The goal of unit testing is to ensure that individual units of code function correctly and produce the expected output when tested in isolation. They’re designed to validate the smallest possible piece of code and quickly identify flaws.</p><p>Unit testing has the most significant impact when done during the development phase of the product lifecycle as an ongoing process. Creating unit tests for each block of code is important to verify against valid or invalid input data. The Test Driven Development (TDD) involves creating unit tests before writing code, and using them to guide the functional implementation specifics.</p><p>Let’s see how we can unit-test our code here:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5c26c713c82069ca5f349b6fb666651c/href">https://medium.com/media/5c26c713c82069ca5f349b6fb666651c/href</a></iframe><p>We will use this form for our practical example, consisting of two Textfields and a Button. The Button is bound to be enabled only when the contents of the two Textfields are not empty.</p><p>Let’s test that logic using unit tests. We we use the XCTest framework for that. XCTest provides a handful of classes and helper functions making it easy to create unit tests and UI tests in Swift.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/600dee592f8725d7bc3a79f015fe3892/href">https://medium.com/media/600dee592f8725d7bc3a79f015fe3892/href</a></iframe><p>In these trivial test cases we are testing that the Button gets enabled only after the text in the two TextFields is not empty. Nothing more simple, right?</p><h3>UI Testing</h3><p>UI Testing is a powerful way of testing that the visual components of the user interface interact as expected when certain actions are triggered. It is also used for validating that the UI elements are displayed correctly, that the navigation between screens operates correctly. A fully automated UI testing suite can replace manual testing and save teams a lot of time and money resources. There are various ways of running automated UI tests in CI, both in simulators or on real devices.</p><p>Following the example from above, containing 2 Textfields and one Button that is enabled only when the Textfields contain text, let’s write a UI test to check that:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5b2477894b8a0bb3d1c980ba0c3df4cd/href">https://medium.com/media/5b2477894b8a0bb3d1c980ba0c3df4cd/href</a></iframe><p>When running the UI tests, we are actually interacting with the app’s user interface. We used the XCTest framework again for creating the UI tests.</p><p>What we’re doing here is querying the UI elements collection for our two Textfields and typing some text into them. At the end, we just check that the Button is enabled.</p><p>There is a possibility to record a UI test. That allows for manually interacting with the UI and having code automatically generated. Although the code is not always clean and requires some touching, this can be a good start for someone that just got into UI testing.</p><p>Full code is available on my Github <a href="https://github.com/bogdan-razvan/swiftui-demo">https://github.com/bogdan-razvan/swiftui-demo</a></p><h3>Conclusion</h3><p>Unit testing and UI testing are integral parts of the software development lifecycle. By using frameworks like XCTest, implementing these tests becomes straightforward.</p><p>By creating tests and following best practices, we can ensure the app meets the required functionality and that the users have a seamless, error free experience.</p><p>Read the rest of the series here:</p><ul><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-1-4-swiftui-vs-uikit-74eda4bd3f0c">Exploring SwiftUI — A Broad Overview 1/4: SwiftUI vs UIKit</a></li><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-2-4-transitioning-from-uikit-to-swiftui-eabecf90274e">Exploring SwiftUI — A Broad Overview 2/4: Transitioning from UIKit to SwiftUI</a></li><li><a href="https://bogdanrazvan.medium.com/exploring-swiftui-a-broad-overview-3-4-architectures-in-swiftui-670c8b76c19e">Exploring SwiftUI — A Broad Overview 3/4: Architectures in SwiftUI</a></li></ul><p>Thank you for reading! Got a suggestion? Please leave it in the comments section, feedback is always appreciated!</p><p>Let’s connect on <a href="https://www.linkedin.com/in/bogdan-razvan/">LinkedIn</a>!</p><p>If you’re interested in learning more about Xapo Bank — Bitcoin Bank providing simple and safe usability to retail customers, explore the resources at <a href="http://xapobank.com/">xapobank.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=238907fe18d2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xapolabs/exploring-swiftui-a-broad-overview-4-4-testing-in-swiftui-238907fe18d2">Exploring SwiftUI — A Broad Overview 4/4: Testing in SwiftUI</a> was originally published in <a href="https://medium.com/xapolabs">XapoLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why to use ACL the Anti Corruption Layer]]></title>
            <link>https://medium.com/xapolabs/why-to-use-acl-the-anti-corruption-layer-1348fbaebf4e?source=rss----a0e519fef8b7---4</link>
            <guid isPermaLink="false">https://medium.com/p/1348fbaebf4e</guid>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Michał Baran]]></dc:creator>
            <pubDate>Mon, 26 Jun 2023 15:48:37 GMT</pubDate>
            <atom:updated>2023-06-27T08:01:43.960Z</atom:updated>
            <content:encoded><![CDATA[<p>The ACL is a layer that translates the language of external bounded context API or external vendor API into its own language. In some cases such as statuses and error codes might stay the same. That might suggest that this whole translation doesn’t make any sense. I will prove that it does.</p><h3>When to use ACL?</h3><p>- The short answer is <strong>always</strong> when you consume external API.</p><p>Imagine a situation when you need to implement phone verification. You need to use some third-party vendor that provides you with the functionality of spending SMSs with OTP. In Domain Driven Design such functionality will probably be located inside the bounded context responsible for identity management, authorization, and authentication. For the sake of example, let’s call it “Identity management” bounded context. The high-level architecture will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*e7m6zSqUJj_jNFgM" /></figure><p>Such functionality of verifying phone numbers can be used in many places, for example during onboarding, to authorize sensitive changes in the user profile, or to authorize a bank transfer. Let’s imagine that there is another bounded context responsible for processing bank transfers, let’s call it the “Bank transfer processing” bounded context. There must be a backend service that is responsible for processing transfers and some BFF that serves the nice API for web and mobile apps. The high-level architecture will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C4P93sn0MGGFxCzz" /></figure><p>Now, imagine that the phone verification service simply proxies the statuses and error codes from an external vendor and exposes it in its API. The bank transfer service does the same, and the BFF does too. Both mobile and web apps hardcode these statuses and error codes. The dependency tree will look more or less like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LSlYnEkA_IvJfGX5" /></figure><p>We have no control over the vendor’s API at all, so imagine what will happen if they decide to change the API. Ok, API is versioned, they shouldn’t do a backward incompatible change… But at some point, the API version might get deprecated, and later on… removed. So, upgrading the API will require changes in the phone verification service, bank transfer service, the BFF, web app, and… Force update apps since they hardcoded the statuses and error codes.</p><p>The phone number verification service will probably be storing each verification with the status, error codes, etc. If any of that changes there will be inconsistency in the data. The data analysis reports might break as well.</p><h3>What benefits the ACL usage bring?</h3><p>In desired architecture, the phone verification service should isolate the external API and translate its statuses into its own ones, even if initially the internal statutes are the same as the external ones. Since the Bank transfer service belongs to another bounded context it should implement its own ACL as well. Again, at the beginning statuses might be the same. But, maybe we would like to hide some technical details and expose only a few statutes out of all in the bank transfer service. Maybe there is no need to handle all error codes or some of them can be mapped into one error code. Taking this approach the dependency tree will look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cFtPW2wPjcf-5SFy" /></figure><p>Coming back to the example of deprecating API, if the external API changes, for any reason, the only place that needs to be changed is the phone verification service. It will map the new statuses to keep the contract and no other changes should be done. The team that owns the Bank transfer bounded context shouldn’t even be aware that such a change has happened.</p><p>If you’re interested in learning more about Xapo Bank — Bitcoin Bank providing simple and safe usability to retail customers, explore the resources at <a href="http://xapobank.com/">xapobank.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1348fbaebf4e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xapolabs/why-to-use-acl-the-anti-corruption-layer-1348fbaebf4e">Why to use ACL the Anti Corruption Layer</a> was originally published in <a href="https://medium.com/xapolabs">XapoLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unifying our workflow: the journey to monorepo with Kotlin Multiplatform Mobile]]></title>
            <link>https://medium.com/xapolabs/unifying-our-workflow-the-journey-to-monorepo-with-kotlin-multiplatform-mobile-a3231a266918?source=rss----a0e519fef8b7---4</link>
            <guid isPermaLink="false">https://medium.com/p/a3231a266918</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[multiplatform]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[monorepo]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Marco Righini]]></dc:creator>
            <pubDate>Mon, 26 Jun 2023 14:23:42 GMT</pubDate>
            <atom:updated>2023-06-27T09:42:21.674Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NSDNqSvXYBzyWicH" /><figcaption>Photo by <a href="https://unsplash.com/@possessedphotography?utm_source=medium&amp;utm_medium=referral">Possessed Photography</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Over the years since embarking on our Kotlin Multiplatform (KMM) journey at <a href="https://www.xapobank.com/">Xapo Bank</a>, we’ve taken strides from its initial alpha stage to employing it as a key tool for sharing code between Android and iOS, thereby reducing inconsistency issues.</p><p>This article walks you through the evolutionary phases that culminated in the monorepo structure we use today.</p><blockquote>This is not a silver bullet but a natural progression developed through trial and error, as we tackled challenges inherent to KMM adoption. Furthermore, we are constantly refining this architecture to make it even better.</blockquote><h3>The Initiation: 3 separate repositories</h3><p>Our preliminary approach was to test the waters of KMM feasibility and stability. <br>We achieved this by creating a separate KMM repository to house the shared code while leaving the structure of the mobile projects unaltered.</p><p>The repositories were organized as follows:</p><ol><li><strong>KMM repository</strong> for the shared code. Upon every merge on the main integration branch, a <em>Swift package</em> was built and published on GitHub.</li><li><strong>Android repository</strong> incorporated the KMM repository as a <em>git submodule</em>, building through <em>Gradle composite build</em>.</li><li><strong>iOS repository</strong> used the prebuilt KMM <em>Swift Package</em> from GitHub.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cCyGTeDpxsug7VEPexLTIw.png" /><figcaption>3 repositories: Android, iOS and KMM</figcaption></figure><p>We employed a strategy akin to the one detailed in <a href="https://johnoreilly.dev/posts/kotlinmultiplatform-swift-package/">this article</a> for publishing a <em>Swift Package</em> on GitHub and consuming it via <em>Swift Package Manager</em>.</p><p>However, we quickly discovered that</p><blockquote>This approach was still requiring a considerable lead time for changes, with 3 PRs for each multiplatform adjustment. Moreover, the KMM PR needed to be merged before triggering the final round of CI jobs related to the iOS PR.</blockquote><p>It was clear that we needed to consolidate our repositories.</p><h3>The Transition: consolidating to 2 repositories</h3><p>In an effort to maximize return on investment, we decided to merge the KMM repository into the Android one, thereby reducing the number of repositories to two.</p><p>The repository structure evolved into:</p><ul><li><strong>Android+KMM repository:</strong> starting from the Android project, we transitioned the KMM submodule into a straightforward folder. This eliminated the need for <em>Gradle composite build</em>. A <em>Swift package</em> is still built and published on GitHub after every merge on the main integration branch.</li><li><strong>iOS repository</strong> which utilized the prebuilt KMM<em> Swift Package</em> from GitHub.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LZhZfCHWMVUdU00ozxkVag.png" /><figcaption>2 repositories: Android+KMM repository and iOS repository</figcaption></figure><p>This change lifted developers’ spirits. Reducing one PR meant a noticeable boost in productivity.</p><p>Although one last step was missing</p><blockquote>The requirement of 2 separate PRs still prevented the CI jobs from running in parallel, resulting in suboptimal lead time for changes.</blockquote><h3>The Resolution: embracing the monorepo structure</h3><p>In our final iteration, we are testing a monorepo structure, segregating the different platforms and KMM code into distinct folders:</p><ul><li><strong>kmm</strong> folder for the shared code. <br>An <em>XCFramework</em> is constructed locally every time an iOS build is initiated from XCode. A static <em>Package.swift</em> file references the <em>XCFramework</em> path and defines the local KMM <em>Swift Package</em>.</li><li><strong>android</strong> folder where the Android <em>gradle modules</em> incorporate the KMM modules defined in the KMM folder.</li><li><strong>ios</strong> folder housing the iOS source code and XCode configuration. <br>The KMM <em>Swift package</em> is integrated as a local package with a relative path to the <em>Package.swift</em>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UlDIOxMX3Df--36id9WDOg.png" /><figcaption>Monorepo</figcaption></figure><p>One highlight of this structure is the local inclusion and refreshing of the KMM <em>Swift Package</em> during an iOS build.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZsvqKEQmX9SevlGcD3kcJw.png" /><figcaption>Local KMM Swift Package included in the iOS build</figcaption></figure><p>This is achieved by incorporating a <em>Build</em> <em>-&gt;</em> <em>Pre-Actions</em> entry for the target schema in XCode. <br>A crucial detail for this pre-action is to run <br>xcodebuild -resolvePackageDependencies after building the <em>XCFramework</em>, which seems to help alleviate autocomplete issues in XCode.</p><h3>Conclusion</h3><p>This article serves to encapsulate our evolutionary journey with KMM, starting from the use of multiple repositories to adopting a streamlined monorepo structure, avoiding the publication of artifacts.</p><p>Our approach is open for further optimization opportunities, such as building for a specific target or integrating a remote cache (bear in mind that, due to <a href="https://github.com/gradle/gradle/issues/3525">this issue</a>, the linking phase of the <em>XCFramework</em> task still remains not cacheable).</p><p>We’ve purposely kept this article concise to provide a clear, digestible overview of our journey. Based on the feedback we anticipate from you, we plan to produce more in-depth content in the future.</p><p>Please comment below or reach out to me on <a href="https://twitter.com/mrighini88">Twitter</a> or <a href="https://www.linkedin.com/in/righinimarco/">LinkedIn</a>.</p><p>Thank you very much for spending your time reading the article. Don’t forget to 👏 if you liked it.</p><p>If you’re interested in learning more about Xapo Bank — Bitcoin Bank providing simple and safe usability to retail customers, explore the resources at <a href="http://xapobank.com/">xapobank.com</a>.</p><p>Thanks to Manuel Rebollo and Pepe Guerrero for proofreading the article.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a3231a266918" width="1" height="1" alt=""><hr><p><a href="https://medium.com/xapolabs/unifying-our-workflow-the-journey-to-monorepo-with-kotlin-multiplatform-mobile-a3231a266918">Unifying our workflow: the journey to monorepo with Kotlin Multiplatform Mobile</a> was originally published in <a href="https://medium.com/xapolabs">XapoLabs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>