<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mandar A Joshi on Medium]]></title>
        <description><![CDATA[Stories by Mandar A Joshi on Medium]]></description>
        <link>https://medium.com/@joshimandy?source=rss-a400d4b5f021------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KxQS7Q2sFYM0iLRz8PjyAg.jpeg</url>
            <title>Stories by Mandar A Joshi on Medium</title>
            <link>https://medium.com/@joshimandy?source=rss-a400d4b5f021------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 13:11:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@joshimandy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Evolution of Technology: From Resources to Outcomes as a Service]]></title>
            <link>https://joshimandy.medium.com/the-evolution-of-technology-from-resources-to-outcomes-as-a-service-059210a54b54?source=rss-a400d4b5f021------2</link>
            <guid isPermaLink="false">https://medium.com/p/059210a54b54</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Mandar A Joshi]]></dc:creator>
            <pubDate>Thu, 15 Oct 2026 12:31:58 GMT</pubDate>
            <atom:updated>2026-10-15T12:31:58.733Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Resource as a Service (RaaS)</strong></p><p>In the early 2000s, businesses relied heavily on IT service providers to access skilled technology professionals without building large internal teams. The value proposition was straightforward: provide the right resources at the right cost, with success largely measured by effort, capacity, and hours delivered.</p><p><strong>Software as a Service (SaaS)</strong></p><p>The rise of cloud computing transformed how businesses consumed technology. Instead of hiring resources to build and maintain every application, organizations subscribed to ready-to-use software, shifting the value proposition from managing people and infrastructure to accessing capabilities on demand.</p><p><strong>Intelligence as a Service (IaaS)</strong></p><p>The emergence of generative AI introduced another major shift: businesses could now consume intelligence without developing sophisticated AI models themselves. Platforms offering large language models, reasoning, natural language understanding, and intelligent automation made advanced AI capabilities accessible through APIs and subscriptions. Organizations began embedding intelligence into existing applications to improve productivity, customer experiences, and decision-making. However, most AI solutions still require businesses to design workflows, integrate systems, and manage the execution of tasks. Intelligence has become more accessible, but translating that intelligence into measurable business value remains largely the customer’s responsibility.</p><p><strong>Outcome as a Service (OaaS): The Next Evolution</strong></p><p>I believe the next major technology wave will be <strong>Outcome as a Service</strong>, powered by AI agents and intelligent business workflows. Instead of purchasing software licenses, consuming AI tokens, or paying for technology resources, businesses will increasingly pay for completed business outcomes. Imagine a healthcare practice paying for successfully scheduled patient appointments, a home services company paying for qualified leads converted into bookings, or a recruiting firm paying for candidates successfully screened and shortlisted. The underlying technology, AI agents, integrations, scheduling, communication, payments, and workflow orchestration, will become an implementation detail rather than the product itself.</p><p>This shift could fundamentally change how technology companies build products, price services, and demonstrate value. The competitive advantage will no longer come simply from having better software or more powerful AI models, but from understanding industry-specific business processes and reliably delivering measurable results. Successful providers will need to combine reusable technology platforms with deep vertical expertise, human oversight, and accountability for outcomes they can genuinely control. <strong>The future of enterprise technology may not be about selling resources, software, or even intelligence, it will be about selling results.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=059210a54b54" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From AI Experiments to Enterprise AI Strategy]]></title>
            <link>https://joshimandy.medium.com/from-ai-experiments-to-enterprise-ai-strategy-dcad39f69fb5?source=rss-a400d4b5f021------2</link>
            <guid isPermaLink="false">https://medium.com/p/dcad39f69fb5</guid>
            <category><![CDATA[ai-strategy]]></category>
            <dc:creator><![CDATA[Mandar A Joshi]]></dc:creator>
            <pubDate>Sun, 04 Oct 2026 23:51:57 GMT</pubDate>
            <atom:updated>2026-10-04T23:51:57.093Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Leader’s Perspective</h3><p>AI is not suffering from a shortage of ideas. In most organizations, the opposite is true. Ask ten leaders where AI could help, and you may get twenty ideas: customer service, employee productivity, software development, analytics, content generation, personalization, sales, operations, knowledge management, and more.</p><p>The challenge for technology leaders is no longer finding AI opportunities. The challenge is deciding <strong>which opportunities deserve investment, how they connect to business strategy, and how to move them from experimentation to sustainable enterprise capabilities. </strong>That requires a shift in thinking.</p><p>Instead of asking:</p><p><strong>“Where can we use AI?”</strong></p><p>Leaders should be asking:</p><p><strong>“Which business outcomes can AI materially improve?”</strong></p><p>That small change in the question leads to a very different AI strategy.</p><h3>AI Strategy Should Start With Business Strategy</h3><p>It is tempting to start an AI conversation with technology. Should we use generative AI? Should we build an agent? Which model should we use? Should we deploy copilots? Should we build internally or buy a platform? These are important questions, but they come later. The first conversation should be about the business.</p><p>What are the organization’s priorities? Where are customers experiencing friction? Where are employees spending time on repetitive or low-value activities? What is slowing engineering teams down? Where could better information or faster decisions materially improve an outcome?</p><p>Once those questions are understood, AI becomes one of the potential mechanisms for creating that outcome, not the strategy itself.</p><p>A useful principle is:</p><p><strong>Business strategy → opportunity → capability → technology</strong></p><p>Not:</p><p><strong>Technology → use case → justification</strong></p><p>That distinction matters because organizations can easily accumulate impressive AI demonstrations without creating meaningful business value.</p><h3>Think in Terms of an AI Portfolio</h3><p>Another mistake is treating every AI idea independently.</p><p>Enterprise AI is better viewed as an <strong>investment portfolio</strong>. One way I think about that portfolio is through three broad experience areas:</p><h3>Customer Experience</h3><p>How can AI make interactions easier, faster, and more personalized?</p><p>Opportunities might include conversational experiences, intelligent self-service, recommendations, better search, proactive assistance, or helping employees resolve customer problems more effectively.</p><p>The objective isn’t necessarily to eliminate human interaction.</p><p>It is to determine where automation improves the experience and where human judgment, empathy, or expertise creates more value.</p><h3>Employee Experience</h3><p>Employees spend significant amounts of time searching for information, navigating systems, performing repetitive tasks, and coordinating work across organizational boundaries. AI can potentially reduce that friction. The opportunity isn’t simply giving everyone a chatbot.</p><p>The larger question is:</p><p><strong>How can we redesign work so employees spend less time navigating complexity and more time applying judgment?</strong></p><p>That may involve enterprise knowledge, intelligent assistants, workflow automation, summarization, decision support, or agents capable of performing specific tasks.</p><h3>Developer Experience</h3><p>AI is also changing how software itself is created.</p><p>Code generation gets much of the attention, but the opportunity is broader. AI can influence requirements, architecture exploration, development, testing, documentation, code review, troubleshooting, operational support, and modernization.</p><p>The strategic question is not:</p><p><strong>“How much code can AI generate?”</strong></p><p>It is:</p><p><strong>“How can AI improve the entire engineering system?”</strong></p><p>That includes velocity, quality, reliability, developer experience, and ultimately time to business value.</p><h3>Not Every AI Opportunity Deserves Investment</h3><p>This may be one of the most important responsibilities of technology leadership.</p><p>Innovation creates possibilities faster than organizations can responsibly fund them. The job isn’t to say yes to every good idea. It is to create a mechanism for deciding <strong>which ideas matter now</strong>. I like to evaluate AI opportunities across several dimensions:</p><p><strong>Business impact.</strong> What measurable outcome could change?</p><p><strong>Customer or employee impact.</strong> Does this remove meaningful friction?</p><p><strong>Strategic differentiation.</strong> Is this capability important enough to differentiate us, or is it becoming commodity technology?</p><p><strong>Feasibility.</strong> Do we have the data, architecture, integrations, skills, and operational maturity required?</p><p><strong>Risk.</strong> What are the security, privacy, compliance, reliability, and reputational implications?</p><p><strong>Economics.</strong> What does implementation cost compared with the expected value?</p><p><strong>Time to value.</strong> Can we validate the hypothesis quickly?</p><p><strong>Opportunity cost.</strong> What will we not do if we fund this?</p><p>The last question is often overlooked.</p><p>Every AI initiative consumes engineering capacity, leadership attention, budget, data resources, and organizational change capacity. Choosing an AI initiative is also choosing not to invest those resources somewhere else.</p><h3>Prototype Quickly, Invest Deliberately</h3><p>Traditional enterprise programs can spend months building business cases, selecting technology, designing architecture, and planning delivery before discovering whether users actually value the capability. AI gives us an opportunity to work differently. Many ideas can now be tested surprisingly quickly. That changes the investment model.</p><p>Instead of:</p><p><strong>Plan → fund → build → launch → discover</strong></p><p>we can increasingly operate as:</p><p><strong>Problem → prototype → learn → validate → invest → scale</strong></p><p>A small cross-functional team can often determine whether an idea has merit before the organization makes a major commitment. But rapid experimentation does not mean uncontrolled experimentation. The goal is <strong>fast learning with clear boundaries</strong>. Teams should understand the business problem, expected outcome, data constraints, security requirements, architectural boundaries, and conditions required to move from experiment to production. This is where strategic leadership becomes important.</p><p>Leaders should create <strong>guardrails, not gates</strong>. A gate requires teams to repeatedly ask permission. A guardrail defines the boundaries within which teams can move quickly and make decisions. When those boundaries are clear, autonomy and governance do not have to be opposing forces.</p><h3>The Build-vs-Buy Question Is Becoming More Important</h3><p>Once an opportunity has been validated, another strategic decision appears:</p><p><strong>Should we build it ourselves?</strong></p><p>Sometimes the answer is yes. Sometimes the right answer is to integrate a specialized technology partner. Sometimes it is to adopt a SaaS platform. And increasingly, the answer may be a combination of all three. The decision should not be driven simply by whether the engineering organization <em>can</em> build something. Strong engineering organizations can build many things. The more important question is:</p><p><strong>Should they?</strong></p><p>If a capability provides meaningful strategic differentiation, requires deep integration with proprietary processes or data, or creates long-term intellectual property, building may make sense. If the capability is specialized, rapidly evolving, or already solved extremely well by the market, partnering or buying may create value much faster. Strategic technology leadership requires knowing where engineering capacity creates differentiation, and where it simply recreates something that can be acquired more economically.</p><p>I will explore this decision much more deeply in the next article in this series.</p><h3>AI Strategy Is Also an Organizational Design Problem</h3><p>Technology gets most of the attention in AI discussions. But scaling AI is ultimately an organizational challenge.</p><p>Who identifies opportunities? Who validates them? Who owns the business outcome? Who makes architecture decisions? Who determines whether an experiment becomes a production capability? And who is accountable when the capability crosses Product, Engineering, Data, Security, Legal, Operations, and the business?</p><p>If every decision requires escalation to senior leadership, AI initiatives will move slowly. If every team operates independently without shared standards, the organization creates duplication, risk, and technical fragmentation. The goal is a model in which <strong>strategy is centralized enough to create alignment while execution is decentralized enough to create speed. </strong>Strategic leaders should establish the outcomes, priorities, investment boundaries, architecture principles, security expectations, and measures of success. Then teams need room to determine how best to achieve those outcomes. That is how autonomy scales.</p><h3>Measure Outcomes, Not AI Activity</h3><p>AI programs can generate impressive activity metrics. Number of pilots. Number of employees using AI. Number of agents deployed. Number of developers using coding assistants. Number of AI-generated interactions. Those metrics can be useful, but they don’t necessarily indicate value.</p><p>A better executive conversation focuses on outcomes.</p><p>Did customer effort decrease? Did self-service improve? Did employees reclaim meaningful time? Did engineering cycle time improve? Did quality improve? Did operating cost decrease? Did conversion, retention, or satisfaction change? Did we create a capability that allows the business to do something it couldn’t do before?</p><p>The objective is not AI adoption for its own sake. The objective is <strong>business performance enabled by AI</strong>.</p><h3>The Leader’s Role</h3><p>As AI becomes embedded across the enterprise, technology leaders face an interesting paradox. They need to understand the technology deeply enough to recognize what is becoming possible. But their highest-value contribution isn’t choosing every model, reviewing every architecture, or managing every AI initiative. Their role is to create a <strong>system in which good decisions can happen repeatedly.</strong></p><p>That means establishing:</p><ul><li>clear alignment between AI investments and business priorities;</li><li>mechanisms for rapidly validating opportunities;</li><li>disciplined technology investment decisions;</li><li>architectural, security, and responsible-AI guardrails;</li><li>autonomous teams with clear ownership;</li><li>measurable outcomes;</li><li>and a portfolio-level view of where the organization is investing.</li></ul><p>The goal is not to become the organization’s AI decision bottleneck. The goal is to build an organization capable of making good AI decisions without one.</p><h3>From Experiments to Capability</h3><p>We are still early in enterprise AI.</p><p>Models will change. Platforms will change. Today’s leading tools may look very different a few years from now. That makes one capability particularly valuable: <strong>an organization’s ability to continuously identify, evaluate, validate, and scale new technology opportunities. </strong>That capability will outlast any individual AI platform. For strategic technology leaders, that may ultimately be the real AI transformation. Not deploying one successful AI solution. But building an organization that can repeatedly turn emerging technology into measurable business value.</p><p><em>This is the first article in an eight-part series exploring AI through the lens of strategic technology leadership, including technology investment decisions, customer experience, employee experience, developer experience, autonomous FDE-style teams, modernization, and the operating models required to scale AI.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dcad39f69fb5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Multi-Tenant Enterprise AI Document Processing Platform]]></title>
            <link>https://joshimandy.medium.com/multi-tenant-enterprise-ai-processing-platform-60dca01f07db?source=rss-a400d4b5f021------2</link>
            <guid isPermaLink="false">https://medium.com/p/60dca01f07db</guid>
            <dc:creator><![CDATA[Mandar A Joshi]]></dc:creator>
            <pubDate>Thu, 27 Aug 2026 22:50:46 GMT</pubDate>
            <atom:updated>2026-08-27T22:52:31.818Z</atom:updated>
            <content:encoded><![CDATA[<img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60dca01f07db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Modern Application development — Android]]></title>
            <link>https://joshimandy.medium.com/modern-application-development-android-b79e7baddd1b?source=rss-a400d4b5f021------2</link>
            <guid isPermaLink="false">https://medium.com/p/b79e7baddd1b</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <dc:creator><![CDATA[Mandar A Joshi]]></dc:creator>
            <pubDate>Sun, 06 Aug 2023 15:43:24 GMT</pubDate>
            <atom:updated>2023-08-06T15:46:22.373Z</atom:updated>
            <content:encoded><![CDATA[<h3>Modern Application Development — Android</h3><h3>App Architecture</h3><p>Common Architectural principles</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b79e7baddd1b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[D. Release Management — 1. Branching strategy]]></title>
            <link>https://joshimandy.medium.com/d-release-management-1-branching-strategy-a58adec53e18?source=rss-a400d4b5f021------2</link>
            <guid isPermaLink="false">https://medium.com/p/a58adec53e18</guid>
            <category><![CDATA[release-management]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[branch]]></category>
            <category><![CDATA[branching-strategy]]></category>
            <category><![CDATA[branching]]></category>
            <dc:creator><![CDATA[Mandar A Joshi]]></dc:creator>
            <pubDate>Sun, 15 May 2022 02:34:28 GMT</pubDate>
            <atom:updated>2022-05-15T19:44:16.039Z</atom:updated>
            <content:encoded><![CDATA[<h3>D. Release Management — 1. Branching strategy</h3><h3>High level team requirements</h3><ol><li>Team need a code base which reflects production-ready state or reflects state of current app in production.</li><li>Team needs a code base where they can deliver latest changes for next release.</li><li>Team needs to fix severe bug for code in production and release quickly.</li><li>Team needs to work on new features release in isolation and parallel.</li><li>Team needs a code base to prepare and test for next release work, while they continue work on future release in isolation and parallel.</li><li>There are 2 or more developers working on each code repository. (For simplicity we assume 2 developers here.)</li><li>Team may want to start work on Feature which should not be part of next release.</li></ol><h3>Achieve above requirements by using branching strategy</h3><p>First two requirements mentioned above can be achieved using ‘Main’ (master) and ‘Develop’ branch.</p><p>additional requirements mentioned above can be achieved by creating Hot-fix, Feature and Release branches as needed.</p><p>Following example illustrates common branching strategy many teams follows.</p><p>Main (master) and Develop branches are immortal.</p><p>Hot-fix, Feature and Release branches has limited lifespan.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3QOfjr1TA4DBq5WtDUDUVA.png" /></figure><ol><li>Create develop branch from main branch.</li><li>Create Feature-1 branch from develop branch and start work on Feature 1.</li><li>Create Feature-2 branch from develop branch and start work on Feature 2.</li><li>Finished work for Feature 1, create Pull Request and merge branch to develop branch.</li><li>To keep Feature-2 branch up to date, merge develop into Feature-2 branch.</li><li>Since developer 1 finished its work, it can pick work from next release. Create new branch, Feature-3 from develop and start work on Feature 3.</li><li>Finished work for Feature 2, create Pull Request and merge branch to develop branch. (check rule 5_5 below)</li><li>To keep Feature-3 branch up to date, merge develop into Feature-3 branch.</li><li>Create Release-1 branch for Release 1.0 (check rule 1_1 below) (check rule 3_3 below)</li><li>QA / UAT find issue during testing, create Issue-1 branch from Release-1 branch.</li><li>Fix issue and merge Issue-1 branch into Release-1 branch.</li><li>Cherry fix Issue-1 fix from Release-1 branch into Develop branch.</li><li>All well and ready to release features. Merge Release-1 branch in Main (master) branch. Iteration ends. New release 1.0 in production. (Check Rule 2_2 below)</li><li>In next iteration new Feature-4 branch is created from Develop branch and start work on Feature 4.</li><li>Customer finds new severe bug in app. To fix it quickly, create new Hotfix-1 branch.</li><li>Fix bug and merge Hotfix-1 branch into main to release bug fix.</li><li>Cherry pick fix into develop branch. (Check rule 4_4 below)</li><li>To keep Feature-4 branch up to date, merge develop into Feature-4 branch.</li><li>To keep Feature-3 branch up to date, merge develop into Feature-3 branch.</li><li>Finished work for Feature 4, create Pull Request and merge branch to develop branch.</li><li>To keep Feature-4 branch up to date, merge develop into Feature-4 branch.</li><li>Finished work for Feature 4, create Pull Request and merge branch to develop branch.</li><li>Create Release-2 branch for Release 2.0</li><li>All well and ready to release features. Merge Release-2 branch in Main (master) branch. Iteration ends. New release 2.0 in production.</li></ol><h3>Rules to remember</h3><p>1_1 All feature branches targeting Features for next release must be merged in Develop before cutting Release branch. All features targeted at future releases must not be merged in Develop branch before release branch is branched off.</p><p>2_2 Change version name and number in release branch before merging to Main branch.</p><p>3_3 Once new Release branch is branched off from Develop, adding large new features here is strictly prohibited.</p><p>4_4 If hot-fix happens late in next release cycle and new release branch already branched off, then hot-fix must merge in Release branch and then eventually to develop branch.</p><p>5_5 If feature is very large and 2 or more developers working on that feature, then each developer creates own branch from feature branch. Once all work on feature is finished, then feature branch can be merged to develop.<br>Or use feature flag (FF) to merge individual developer work into development branch.</p><h3>Summary</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T-FzP94zzG0YOBAxrF6PDA.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a58adec53e18" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[C. Architecture Components — 1. UI Layer — 1.1 View Binding]]></title>
            <link>https://joshimandy.medium.com/c-architecture-components-1-ui-layer-1-1-view-binding-6244079bffca?source=rss-a400d4b5f021------2</link>
            <guid isPermaLink="false">https://medium.com/p/6244079bffca</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[jetpack]]></category>
            <category><![CDATA[architecture-components]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[view-binding]]></category>
            <dc:creator><![CDATA[Mandar A Joshi]]></dc:creator>
            <pubDate>Fri, 29 Apr 2022 18:19:03 GMT</pubDate>
            <atom:updated>2022-04-29T18:19:03.042Z</atom:updated>
            <content:encoded><![CDATA[<h3>C. Architecture Components — 1. UI Layer — 1.1 View Binding</h3><p><em>View binding</em> is a feature that allows you to more easily write code that interacts with views.</p><p>Once view binding is enabled in a module, it generates a <em>binding class</em> for each XML layout file present in that module. An instance of a binding class contains direct references to all views that have an ID in the corresponding layout.</p><p>e.g. FragmentActionListBinding class is generated for fragment_action_list.xml</p><h3>Why?</h3><ul><li><strong>Null safety:</strong> Since view binding creates direct references to views, there’s no risk of a null pointer exception due to an invalid view ID. Additionally, when a view is only present in some configurations of a layout, the field containing its reference in the binding class is marked with @Nullable.</li><li><strong>Type safety:</strong> The fields in each binding class have types matching the views they reference in the XML file. This means that there’s no risk of a class cast exception.</li><li><strong>Faster and easier</strong> than data binding</li></ul><h3>Setup Instructions</h3><p>Update build.gradle for each module where you want to generate view binding</p><pre>android {<br>    ...<br>    buildFeatures {<br>        viewBinding true<br>    }<br>}</pre><p>Once view binding is enabled in a module, it generates a <em>binding class</em> for each XML layout file present in that module. An instance of a binding class contains direct references to all views that have an ID in the corresponding layout.</p><p>e.g. FragmentActionListBinding class is generated for fragment_action_list.xml</p><p>If you don’t want to generate binding class for particular layout, then set tools:viewBindingIgnore=&quot;true&quot; in root element.</p><pre>&lt;LinearLayout<br>        ...<br>        tools:viewBindingIgnore=&quot;true&quot; &gt;<br>    ...<br>&lt;/LinearLayout&gt;</pre><h3>Usage</h3><pre>private lateinit var binding: FragmentActionListBinding<br>....</pre><pre>override fun onCreateView(<br>    inflater: LayoutInflater, container: ViewGroup?,<br>    savedInstanceState: Bundle?<br>): View {<br><br>    binding = FragmentActionListBinding.inflate(inflater, container, false)<br>    binding.actionList.<em>layoutManager </em>= LinearLayoutManager(<em>context</em>)<br>    observeDataState()<br>    return binding.<em>root<br></em>}</pre><pre>...</pre><pre>binding.titleTextView.text = &quot;My Title&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6244079bffca" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[B Testing mobile app — 1 Strategy]]></title>
            <link>https://joshimandy.medium.com/b-testing-mobile-app-1-strategy-e49bcb349915?source=rss-a400d4b5f021------2</link>
            <guid isPermaLink="false">https://medium.com/p/e49bcb349915</guid>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[modern-application]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[test-automation]]></category>
            <dc:creator><![CDATA[Mandar A Joshi]]></dc:creator>
            <pubDate>Mon, 18 Apr 2022 14:34:12 GMT</pubDate>
            <atom:updated>2022-05-09T14:37:26.086Z</atom:updated>
            <content:encoded><![CDATA[<h3>B. Testing mobile app — 1. Strategy</h3><h3><strong>Why test?</strong></h3><ol><li>Rapid feedback: testing complex logic for all possible <strong>scenarios</strong>.</li><li>Early failure detection: find the issue before it becoming <strong>bug</strong>.</li><li>Safe code refactoring: optimize and refactor code without worrying about<strong> regression</strong>.</li><li>Stable development velocity: make code changes with confidence, keeps stable <strong>velocity</strong>.</li></ol><h3><strong>What to test?</strong></h3><ol><li>Functionality: does my app do what it’s supposed to?<br><strong>UI layer</strong>: <br> ~ Unit test state holder / business logic for UI layer (view model).<br> ~ Integration test, user interactions (screen level) and UI state.<br><strong>Data layer</strong>: <br> ~ Unit test data layer with <strong>Test Doubles</strong> (check section below)<br><strong>Domain layer</strong>: <br> ~ Unit test domain layers, Unit test utility classes<br><strong>Test edge cases</strong>: <br> ~ Complex business logic<br> ~ Network connection error<br> ~ Corrupt data<br> ~ User Interactions (phone level)<br> ~~~ Rotate device<br> ~~~ Switch to a different app.</li><li>Performance: does it do it quickly and efficiently?</li><li>Accessibility: does it work well with accessibility services?</li><li>Compatibility: does it work well on every device and API level?<br> ~ App is working on smallest to biggest supported screen size<br> ~ App is working for the minimum and maximum supported SDK version.<br> ~ App is working for new devices out in the market.</li></ol><h3><strong>How to test?</strong></h3><p>In an ideal world, you would test every line of code in your app on every device that your app is compatible with. Unfortunately, this approach is too slow and costly to be practical.</p><p>A good testing strategy finds an appropriate balance between the fidelity of a test, its speed, and its reliability.</p><p>Before you think about writing tests, make sure your code supports it. Check the section below <strong>Testable Architecture</strong>.</p><ol><li>Manual test:<br> ~ QA engineers writing test plans after the start of release plan.<br> ~ QA engineers writing test cases for the User story in each iteration.<br> ~ QA engineers creating data, users required for testing in a test environment.<br> ~ Reviewing test cases with developers, BA.<br> ~ Testing test cases once code is ready.<br> ~ Creating issues if code is not working as expected.</li><li>Automated test:<br> ~ Instrumented tests run on an Android / iOS device, either physical or emulated.<br> ~~~ Medium tests are in between and check the integration between two or more units.<br> ~~~ End-to-end tests or big tests verify larger parts of the app at the same time, such as a whole screen or user flow.<br> ~ Local tests execute on your development machine or a server, so they’re also called <em>host-side tests</em>.<br> ~~~ Unit tests or small tests only verify a very small portion of the app, such as a method or class.</li><li><strong>How much to test?<br> ~ </strong>Check most important section below, <strong>Test Pyramid.</strong></li></ol><h3><strong>When to test?</strong></h3><ol><li>Unit test: For each Pull Request / develop branch merge (synchronous).</li><li>Integration test:<br> ~ New or updated tests for updated code (manually): For each PR.<br> ~ Full test suite: nightly build / merge to develop branch (asynchronous).</li><li>E2E test: Full test suite: nightly build / merge to develop (asynchronous)</li><li>Compatibility test: E2E tests on <strong>AWS Device Farm</strong>, for minimum / maximum supported SDK and minimum / maximum supported device screen size. Always lookout for <strong>latest devices / SDK versions</strong>.</li></ol><h3><strong>Testable Architecture</strong></h3><p>With a testable app architecture, the code follows a structure that allows you to easily test different parts of it <strong>in isolation</strong>. Testable architectures have other advantages, such as better readability, maintainability, scalability, and reusability.</p><p>An architecture that is <em>not testable</em> produces the following:</p><ul><li>Bigger, slower, more flaky tests. <strong>Classes that can’t be unit-tested might have to be covered by bigger integration tests or UI tests.</strong></li><li>Fewer opportunities for <em>testing different scenarios</em>. <strong>Bigger tests are slower</strong>, so testing all possible states of an app might be unrealistic.</li></ul><p><strong>Approach</strong>:</p><p>Use decoupling using following code splitting techniques</p><ul><li>Multiple layers<br> ~ UI<br> ~~~ Keep business logic out of UIController<br> ~~~~~No framework dependencies in business logic class e.g. In case of Android, no package android. * in ViewModel<br> ~ Domain<br> ~ Data</li><li>Multiple modules (per feature)</li><li>Use DI</li></ul><h3><strong>Test Doubles:</strong></h3><p>When you need to provide a dependency to a subject under test, a common practice is to create a <em>test double</em> (or <em>test object</em>). Test doubles are objects that look and act as components in your app but they’re created in your test to provide a specific behavior or data. The main advantages are that they make your tests faster and simpler.</p><p>Types of test doubles:</p><ul><li><strong>Fake</strong>: A test double that has a “working” implementation of the class, but it is implemented in a way that makes it good for tests but unsuitable for production. Fakes don’t require a mocking framework and are lightweight. <strong>They are <em>preferred</em></strong>.<br>Example: an in-memory database.</li><li><strong>Mock</strong>: A test double that behaves how you program it to behave and that has expectations about its interactions. Mocks will fail tests if their interactions don’t match the requirements that you define. Mocks are usually created with a <em>mocking framework</em> to achieve all this.<br>Example: Verify that a method in a database was called exactly once.</li><li><strong>Stub</strong>: A test double that behaves how you program it to behave but doesn’t have expectations about its interactions. Usually created with a mocking framework. <strong>Fakes are preferred </strong>over stubs for simplicity.</li><li><strong>Dummy</strong>: A test double that is passed around but not used, such as if you just need to provide it as a parameter.<br>Example: an empty function passed as a click callback.</li><li><strong>Spy</strong>: A wrapper over a real object which also keeps track of some additional information, similar to mocks. They are usually avoided for adding complexity. <strong>Fakes or mocks are therefore preferred</strong> over spies.</li></ul><h3><strong>Test Pyramid</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8iHNk_AN_1W-zPZT2bR_-g.png" /></figure><p>The lower layers contain <strong>faster, cheaper and isolated</strong> tests. At the top level of the pyramid, we will have <strong>slower, more expensive and integrated tests</strong>.</p><p>our app should contain:</p><ul><li>70% small or unit tests</li><li>20% medium or integrated tests</li><li>10% large or end-to-end tests</li></ul><p>Following diagram illustrates how to implement test pyramid on both platforms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*qI2sxPlVl2StLeNC" /></figure><p>Article from apple website: <a href="https://developer.apple.com/documentation/xcode/testing-your-apps-in-xcode">https://developer.apple.com/documentation/xcode/testing-your-apps-in-xcode</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e49bcb349915" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Architecture — 2 Domain Layer]]></title>
            <link>https://joshimandy.medium.com/a-architecture-2-domain-layer-aa0fd0261ed6?source=rss-a400d4b5f021------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa0fd0261ed6</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[architecture]]></category>
            <category><![CDATA[jetpack]]></category>
            <dc:creator><![CDATA[Mandar A Joshi]]></dc:creator>
            <pubDate>Sun, 17 Apr 2022 13:34:31 GMT</pubDate>
            <atom:updated>2022-04-18T14:35:48.727Z</atom:updated>
            <content:encoded><![CDATA[<h3>A. Architecture — 2. Domain Layer</h3><p>The domain layer is an <em>optional</em> layer that sits between the UI layer and the data layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*j1jrjlj6QlI5Fy1UEE-YTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*4dYE47rbYtZzKFESmUWG9A.png" /></figure><p>The domain layer is responsible for encapsulating complex business logic, or simple business logic that is reused by multiple ViewModels.</p><p><strong>This layer is optional.</strong></p><p>Benefits:</p><ul><li>It avoids code duplication.</li><li>It improves readability in classes that use domain layer classes.</li><li>It improves the testability of the app.</li><li>It avoids large classes by allowing you to split responsibilities.</li></ul><p><strong>Naming convention</strong></p><p>GetMyActionsUseCase</p><p>Get — verb / MyActions — noun / UseCase (Suffix)</p><p><strong>UseCase dependencies</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/378/1*MW1a8tAx7onyXXkX7Lvbbw.png" /></figure><p>UseCases can be dependent on data layer like repositories and other use cases. Shouldn’t depend on higher level like ViewModels. Exposes suspend functions, flows, callbacks to UI layer.</p><p><strong>Simplicity</strong></p><p>To keep these classes simple and lightweight, each use case should only have responsibility <strong>over a single functionality</strong>.</p><pre>class GetMyActionsUseCase(<br>  ..<br>) {<br>    suspend operator fun invoke(): List&lt;ArticleWithAuthor&gt; {<br>    ..<br>    ..    <br>    }<br>}</pre><p><strong>UseCase as Util functionality</strong></p><pre>class FormatDateUseCase(userRepository: UserRepository) {<br><br>    private val formatter = SimpleDateFormat(<br>        userRepository.getPreferredDateFormat(),<br>        userRepository.getPreferredLocale()<br>    )<br><br>    operator fun invoke(date: Date): String {<br>        return formatter.format(date)<br>    }<br>}</pre><p>invocation in UI layer</p><pre>class MyViewModel(formatDateUseCase: FormatDateUseCase) : ViewModel() {<br>    init {<br>        val today = Calendar.getInstance()<br>        val todaysDate = formatDateUseCase(today)<br>        /* ... */<br>    }<br>}</pre><p><strong>Lifecycle</strong></p><p>UseCase should not contain mutable data. You should create a new instance of a use case class every time you pass it as a dependency.</p><p><strong>Threading</strong></p><p>Use cases from the domain layer must be <em>main-safe</em>; in other words, they must be safe to call from the main thread.</p><p>The following example shows a use case that performs its work on a background thread:</p><pre>class MyUseCase(<br>    private val defaultDispatcher: CoroutineDispatcher = Dispatchers.Default<br>) {<br><br>    suspend operator fun invoke(...) = withContext(defaultDispatcher) {<br>        // Long-running blocking operations happen on a background thread.<br>    }<br>}</pre><p><strong>Usage</strong></p><ol><li>forced UseCases everywhere <strong>(adds complexity for little benefit)</strong></li><li>As needed (more than one VM using same logic or more than one repository call for one functionality)</li></ol><p><strong>Testing</strong></p><p>Test any business logic in UseCase by mocking repositories or other dependent UseCase or having Fake repository classes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa0fd0261ed6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>