<?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 Solanki zeel on Medium]]></title>
        <description><![CDATA[Stories by Solanki zeel on Medium]]></description>
        <link>https://medium.com/@solankizeel91?source=rss-126798a94713------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*FMEEWwSj-4Q62bIUg4KN5w.jpeg</url>
            <title>Stories by Solanki zeel on Medium</title>
            <link>https://medium.com/@solankizeel91?source=rss-126798a94713------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 10:53:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@solankizeel91/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 Beginning — When I Was a “Traditional Developer”]]></title>
            <link>https://medium.com/@solankizeel91/the-beginning-when-i-was-a-traditional-developer-6e311b496954?source=rss-126798a94713------2</link>
            <guid isPermaLink="false">https://medium.com/p/6e311b496954</guid>
            <category><![CDATA[ai-development]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[chatgpt]]></category>
            <category><![CDATA[career-growth]]></category>
            <dc:creator><![CDATA[Solanki zeel]]></dc:creator>
            <pubDate>Thu, 20 Nov 2025 18:18:41 GMT</pubDate>
            <atom:updated>2025-11-20T18:31:32.798Z</atom:updated>
            <content:encoded><![CDATA[<h3>🌱 The Beginning — When I Was a “Traditional Developer”</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y7iAIbWH72uHSkhOqr_Tvw.png" /></figure><p>I started my career the same way millions of developers did. A junior developer with too many questions and too few answers.</p><p>My day began with Google.<br>My nights ended with Stack Overflow.<br>And somewhere in between, I tried to make sense of cryptic errors, old GitHub gists, and documentation that took more time to read than to implement.</p><p>If I got stuck, I didn’t ask anyone.<br>I just opened more tabs.<br>I was proud of solving things the <em>hard way</em>.</p><p>Slowly, through frustration, failures, and endless debugging sessions, I climbed from junior to senior.</p><p>That was the culture.<br>That was the grind.<br>That was the identity of being a “real developer.”</p><h3>⚡ Then Something Happened… Quietly at First</h3><p>Around late 2022, the ground beneath the software industry began to shift.</p><p>ChatGPT wasn’t just a tool.<br>It was a <em>portal</em>.</p><p>At first, I treated it like a novelty.<br>Then I started asking it small questions.<br>Then slightly bigger ones.<br>And then — without realizing it — I was relying on it daily.</p><p>One day I asked it for help on an issue I had wasted 3 hours on.<br>It solved it in 20 seconds.</p><p>My silence said everything.</p><h3>🤖 The Developer World Split Into Two</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G9rt58rStgz2qkqr3JARSw.jpeg" /></figure><p>Suddenly, there were two versions of me:</p><h3>⛓️ Old Me — The Traditional Developer</h3><ul><li>Googled every error</li><li>Wrote boilerplate by hand</li><li>Debugged manually</li><li>Read endless docs</li><li>Relied only on memory</li><li>Solved everything alone</li></ul><h3>🚀 New Me — The AI-Augmented Developer</h3><ul><li>Asked AI for explanations and examples</li><li>Generated templates, tests, and refactors</li><li>Debugged faster</li><li>Learned new tech in minutes</li><li>Focused on logic, not repetitive tasks</li><li>Worked <em>with</em> AI as a partner</li></ul><p>The difference?<br>Night and day.<br>Hours vs. minutes.<br>Stress vs. clarity.<br>Loneliness vs. collaboration.</p><p>AI didn’t make me weaker.<br>It made me <strong>superhuman</strong>.</p><h3>🧭 The Shift in the Developer Landscape</h3><p>Within a year, the entire ecosystem changed:</p><ul><li>GitHub Copilot</li><li>Claude</li><li>Devin-like agents</li><li>Repo analyzers</li><li>Code explainers</li><li>Error solvers</li><li>Documentation summarizers</li><li>Automated testing tools</li></ul><p>Developers who embraced AI soared.<br>Developers who rejected it… slowed down.<br>Not because they weren’t skilled — but because the workflow they followed belonged to <em>yesterday</em>.</p><h3>⚠️ The Hard Truth: AI Won’t Take Your Job… But a Developer Using AI Might</h3><p>Companies don’t want fewer developers.<br>They want <strong>faster, smarter, more productive developers</strong>.</p><p>An AI-native developer today has:</p><ul><li>A senior engineer guiding them</li><li>A debugger working 24/7</li><li>A code reviewer on-demand</li><li>A test writer</li><li>A documentation expert</li><li>A performance advisor</li></ul><p>All inside one tool.</p><p>It’s not a competition of humans vs. AI.<br>It’s a competition of <strong>developers who use AI vs. those who don’t</strong>.</p><h3>🪞 So… Are You Still a Traditional Developer?</h3><p>Ask yourself:</p><ul><li>Are you still solving everything manually?</li><li>Still writing repetitive code by hand?</li><li>Still spending hours on debugging?</li><li>Still afraid AI will “replace” you?</li><li>Still proud of the slow, old-school way?</li></ul><p>If your answer is <strong>yes</strong>, you’re not outdated — <br>but your <em>process</em> is.</p><p>And in 2025, process is everything.</p><h3>🌟 The New Reality</h3><p>AI is not the threat.<br>Your resistance to it is.</p><p>When I embraced AI, my work didn’t become easier — <br>it became <strong>limitless</strong>.</p><p>I learned more.<br>I shipped faster.<br>I understood deeper.<br>I grew better.</p><p>AI didn’t take my job.<br>It gave me an edge.</p><p>And that edge is the difference between being relevant…<br>or being replaceable.</p><h3>🏁 Final Reflection</h3><p>I changed not because I wanted to but because the world changed around me.</p><p>And now I ask you:</p><h3>In 2025, are you still a traditional developer…</h3><h3>or are you evolving into the developer the future demands?</h3><p>Your answer decides your growth, your relevance, and your future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6e311b496954" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Kotlin Structured Concurrency: A Beginner-Friendly Guide with MVVM Examples]]></title>
            <link>https://medium.com/@solankizeel91/mastering-kotlin-structured-concurrency-a-beginner-friendly-guide-with-mvvm-examples-9436d386bf12?source=rss-126798a94713------2</link>
            <guid isPermaLink="false">https://medium.com/p/9436d386bf12</guid>
            <category><![CDATA[kotlin-beginners]]></category>
            <category><![CDATA[concurrency]]></category>
            <category><![CDATA[coroutine]]></category>
            <category><![CDATA[kotlin-coroutines]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Solanki zeel]]></dc:creator>
            <pubDate>Fri, 06 Jun 2025 07:19:06 GMT</pubDate>
            <atom:updated>2025-06-06T07:19:06.339Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*-fBAOZT0tUJgUZiM" /><figcaption>Kotlin structured concurrency</figcaption></figure><p>As Android developers, we often juggle between multiple API calls, database operations, and UI updates — all of which must work together smoothly. This is where <strong>Kotlin Coroutines</strong> and more specifically, <strong>Structured Concurrency</strong> shine.</p><p>This post will break down the concept of Structured Concurrency in Kotlin, making it easy to understand even for beginners. We’ll use real-life examples based on <strong>MVVM Clean Architecture</strong>, so you can directly relate this to your production code.</p><h3>What is Structured Concurrency?</h3><p><strong>Structured Concurrency</strong> ensures that all coroutines are tied to a specific scope and are completed before the scope is destroyed. In simple words, coroutines launched inside a scope will follow the lifecycle of that scope.</p><blockquote><strong><em>Real-Life Analogy:</em></strong><em> Think of it like a restaurant kitchen. All chefs (coroutines) must finish cooking (tasks) before the kitchen closes (scope ends).</em></blockquote><h3>Example in MVVM</h3><pre>class MainViewModel(private val repository: MyRepository): ViewModel() {<br>    fun loadData() {<br>        viewModelScope.launch {<br>            val data = repository.getData()<br>            // update UI with data<br>        }<br>    }<br>}</pre><p>Here, viewModelScope ensures the coroutine is canceled automatically when the ViewModel is cleared.</p><h3>Why is it Good? Benefits of Structured Concurrency</h3><ol><li><strong>Automatic Cancellation:</strong> Canceling the parent scope cancels all child coroutines.</li><li><strong>Clear Lifecycle Management:</strong> Prevents memory leaks and zombie coroutines.</li><li><strong>Safe Error Propagation:</strong> Helps manage exceptions cleanly.</li></ol><blockquote><strong><em>MVVM Benefit:</em></strong><em> When an Activity or Fragment is destroyed, your ViewModel’s scope ends too. So no API calls or DB operations continue in the background.</em></blockquote><h3>Scopes Used to Achieve Structured Concurrency</h3><h3>1. viewModelScope</h3><p>Tied to ViewModel’s lifecycle.</p><h3>2. lifecycleScope</h3><p>Used inside activities/fragments. Tied to the lifecycle of UI components.</p><h3>3. coroutineScope {}</h3><p>Manual scope you can use in suspending functions.</p><h3>4. supervisorScope {}</h3><p>Similar to coroutineScope but isolates exceptions so one failure doesn’t cancel siblings.</p><h3>Advantages of Structured Concurrency</h3><ul><li>Cleaner and more maintainable code</li><li>Avoids global coroutine misuse</li><li>Makes error handling structured and predictable</li></ul><blockquote><strong><em>MVVM Real-life Scenario:</em></strong><em> When making multiple network calls, it ensures that either all succeed or fail gracefully without leaving the app in an inconsistent state.</em></blockquote><h3>Synchronous vs Asynchronous Calls</h3><ul><li><strong>Synchronous:</strong> One task completes before the next starts.</li><li><strong>Asynchronous:</strong> Tasks run independently, often in parallel.</li></ul><h3>Example:</h3><pre>// Sequential (Synchronous)<br>val user = repository.getUser()<br>val posts = repository.getPosts(user.id)</pre><pre>// Parallel (Asynchronous)<br>val userDeferred = async { repository.getUser() }<br>val postsDeferred = async { repository.getPosts() }<br>val user = userDeferred.await()<br>val posts = postsDeferred.await()</pre><h3>Calling Multiple Suspend Functions: Parallel vs Sequential</h3><h3>Sequential Call Example</h3><pre>viewModelScope.launch {<br>    val profile = repository.getProfile()<br>    val settings = repository.getSettings()<br>    // Update UI with both results<br>}</pre><h3>Parallel Call Example</h3><pre>viewModelScope.launch {<br>    val profileDeferred = async { repository.getProfile() }<br>    val settingsDeferred = async { repository.getSettings() }</pre><pre>    val profile = profileDeferred.await()<br>    val settings = settingsDeferred.await()<br>}</pre><blockquote><strong><em>Tip:</em></strong><em> Use </em><em>coroutineScope {} to make sure both calls are managed properly inside a safe structure.</em></blockquote><h3>coroutineScope {} vs supervisorScope {}</h3><h3>coroutineScope {}</h3><p>Cancels all children if one fails.</p><pre>suspend fun loadData() = coroutineScope {<br>    launch { fetchUser() } // Will be canceled if fetchPosts fails<br>    launch { fetchPosts() }<br>}</pre><h3>supervisorScope {}</h3><p>Fails gracefully, doesn’t cancel other siblings.</p><pre>suspend fun loadData() = supervisorScope {<br>    launch { fetchUser() }<br>    launch { fetchPosts() } // If this fails, fetchUser continues<br>}</pre><blockquote><strong><em>Use Case in MVVM:</em></strong><em> If one call (like analytics) fails but you still want to load user data.</em></blockquote><h3>What to Avoid That Breaks Structured Concurrency</h3><ul><li><strong>GlobalScope.launch</strong>: Detached from lifecycle — easy to leak.</li><li><strong>Blocking calls inside coroutine</strong>: Like using Thread.sleep().</li><li><strong>Long-running operations without cancellation support</strong></li></ul><h3>Bad Example:</h3><pre>GlobalScope.launch {<br>    // May still run even after UI is destroyed<br>    fetchData()<br>}</pre><h3>Conclusion</h3><p>Structured Concurrency is the foundation of writing reliable and safe concurrent code in Kotlin — especially for Android using MVVM Clean Architecture.</p><p>By using the right scopes, understanding coroutine behavior, and avoiding common pitfalls, you can make your app more robust, efficient, and easy to maintain.</p><p>Start small, experiment with examples, and let your architecture handle concurrency the smart way!</p><p>Happy coding 🚀</p><h3>Frequently Asked Questions (FAQ)</h3><p><strong>Q1: What happens if I use </strong><strong>GlobalScope.launch instead of </strong><strong>viewModelScope?</strong><br> A: GlobalScope.launch creates a coroutine not bound to any lifecycle, risking memory leaks and unwanted background work after your UI is destroyed. Always prefer lifecycle-aware scopes like viewModelScope or lifecycleScope.</p><p><strong>Q2: When should I use </strong><strong>supervisorScope instead of </strong><strong>coroutineScope?</strong><br> A: Use supervisorScope when you want sibling coroutines to run independently so that failure in one doesn’t cancel others. For example, analytics calls that shouldn’t block main data loading.</p><p><strong>Q3: How can I run multiple API calls in parallel and wait for all to finish?</strong><br> A: Use async within a coroutine scope and call await() on each deferred result, like shown in the parallel example above.</p><p><strong>Q4: Can I launch coroutines outside of any scope?</strong><br> A: It’s technically possible but discouraged because you lose control over coroutine lifecycle, leading to leaks and unpredictable behavior.</p><p><strong>Q5: Is structured concurrency only useful in Android development?</strong><br> A: No, it’s a general Kotlin concurrency concept, but it’s extremely useful in Android where lifecycle management is crucial.</p><h3>Let’s Connect!</h3><p>Feel free to connect with me on <a href="https://github.com/sz32">GitHub</a> and <a href="https://www.linkedin.com/in/zeelsolanki/">LinkedIn</a>. I’d love to hear your thoughts, discuss new ideas, and collaborate on exciting projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9436d386bf12" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Journey as a Developer and Code Reviewer.]]></title>
            <link>https://medium.com/@solankizeel91/my-journey-as-a-developer-and-code-reviewer-6f857ae2ecfc?source=rss-126798a94713------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f857ae2ecfc</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[code-review]]></category>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[collaboration]]></category>
            <dc:creator><![CDATA[Solanki zeel]]></dc:creator>
            <pubDate>Thu, 22 Aug 2024 14:31:31 GMT</pubDate>
            <atom:updated>2024-08-22T14:31:31.290Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*0iR95LHwna-bJg4E683Z0g.png" /></figure><h3>Learning from Both Sides: A Developer&#39;s Guide to Effective Code Reviews</h3><blockquote>Sharing my experience as a developer and a code reviewer.</blockquote><p>As both a developer and reviewer, I’ve gained a unique perspective on the code review process. My experiences have taught me valuable lessons about code quality, collaboration, and personal growth.</p><p>In this blog, I’ll share my insights and offer practical tips for becoming a more effective developer and reviewer. I’ll discuss common challenges I’ve encountered as a reviewer, such as:</p><ul><li><strong>Understanding complex code</strong></li><li><strong>Providing constructive feedback</strong></li><li><strong>Balancing code quality with project deadlines</strong></li></ul><p>I’ll also share how these experiences have influenced my own development practices, including:</p><ul><li><strong>Writing cleaner, more maintainable code</strong></li><li><strong>Improving my understanding of software design patterns</strong></li><li><strong>Developing a more critical eye for potential issues</strong></li></ul><p>By the end of this blog, you’ll have a better understanding of the key elements of effective code reviews and how to apply them in your own work.</p><h3><strong>Introduction</strong></h3><p>In the fast-paced world of software development, Pull Requests (PRs) have become an essential tool for collaboration and quality assurance. As a developer, reviewing PRs is not just a task; it’s an opportunity to learn, improve code quality, and contribute to the overall success of the project. This blog post will delve into the best practices for reviewing PRs as a developer, focusing on both the expectations for the PR submitter and the reviewer.</p><h3><strong>The Developer’s Role</strong></h3><p>As a developer submitting a Pull Request (PR), your goal is to provide a clear and well-structured codebase that is easy to review and understand. Here are some essential tips:</p><ul><li><strong>Clear and Concise Description:</strong> Provide a detailed description of the changes made, including the purpose, potential impact, and any known limitations.</li><li><strong>Meaningful Commit Messages:</strong> Each commit should convey a clear and concise message about the changes it introduces. This helps reviewers understand the evolution of the code.</li><li><strong>Unit Tests:</strong> Ensure that your code is adequately covered by unit tests to verify its correctness and prevent regressions.</li><li><strong>Coding Standards:</strong> Adhere to the project’s coding standards and style guidelines to promote consistency and readability.</li><li><strong>Self-Review:</strong> Conduct a thorough self-review before submitting the PR to identify and address potential issues.</li></ul><h3><strong>The Reviewer’s Role</strong></h3><p>As a reviewer, your responsibility is to provide constructive feedback that helps improve the code’s quality and maintainability. Here are some key points to consider:</p><ul><li><strong>Thorough Examination:</strong> Carefully review the code, paying attention to its correctness, readability, and efficiency.</li><li><strong>Ask Questions:</strong> If something is unclear, don’t hesitate to ask questions. Open communication is essential for understanding the intent behind the changes.</li><li><strong>Provide Constructive Feedback:</strong> Offer specific suggestions for improvement, avoiding overly harsh or judgmental comments.</li><li><strong>Consider Long-Term Implications:</strong> Evaluate how the changes fit into the broader context of the project and their potential impact on future development.</li><li><strong>Collaborate with the Developer:</strong> Work together with the developer to address any issues or concerns.</li></ul><h3><strong>Best Practices for Both Developers and Reviewers</strong></h3><ul><li><strong>Understand the Context:</strong> Familiarize yourself with the project’s goals, architecture, and existing codebase.</li><li><strong>Be Open to Discussion:</strong> Engage in constructive discussions to clarify questions and reach agreement on changes.</li><li><strong>Avoid Rushing Through Reviews:</strong> Take the time to carefully examine the code and provide thoughtful feedback.</li><li><strong>Focus on Improvement:</strong> The goal of code reviews is to improve the code, not to find fault.</li></ul><h3><strong>Benefits of a good PR</strong></h3><ul><li>A well-prepared pull request is likely to be reviewed promptly.</li><li>It helps minimize the introduction of bugs into the codebase.</li><li>It eases the onboarding process for new developers.</li><li>It prevents other developers from being blocked.</li><li>It accelerates the code review process, thereby speeding up product development.</li></ul><h3>Enhancing Code Review Practices: Additional Tips</h3><p><strong>1. Comprehensive PR Descriptions:</strong></p><ul><li><strong>Clarity and Conciseness:</strong> Clearly articulate the purpose of the changes, including what was done and why.</li><li><strong>Contextual Information:</strong> Provide relevant context, such as related issues or previous discussions.</li><li><strong>Expected Behavior:</strong> Describe the expected outcomes or changes in behavior resulting from the modifications.</li></ul><p><strong>2. Minimizing File Changes:</strong></p><ul><li><strong>Targeted Modifications:</strong> Make changes only to the necessary files to reduce the scope of the review.</li><li><strong>Avoid Unrelated Changes:</strong> Keep the PR focused on the primary changes and avoid introducing unrelated modifications.</li><li><strong>Refactor Existing Code:</strong> Consider refactoring existing code to improve its structure, readability, or maintainability.</li></ul><p><strong>3. Refactoring Existing Code:</strong></p><ul><li><strong>Strategic Refactoring:</strong> Identify opportunities to improve the code’s structure, readability, or maintainability.</li><li><strong>Balanced Approach:</strong> Refactor judiciously, considering the time and effort involved.</li><li><strong>Avoid Over-engineering:</strong> Focus on refactoring that directly addresses specific issues or improves code quality.</li></ul><p><strong>4. Critical Thinking and Analysis:</strong></p><ul><li><strong>Beyond Blind Following:</strong> Don’t blindly follow existing patterns or conventions if they don’t align with the current context or best practices.</li><li><strong>Consider Alternatives:</strong> Explore different approaches or solutions that might be more suitable or efficient.</li></ul><p><strong>5. Comprehensive Review Checklist:</strong></p><ul><li><strong>Performance Analysis:</strong> Evaluate the potential impact of the changes on performance.</li><li><strong>Security Considerations:</strong> Assess any security implications or vulnerabilities introduced.</li><li><strong>Existing Test Cases:</strong> Verify that existing test cases still pass after the changes.</li><li><strong>New Test Cases:</strong> Ensure that new test cases are added to cover the modified or added functionality.</li><li><strong>Code Quality:</strong> Check for adherence to coding standards, readability, and maintainability.</li></ul><p><strong>6. Meaningful Commit Messages:</strong></p><ul><li><strong>Descriptive Messages:</strong> Use clear and concise messages that accurately reflect the changes made.</li><li><strong>Avoid Generic Messages:</strong> Avoid vague or generic messages like “Fixed bug” or “Updated code.”</li><li><strong>Atomic Commits:</strong> Aim for atomic commits, where each commit represents a single logical change.</li></ul><blockquote>I have shared a checklist as per my daily work experience with the code and the project which I’m working. I think its good as a developer if validating those points before creating a PR.</blockquote><p><a href="https://drive.google.com/file/d/15C9YMCKm9ij6FEZnw8sWd5KcrJyl_DKk/preview">Checklist before raising PR.pdf</a></p><h3><strong>Conclusion</strong></h3><p>Reviewing PRs is a collaborative process that benefits both the developer and the project. By following these best practices, reviewers can contribute to higher-quality code, improved team efficiency, and a more positive development experience. Remember, the goal is not to find fault but to ensure that the code meets the project’s standards and is ready for integration.</p><h3>Let’s Connect!</h3><p>Feel free to connect with me on <a href="https://github.com/sz32">GitHub</a> and <a href="https://www.linkedin.com/in/zeelsolanki/">LinkedIn</a>. I’d love to hear your thoughts, discuss new ideas, and collaborate on exciting projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f857ae2ecfc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kotlin Multiplatform for cross platform]]></title>
            <link>https://medium.com/@solankizeel91/kmp-a-game-changer-for-cross-platform-development-fdace93fb1e7?source=rss-126798a94713------2</link>
            <guid isPermaLink="false">https://medium.com/p/fdace93fb1e7</guid>
            <category><![CDATA[kotlin-multiplatform]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[kotlin-coroutines]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Solanki zeel]]></dc:creator>
            <pubDate>Fri, 02 Aug 2024 17:46:32 GMT</pubDate>
            <atom:updated>2024-08-11T16:00:55.012Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xS2SmtQwk9ClXC6a5Gis5g.png" /></figure><h4>What is KMP?</h4><p>Kotlin Multiplatform Mobile (KMP) is a powerful SDK that enables developers to share code between Android and iOS applications. By leveraging Kotlin’s versatility, you can write business logic, data models, and even UI components once and reuse them across both platforms. This significantly reduces development time, improves code consistency, and simplifies maintenance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/429/1*DH2pe-b0-898YDap6ReV8Q.png" /></figure><h4>KMP vs. Flutter and Other Hybrid Approaches</h4><p>Unlike Flutter, which uses a single codebase for both UI and business logic, KMP focuses on sharing business logic while allowing platform-specific UI development. This approach preserves the native look and feel of each platform, providing a superior user experience.</p><p>Hybrid frameworks often compromise performance and user experience due to the bridge between native and web technologies. KMP, on the other hand, offers native performance and access to platform-specific APIs, ensuring optimal app performance.</p><h4>Easy for Android Developers?</h4><p>If you’re an Android developer familiar with Kotlin, transitioning to KMP is relatively smooth. The core language remains the same, and you’ll be sharing a significant portion of your codebase. However, understanding platform-specific concepts and using KMP’s APIs will require some learning. But the investment is worthwhile, as it opens up new opportunities for cross-platform development.</p><h4>A Growing and Supportive Community</h4><p>The KMP community is rapidly expanding, with increasing numbers of developers adopting it. This means you’ll find plenty of resources, tutorials, and forums to help you on your KMP journey. JetBrains, the creators of Kotlin, actively supports KMP development and provides valuable tools and documentation.</p><h4>Creating Your First KMP Project</h4><p>Getting started with KMP is straightforward. You can use the Kotlin Multiplatform Mobile plugin for IntelliJ IDEA or Android Studio to create a new KMP project. The project structure consists of three main parts:</p><ul><li><strong>Shared module</strong>: Contains the code shared between Android and iOS.</li><li><strong>Android app module</strong>: Builds the Android application.</li><li><strong>iOS app module</strong>: Builds the iOS application.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*EsI1-8VWKxcLqQ_YvnR93g.png" /></figure><p>The Kotlin Multiplatform Gradle plugin handles the build process and generates necessary artifacts for both platforms.</p><h4>Essential KMP Libraries</h4><p>Several libraries can enhance your KMP development experience:</p><ul><li><strong>Ktor</strong>: A powerful and flexible HTTP client for networking.</li><li><strong>SQLDelight</strong>: A type-safe SQL database library for multiplatform applications.</li><li><strong>Kotlinx.serialization</strong>: Efficient serialization and deserialization of data.</li><li><strong>Koin</strong>: A dependency injection framework that simplifies dependency management.</li><li><strong>Compose Multiplatform</strong>: For building cross-platform UI with a declarative approach.</li></ul><p>By combining these libraries with your KMP project, you can create robust and efficient cross-platform applications.</p><pre>[versions]<br>agp = &quot;8.4.0&quot;<br>kotlin = &quot;1.9.20&quot;<br>compose = &quot;1.5.4&quot;<br>compose-compiler = &quot;1.5.4&quot;<br>compose-material3 = &quot;1.1.2&quot;<br>androidx-activityCompose = &quot;1.8.0&quot;<br>ktor-client = &quot;2.3.6&quot;<br>room = &quot;2.7.0-alpha05&quot;<br>koin = &quot;3.5.3&quot;<br>coroutinesVersion = &quot;1.7.3&quot;<br>dateTimeVersion = &quot;0.6.0&quot;<br>sqlDelight = &quot;2.0.1&quot;<br>lifecycleViewmodelCompose = &quot;2.7.0&quot;<br><br><br>[libraries]<br>kotlin-test = { module = &quot;org.jetbrains.kotlin:kotlin-test&quot;, version.ref = &quot;kotlin&quot; }<br>androidx-activity-compose = { module = &quot;androidx.activity:activity-compose&quot;, version.ref = &quot;androidx-activityCompose&quot; }<br>compose-ui = { module = &quot;androidx.compose.ui:ui&quot;, version.ref = &quot;compose&quot; }<br>compose-ui-tooling = { module = &quot;androidx.compose.ui:ui-tooling&quot;, version.ref = &quot;compose&quot; }<br>compose-ui-tooling-preview = { module = &quot;androidx.compose.ui:ui-tooling-preview&quot;, version.ref = &quot;compose&quot; }<br>compose-foundation = { module = &quot;androidx.compose.foundation:foundation&quot;, version.ref = &quot;compose&quot; }<br>compose-material3 = { module = &quot;androidx.compose.material3:material3&quot;, version.ref = &quot;compose-material3&quot; }<br><br>#Core library and required plugins in here<br>ktor-client-core = { module = &quot;io.ktor:ktor-client-core&quot;, version.ref = &quot;ktor-client&quot; }<br>ktor-client-darwin = { module = &quot;io.ktor:ktor-client-darwin&quot;, version.ref = &quot;ktor-client&quot; }<br>ktor-client-encoding = { module = &quot;io.ktor:ktor-client-encoding&quot;, version.ref = &quot;ktor-client&quot; }<br>ktor-client-logging = { module = &quot;io.ktor:ktor-client-logging&quot;, version.ref = &quot;ktor-client&quot; }<br>ktor-client-okhttp = { module = &quot;io.ktor:ktor-client-okhttp&quot;, version.ref = &quot;ktor-client&quot; }<br>ktor-serialization-kotlinx-json = { module = &quot;io.ktor:ktor-serialization-kotlinx-json&quot;, version.ref = &quot;ktor-client&quot; }<br>ktor-client-content-negotiation = { module = &quot;io.ktor:ktor-client-content-negotiation&quot;, version.ref = &quot;ktor-client&quot; }<br><br>#Room<br>room-compiler = { module = &quot;androidx.room:room-compiler&quot;, version.ref = &quot;room&quot; }<br>room-runtime = { module = &quot;androidx.room:room-runtime&quot;, version.ref = &quot;room&quot; }<br>room-sqlite = { module = &quot;androidx.sqlite:sqlite-bundled&quot;, version.ref = &quot;room&quot; }<br><br>#SQLDelight<br>android-driver = { module = &quot;app.cash.sqldelight:android-driver&quot;, version.ref = &quot;sqlDelight&quot; }<br>koin-androidx-compose = { module = &quot;io.insert-koin:koin-androidx-compose&quot;, version.ref = &quot;koin&quot; }<br>koin-core = { module = &quot;io.insert-koin:koin-core&quot;, version.ref = &quot;koin&quot; }<br>kotlinx-coroutines-core = { module = &quot;org.jetbrains.kotlinx:kotlinx-coroutines-core&quot;, version.ref = &quot;coroutinesVersion&quot; }<br>kotlinx-datetime = { module = &quot;org.jetbrains.kotlinx:kotlinx-datetime&quot;, version.ref = &quot;dateTimeVersion&quot; }<br>ktor-client-android = { module = &quot;io.ktor:ktor-client-android&quot;, version.ref = &quot;kotlin&quot; }<br>native-driver = { module = &quot;app.cash.sqldelight:native-driver&quot;, version.ref = &quot;sqlDelight&quot; }<br>runtime = { module = &quot;app.cash.sqldelight:runtime&quot;, version.ref = &quot;sqlDelight&quot; }<br>androidx-lifecycle-viewmodel-compose = { group = &quot;androidx.lifecycle&quot;, name = &quot;lifecycle-viewmodel-compose&quot;, version.ref = &quot;lifecycleViewmodelCompose&quot; }<br><br><br>[plugins]<br>androidApplication = { id = &quot;com.android.application&quot;, version.ref = &quot;agp&quot; }<br>androidLibrary = { id = &quot;com.android.library&quot;, version.ref = &quot;agp&quot; }<br>kotlinAndroid = { id = &quot;org.jetbrains.kotlin.android&quot;, version.ref = &quot;kotlin&quot; }<br>kotlinMultiplatform = { id = &quot;org.jetbrains.kotlin.multiplatform&quot;, version.ref = &quot;kotlin&quot; }<br>kotlinCocoapods = { id = &quot;org.jetbrains.kotlin.native.cocoapods&quot;, version.ref = &quot;kotlin&quot; }<br>room-gradle = { id = &quot;androidx.room:room-gradle-plugin&quot;, version.ref = &quot;room&quot; }<br>kotlinxSerialization = { id = &quot;org.jetbrains.kotlin.plugin.serialization&quot;, version.ref = &quot;kotlin&quot; }<br>sqldelight = { id = &quot;app.cash.sqldelight&quot;, version.ref = &quot;sqlDelight&quot; }</pre><h4>Conclusion</h4><p>KMP offers a compelling solution for developers seeking to build high-quality, native-like apps for both Android and iOS. Its focus on shared business logic, combined with platform-specific UI development, provides the best of both worlds. As the KMP ecosystem continues to grow, it’s an exciting time to explore this technology and expand your development horizons.</p><h4>Check Out the KMP Demo Project</h4><p>If you’re interested in exploring a practical implementation of Kotlin Multiplatform Mobile (KMP) with the supported libraries, check out the <a href="https://github.com/sz32/demo-kmp">KMP Demo Project on GitHub</a>. This repository provides a comprehensive example of how to set up and use KMP to share business logic and maintain platform-specific UI, ensuring native performance and a seamless user experience.</p><p>The project includes:</p><ul><li>Shared business logic and data models for both Android and iOS.</li><li>Platform-specific UI development to maintain the native look and feel.</li><li>Integration with essential KMP libraries like Ktor, SQLDelight, Kotlinx.serialization, Koin.</li></ul><p>Get started by cloning the repository and running the application on your Android and iOS devices. Contributions are welcome, and if you have any ideas for improvement or encounter any issues, feel free to open an issue or submit a pull request.</p><p>Explore the <a href="https://github.com/sz32/demo-kmp">KMP Demo Project on GitHub</a> and take your cross-platform development to the next level!</p><h3>Let’s Connect!</h3><p>Feel free to connect with me on <a href="https://github.com/sz32">GitHub</a> and <a href="https://www.linkedin.com/in/zeelsolanki/">LinkedIn</a>. I’d love to hear your thoughts, discuss new ideas, and collaborate on exciting projects.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fdace93fb1e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flowing with Kotlin: Unraveling the Magic of Hot and Cold Flows]]></title>
            <link>https://medium.com/@solankizeel91/flowing-with-kotlin-unraveling-the-magic-of-hot-and-cold-flows-0b1bd2e9527c?source=rss-126798a94713------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b1bd2e9527c</guid>
            <category><![CDATA[kotlin-coroutines]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[kotlin-flow]]></category>
            <category><![CDATA[kotlin]]></category>
            <dc:creator><![CDATA[Solanki zeel]]></dc:creator>
            <pubDate>Fri, 24 Nov 2023 18:18:01 GMT</pubDate>
            <atom:updated>2023-11-24T18:18:01.644Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey fellow Kotlin enthusiasts!</p><p>Are you ready to dive into the world of Kotlin Flow and uncover the mysteries of Hot and Cold Flows? 🌊✨ If you&#39;ve been wondering how Kotlin handles asynchronous programming with elegance and simplicity, you&#39;re in for a treat.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MKIhO_DUKg0nC96PR4LVxw.png" /><figcaption>image source: <a href="https://amitshekhar.me/static/images/blog/cold-flow-vs-hot-flow.png">https://amitshekhar.me/static/images/blog/cold-flow-vs-hot-flow.png</a></figcaption></figure><h3>🚀 Kotlin Flow: The River of Asynchrony</h3><p>Imagine asynchronous programming as a river, where data flows seamlessly from one point to another. Kotlin Flow is like a magic canoe that allows you to navigate this river with ease. It&#39;s a powerful tool that helps you handle streams of data asynchronously, making your code more readable and maintainable.</p><p>But wait, there&#39;s more! Kotlin Flow isn&#39;t just one-size-fits-all; it comes in two exciting flavors: Hot Flow and Cold Flow. Let&#39;s unravel the magic behind each.</p><h3>🌡 Hot Flow: Keep the Fire Burning</h3><p>Hot Flow is like a live concert where the music is playing, and the audience can join at any time. In Kotlin terms, Hot Flow emits data regardless of whether there&#39;s someone there to listen. It&#39;s broadcasting data in real-time, and subscribers can jump in at any point to catch the action.</p><p>Here&#39;s a simple analogy: Imagine a radio station constantly playing your favorite tunes. You can tune in and start grooving whenever you feel like it. That&#39;s Hot Flow for you!</p><pre>val hotFlow = MutableSharedFlow&lt;String&gt;()<br><br>// Emitting data<br>hotFlow.tryEmit(&quot;Kotlin is awesome!&quot;)<br><br>// Subscribing to the flow<br>hotFlow.collect { data -&gt;<br>    println(&quot;Received: $data&quot;)<br>}</pre><h3>❄️ Cold Flow: Chilled and Ready</h3><p>On the flip side, Cold Flow is more like your favorite TV series on demand. It waits patiently until someone hits the play button. When you subscribe, the Cold Flow starts emitting data, but it won’t start until someone is ready to receive.</p><p>Think of it as having your favorite show queued up on a streaming service. You decide when to start watching, and the episodes unfold at your pace.</p><pre>val coldFlow = flow {<br>    emit(&quot;Introduction&quot;)<br>    emit(&quot;Chapter 1&quot;)<br>    emit(&quot;Chapter 2&quot;)<br>    // ...<br>}<br><br>// Subscribing to the flow<br>coldFlow.collect { data -&gt;<br>    println(&quot;Received: $data&quot;)<br>}</pre><h3>🤔 When to Use Hot or Cold Flow?</h3><p>Choosing between Hot and Cold Flow depends on your use case. Use Hot Flow when you want to broadcast real-time data to multiple subscribers. It’s perfect for scenarios where data is constantly changing, and you want everyone to stay in the loop.</p><p>On the other hand, Cold Flow is great for scenarios where data is static or changes infrequently. It allows subscribers to control when they start receiving data, which can be beneficial for optimizing resources.</p><p>Certainly! Let&#39;s dive into some practical examples of using Hot and Cold Flows to update UI in a Kotlin application. We&#39;ll use Android development as a context, but these concepts can be applied in other UI frameworks as well.</p><h3>🌡 Hot Flow for Real-Time Updates:</h3><p>Imagine you&#39;re building a real-time messaging app, and you want to display incoming messages in the UI as soon as they arrive. Hot Flow is perfect for this scenario.</p><pre>class ChatViewModel : ViewModel() {<br>    private val _messages = MutableSharedFlow&lt;String&gt;()<br>    <br>    // Expose the flow as a read-only property<br>    val messages: Flow&lt;String&gt; = _messages.asSharedFlow()<br><br>    // Function to send a new message<br>    fun sendMessage(message: String) {<br>        viewModelScope.launch {<br>            _messages.emit(message)<br>        }<br>    }<br>}</pre><p>In your UI layer (e.g., a Fragment or Activity):</p><pre>class ChatFragment : Fragment() {<br><br>    private val viewModel: ChatViewModel by viewModels()<br>    private lateinit var messageAdapter: MessageAdapter<br><br>    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {<br>        super.onViewCreated(view, savedInstanceState)<br><br>        messageAdapter = MessageAdapter()<br><br>        // Observe the Hot Flow for real-time updates<br>        lifecycleScope.launchWhenStarted {<br>            viewModel.messages.collect { message -&gt;<br>                // Update the UI with the new message<br>                messageAdapter.addMessage(message)<br>            }<br>        }<br><br>        // Set up your RecyclerView or other UI components<br>    }<br>}</pre><p>In this example, the ChatViewModel has a Hot Flow of messages. As messages are sent using the sendMessage function, the UI automatically updates in real-time thanks to the collect block observing the flow in the ChatFragment.</p><h3>❄️ Cold Flow for On-Demand Updates:</h3><p>Now, let&#39;s consider a case where you want to load a list of items from a database and display them in the UI. Cold Flow is well-suited for scenarios where data is fetched on-demand.</p><pre>class ItemViewModel : ViewModel() {<br>    // Assume you have a repository that fetches items from a database<br>    private val itemRepository = ItemRepository()<br><br>    // Define a Cold Flow for the list of items<br>    val items: Flow&lt;List&lt;Item&gt;&gt; = flow {<br>        emit(itemRepository.getItems())<br>    }<br>}</pre><p>In your UI layer:</p><pre>class ItemFragment : Fragment() {<br><br>    private val viewModel: ItemViewModel by viewModels()<br>    private lateinit var itemAdapter: ItemAdapter<br><br>    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {<br>        super.onViewCreated(view, savedInstanceState)<br><br>        itemAdapter = ItemAdapter()<br><br>        // Observe the Cold Flow for on-demand updates<br>        lifecycleScope.launchWhenStarted {<br>            viewModel.items.collect { items -&gt;<br>                // Update the UI with the new list of items<br>                itemAdapter.submitList(items)<br>            }<br>        }<br><br>        // Set up your RecyclerView or other UI components<br>        // ...<br>    }<br><br>    // ...<br>}</pre><p>In this example, the ItemViewModel has a Cold Flow of items. The UI observes the flow, and when the fragment is created or resumed, it triggers the collection, fetching the items from the database and updating the UI accordingly.</p><p>Whether you’re working with real-time updates or on-demand data loading, Kotlin Flow provides a flexible and concise way to handle asynchronous operations in your UI. Happy coding! 🚀🎨</p><h3>🎉 Conclusion: Flowing with Confidence</h3><p>And there you have it, the magic of Kotlin Flow and the distinction between Hot and Cold Flows. As you navigate the rivers of asynchronous programming, remember that Kotlin is your trusty canoe, and Flow is the paddle that keeps you moving forward.</p><p>So, which flow suits your needs: the energetic beats of Hot Flow or the on-demand episodes of Cold Flow? Let me know in the comments, and happy coding, Kotlin adventurers! 🚀🔥</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b1bd2e9527c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlocking the Power of Kotlin Coroutines: A Guide to IO, Default, and Unconfined Dispatchers for…]]></title>
            <link>https://medium.com/@solankizeel91/unlocking-the-power-of-kotlin-coroutines-a-guide-to-io-default-and-unconfined-dispatchers-for-1a7db9fb7c8a?source=rss-126798a94713------2</link>
            <guid isPermaLink="false">https://medium.com/p/1a7db9fb7c8a</guid>
            <category><![CDATA[kotlin-coroutines]]></category>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Solanki zeel]]></dc:creator>
            <pubDate>Thu, 23 Nov 2023 09:51:47 GMT</pubDate>
            <atom:updated>2023-12-10T14:35:23.435Z</atom:updated>
            <content:encoded><![CDATA[<h3>Unlocking the Power of Kotlin Coroutines: A Guide to IO, Default, and Unconfined Dispatchers for Seamless Async Programming!</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*STDDIOqci9rs_e6VJ0oMrQ.png" /></figure><p><em>image source: </em><a href="https://repository-images.githubusercontent.com/61722736/08e87280-62dc-11ea-8fed-a8a4a4ea865d"><em>https://repository-images.githubusercontent.com/61722736/08e87280-62dc-11ea-8fed-a8a4a4ea865d</em></a></p><p><strong>Introduction:</strong></p><p>Hey awesome developers! Let’s dive into the superhero world of Kotlin coroutines — those magical things that make your code do cool stuff without being a headache. Today, we’re unlocking the secrets of dispatchers: IO, Default, and Unconfined. Ready for the adventure? Let’s roll!</p><p><strong>Dispatchers: </strong>Your Superhero Teams</p><p>Imagine coroutines are like little helpers doing tasks for your app. Dispatchers are like teams that decide where these helpers should work. Let’s meet our superhero teams!</p><p>1. <strong>Dispatchers.IO:</strong> The Internet Explorer</p><p>Here’s a simple scenario: You want your app to download a picture from the internet. Enter Dispatchers.IO, the superhero that loves handling internet stuff.</p><pre>// Download a picture from the internet using Dispatchers.IO<br>GlobalScope.launch(Dispatchers.IO) {<br>    val picture = downloadPicture()<br>    showPicture(picture)<br>}</pre><p>It ensures your app stays fast and doesn’t freeze while waiting for the picture to arrive from the internet.</p><p>2. <strong>Dispatchers.Default:</strong> The Brainiac</p><p>Now, let’s say your app needs to do some serious number-crunching, like figuring out the best score in a game. Dispatchers.Default is here – the superhero for tasks that need a smart brain.</p><pre>/ Calculate the highest score using Dispatchers.Default<br>GlobalScope.launch(Dispatchers.Default) {<br>    val highestScore = calculateHighestScore()<br>    displayScore(highestScore)<br>}</pre><p>This superhero ensures your app stays sharp and quick, especially when dealing with those tricky calculations.</p><p>3. <strong>Dispatchers.Unconfined:</strong> The Free Spirit</p><p>Sometimes you want a coroutine to be a bit of a free spirit — doing things in its own style. Meet Dispatchers.Unconfined, the superhero that likes to move around.</p><pre>// Be a free spirit with Dispatchers.Unconfined<br>GlobalScope.launch(Dispatchers.Unconfined) {<br>    val initialResult = doSomethingQuick()<br>    showResult(initialResult)<br>    <br>    // The coroutine might switch places for the next task!<br>    val finalResult = doSomethingElse()<br>    displayResult(finalResult)<br>}</pre><p>But watch out! It’s a bit unpredictable, so use it wisely.</p><p>4. <strong>Dispatcher.Main:</strong> The UI Thread Superhero</p><p>In the world of Kotlin coroutines, the UI thread is a special place where you can update your app’s user interface. The Dispatcher.Main is like the superhero responsible for managing tasks related to the UI.</p><pre>// Perform UI-related tasks using Dispatchers.Main<br>GlobalScope.launch(Dispatchers.Main) {<br>    // Update UI elements<br>    progressBar.visibility = View.VISIBLE<br>    <br>    // Perform some background task<br>    val result = withContext(Dispatchers.IO) {<br>        // Download a picture from the internet<br>        downloadPicture()<br>    }<br>    <br>    // Update UI with the downloaded picture<br>    showPicture(result)<br>    <br>    // Hide the progress bar<br>    progressBar.visibility = View.GONE<br>}</pre><p>Use Dispatchers.Main when you need to perform tasks that involve updating the UI, such as modifying views, handling user input, or displaying data fetched from the internet. It ensures that the UI-related code runs on the main thread, preventing UI freezes and providing a responsive user interface.</p><p><strong>Choosing Your Hero:</strong> When to Use What</p><p>So, when do you pick your superhero? Use IO when dealing with the internet, Default for tasks needing brainpower, and Unconfined when you want your coroutine to be a bit adventurous. Use Dispatchers.Main when you need to perform tasks that involve updating the UI, such as modifying views, handling user input, or displaying data fetched from the internet.</p><p><strong>Conclusion:</strong> Your Superpower Combo</p><p>Coroutines and dispatchers are like your dynamic duo in Kotlin. With Dispatchers.IO, Dispatchers.Default, and Dispatchers.Unconfined, it&#39;s essential to remember that in Android development, Dispatchers.Main plays a crucial role in handling UI-related tasks within coroutines. Choose your superhero wisely based on the nature of the task you&#39;re performing in your coroutine.</p><p>Happy coding, superheroes!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1a7db9fb7c8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering SOLID Principles: A Practical Guide for Android Developers]]></title>
            <link>https://medium.com/@solankizeel91/mastering-solid-principles-a-practical-guide-for-android-developers-9952f8a7a88c?source=rss-126798a94713------2</link>
            <guid isPermaLink="false">https://medium.com/p/9952f8a7a88c</guid>
            <category><![CDATA[mobile-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[coding-tips]]></category>
            <category><![CDATA[solid-principles]]></category>
            <category><![CDATA[androiddev]]></category>
            <dc:creator><![CDATA[Solanki zeel]]></dc:creator>
            <pubDate>Sat, 28 Oct 2023 15:00:38 GMT</pubDate>
            <atom:updated>2023-10-28T15:00:38.646Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey Android Devs! 👋 Let’s talk about the SOLID principles — your secret weapons for crafting stellar code in Android development! 🚀</p><p><strong>1. Single Responsibility Principle (SRP)</strong> 🎯</p><p>Think of your classes as superheroes, each with a single, well-defined mission. An Activity should handle UI interactions, while a ViewModel manages data and business logic. Keep it focused! 💪</p><p><strong>2. Open/Closed Principle (OCP) 🚀</strong></p><p>Picture your code as a set of LEGO bricks. You can add new pieces (features) without dismantling the existing structure. Use interfaces and abstract classes to extend functionality without modifying existing code. 🧱</p><p><strong>3. Liskov Substitution Principle (LSP)</strong> ↔️</p><p>Subclasses should be seamless substitutes for their parent classes. If a class expects a certain behavior, any subclass should fit right in. Just like swapping out one puzzle piece for another! 🧩</p><p><strong>4. Interface Segregation Principle (ISP)</strong> 🧰</p><p>Avoid monolithic interfaces. Break them down into smaller, focused ones. Compose and reuse interfaces like building blocks, ensuring your classes only implement what they truly need. 🛠️</p><p><strong>5. Dependency Inversion Principle (DIP)</strong> 🔄</p><p>Think of it as wiring up your app with plug-and-play modules. High-level modules shouldn’t be tightly coupled to low-level ones. Instead, both should rely on abstractions (like interfaces) for seamless integration. 🔌</p><p>Applying SOLID principles in Android development not only leads to cleaner, more organized code but also sets the stage for scalability and maintainability. It’s like giving your app a solid foundation for future growth! 🌱</p><p>So, let’s elevate our Android development game together! Embrace SOLID principles, and watch your codebase soar to new heights. 🚀 Happy coding! 💡</p><p><strong>Conclusion:</strong></p><p>In a nutshell, embracing SOLID principles in Android development is like building with sturdy, interchangeable blocks. It keeps your code organized, adaptable, and easy to grow. By following these principles, you’re setting yourself up for success in creating apps that stand the test of time. Keep coding smart, and enjoy the journey! 🚀💡.</p><p>#CodeSmart #AndroidDev #SOLIDPrinciples #CleanCode #CodingTips #MobileDevelopment</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9952f8a7a88c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making Your Android App Smoother: The Power of ViewModel’s ‘onCleared()’]]></title>
            <link>https://medium.com/@solankizeel91/making-your-android-app-smoother-the-power-of-viewmodels-oncleared-17d8cd22c614?source=rss-126798a94713------2</link>
            <guid isPermaLink="false">https://medium.com/p/17d8cd22c614</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[mvvm]]></category>
            <category><![CDATA[application]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Solanki zeel]]></dc:creator>
            <pubDate>Thu, 26 Oct 2023 19:08:44 GMT</pubDate>
            <atom:updated>2023-10-26T19:08:44.862Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R2770psm_ajdsOmyhgTj8Q.png" /></figure><p><strong>Introduction:</strong></p><p>In the world of Android app development, keeping things running smoothly is a top priority. One way to do this is by using a neat little feature called `onCleared()` in ViewModels. In this article, we’ll explore how this small but mighty function can help keep your app running like a well-oiled machine. Let’s dive in and discover the secrets to making your Android app experience even better!</p><p><strong>What is ‘onCleared()’?</strong></p><p>`onCleared()` is a method provided by the ViewModel class in Android. It’s called when the associated ViewModel is no longer needed and is about to be destroyed. Here’s why and when you should use `onCleared()` in Android:</p><p><strong>Avoiding Sneaky Memory Issues:</strong></p><p>Have you ever heard of memory leaks? They’re like tiny holes in your app’s bucket. They can slowly drain away your device’s memory, leading to slower performance or even crashes. With `onCleared()`, you can patch up those holes and keep things running smoothly.</p><p><strong>Telling Coroutines When to Stop:</strong></p><p>Imagine you’re juggling tasks in your app, like loading images or fetching data from the internet. Sometimes, you need to stop a task before it’s finished. `onCleared()` gives you a way to say, “Okay, we’re done here!” to these tasks, making sure they don’t hang around longer than they should.</p><p><strong>Keeping Things Tidy for the Clean-Up Crew:</strong></p><p>Picture your app like a room. When you leave the room, you want to make sure everything is in its place, right? Well, `onCleared()` is like your reminder to tidy up. It helps clear the way for the “clean-up crew” (in this case, the Android system) to come in and keep things running smoothly.</p><p><strong>Tips for Using ‘onCleared()’ Effectively:</strong></p><ol><li><strong>Say Goodbye to Long-Term Friends:</strong> If your app is holding on to things that last longer than it does (like connections to databases or the internet), `onCleared()` is the time to say your goodbyes.</li><li><strong>Wrap Up Your Observations:</strong> If your app is keeping an eye on things (like changes in data), `onCleared()` is when you tell it, “You can stop watching now.”</li><li><strong>End Tasks Nicely:</strong> If your app is doing a task, like loading a picture, `onCleared()` is where you can say, “Thanks for your hard work, but we’re done for now.”</li></ol><p><strong>Example:</strong></p><pre>class MyViewModel : ViewModel() {</pre><pre>    private val disposable = CompositeDisposable()</pre><pre>    init {<br>        // Initialize ViewModel<br>    }</pre><pre>    fun performLongRunningTask() {<br>        // Start a long-running task<br>        // ...<br>        // Add a disposable for cleanup<br>        disposable.add(/* disposable resource */)<br>    }</pre><pre>    override fun onCleared() {<br>        super.onCleared()<br>        // Clean up any resources here<br>        disposable.clear()<br>    }<br>}</pre><p>In this example, `onCleared()` is overridden to clean up the `CompositeDisposable` used for managing disposable resources (e.g., RxJava subscriptions). It’s important to clear any resources that could cause memory leaks or unexpected behavior.</p><p><strong>In a Nutshell:</strong></p><p>By using `onCleared()`, you’re like a helpful friend who makes sure everything is in order before leaving a room. It’s a small step that can make a big difference in how smoothly your app runs. So, give it a try and watch your Android app become even better!</p><p><strong>Share your thoughts! Have you used `onCleared()` in your projects? How has it made a difference? Let’s chat in the comments below!</strong></p><p>In this article, we’ve explored the handy `onCleared()` function in ViewModels, which helps ensure your Android app runs smoothly. By using it, you can avoid memory issues and keep your app’s performance top-notch. Try it out and see the positive impact on your Android projects!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17d8cd22c614" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Android 14: Unleash Your App Development Prowess with Groundbreaking Innovations]]></title>
            <link>https://medium.com/@solankizeel91/latest-updates-android-14-for-developers-8ac96c69fc7d?source=rss-126798a94713------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ac96c69fc7d</guid>
            <category><![CDATA[android-14]]></category>
            <category><![CDATA[android-developers]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[new-features]]></category>
            <category><![CDATA[app-development]]></category>
            <dc:creator><![CDATA[Solanki zeel]]></dc:creator>
            <pubDate>Sat, 21 Oct 2023 17:17:12 GMT</pubDate>
            <atom:updated>2023-10-21T17:42:49.744Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Android 14: Unleash Your App Development Prowess with Groundbreaking Innovations</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YvQY3AZLzkm73ASQHHQb4A.png" /></figure><p>Calling all Android developers! Get ready to amplify your app development skills with Android 14, the latest iteration of Google’s mobile operating system. This exciting release brings a treasure trove of new features and enhancements, empowering you to create app experiences that are not only feature-packed but also tailored to the evolving needs and preferences of users.</p><p>Android 14 brings a host of new features and enhancements for developers, empowering them to create even more engaging and personalized experiences for users. From richer camera and media capabilities to simplified sign-in and secure health data sharing, Android 14 is packed with updates that elevate the Android app development landscape.</p><p><strong>Key Highlights for Developers</strong></p><p><strong>Immerse Users in a World of Richer Media and Enhanced Functionality:</strong></p><ul><li><strong>Ultra HDR:</strong> Capture breathtaking images with enhanced dynamic range and vibrant colors, immersing users in a world of visual brilliance. Imagine capturing sunsets with captivating gradients and cityscapes with stunning detail, all thanks to Ultra HDR’s ability to preserve the full spectrum of light and color.</li><li><strong>Camera Extensions:</strong> Tap into powerful camera extensions for low-light photography and advanced image processing, enabling you to push the boundaries of mobile photography. Capture crisp images even in dimly lit environments and apply sophisticated image processing techniques to create visually captivating content.</li><li><strong>Lossless USB Audio:</strong> Deliver high-fidelity audio experiences with lossless USB audio support, immersing users in a world of crystal-clear soundscapes. Let your users experience their favorite music and audio content with the richness and detail it deserves, without any compression artifacts.</li></ul><p><strong>Simplify User Interactions and Secure Data Sharing:</strong></p><ul><li><strong>Credential Manager:</strong> Streamline user sign-in with a unified credential management system, making it effortless for users to access their favorite apps. Eliminate the hassle of remembering multiple passwords and let Credential Manager handle the secure storage and retrieval of user credentials, making app access a breeze.</li><li><strong>Health Connect:</strong> Securely share health and fitness data across apps using the new Health Connect framework, empowering users to manage their wellness seamlessly. Give users control over their health data, allowing them to share it securely between apps for a holistic view of their well-being.</li><li><strong>Predictive Back:</strong> Enhance app navigation with predictive back gestures for a more intuitive user experience, making app exploration a breeze. Anticipate user intent and provide a seamless back navigation experience, eliminating the frustration of accidental exits and enhancing app usability.</li></ul><p><strong>Embrace Personalization and Adaptability:</strong></p><ul><li><strong>Per-App Languages:</strong> Cater to multilingual users by allowing them to set preferred languages for individual apps, ensuring a truly personalized experience. Let users tailor their language preferences to suit their individual needs, creating a more immersive and engaging app experience.</li><li><strong>Grammatical Inflection:</strong> Utilize grammatical inflection APIs to adapt app content based on user preferences, creating a more natural and engaging user interface. Craft app content that seamlessly aligns with the user’s preferred grammatical style, fostering a sense of connection and personalization.</li><li><strong>Large Screen Optimizations:</strong> Tailor your apps for large screen devices, taking advantage of the expanded canvas to deliver immersive and visually stunning experiences. Optimize your app layouts and UI elements for larger screens, creating a visually captivating and user-friendly experience on devices of all sizes.</li></ul><p>Android 14 empowers developers to create richer, more personalized, and secure app experiences. Explore the new APIs and features to enhance your apps and stay ahead of the curve in the ever-evolving Android ecosystem.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ac96c69fc7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>