<?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 Rohan Shelke on Medium]]></title>
        <description><![CDATA[Stories by Rohan Shelke on Medium]]></description>
        <link>https://medium.com/@rohanshelke9157?source=rss-d456dd9088a2------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Rohan Shelke on Medium</title>
            <link>https://medium.com/@rohanshelke9157?source=rss-d456dd9088a2------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:44:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rohanshelke9157/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[Understanding Android Project Structure]]></title>
            <link>https://medium.com/@rohanshelke9157/understanding-android-project-structure-37296fd333c8?source=rss-d456dd9088a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/37296fd333c8</guid>
            <category><![CDATA[android-project-structure]]></category>
            <dc:creator><![CDATA[Rohan Shelke]]></dc:creator>
            <pubDate>Sun, 15 Mar 2026 17:24:58 GMT</pubDate>
            <atom:updated>2026-03-15T17:24:58.589Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Android application development has become one of the most important areas in the mobile technology industry. Millions of people use Android applications daily for communication, entertainment, education, and business purposes. Behind every Android application is a well-organized project structure that helps developers manage files, write code, design the user interface, and build the final application.</p><p>When beginners open a new project in Android Studio, they often see many folders and configuration files. At first, this structure may look confusing. However, each folder has a specific purpose that helps organize the development process efficiently.</p><p>The Android project structure mainly consists of four important components: the <strong>Java/Kotlin/Flutter directory</strong>, <strong>XML layout files</strong>, the <strong>Android Manifest file</strong>, and <strong>Gradle build scripts</strong>. Understanding these components helps developers build applications in a structured and efficient way.</p><h3>Overview of Android Project Structure</h3><p>Before discussing each component in detail, it is important to understand how an Android project is generally organized. Android Studio automatically creates a structured environment where source code, resources, and configuration files are stored in different folders.</p><p>This structure helps developers easily locate files and manage the application efficiently.</p><p>A typical Android project includes folders such as:</p><ul><li>Java or Kotlin directory for source code</li><li>Resource folder for UI design and assets</li><li>Manifest file for application configuration</li><li>Gradle scripts for building the application</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/885/1*CJLm108O2rec0v4Vx6s6dQ.png" /></figure><h3>Java / Kotlin / Flutter Directory</h3><p>The <strong>Java or Kotlin directory</strong> contains the main programming logic of the Android application. This is where developers write the code that controls how the application behaves when users interact with it.</p><p>In earlier versions of Android development, Java was the primary programming language used for creating applications. However, Google now officially recommends <strong>Kotlin</strong> as the preferred language because it is more concise, safer, and easier to maintain.</p><p>In cross-platform frameworks such as Flutter, developers write code using the <strong>Dart programming language</strong>. Although the folder structure may differ slightly, the concept remains the same: this directory contains the core functionality of the application.</p><p>Inside this directory, developers create different types of classes such as:</p><ul><li><strong>Activities</strong> — Represent different screens of the application</li><li><strong>Fragments</strong> — Reusable UI components inside activities</li><li><strong>Models</strong> — Represent data structures</li><li><strong>Helper classes</strong> — Provide additional functionality</li></ul><p>For example, the <strong>MainActivity</strong> class is usually the entry point of the application and controls the first screen that appears when the app is launched.</p><p>Example code of a basic activity:</p><pre>public class MainActivity extends AppCompatActivity {<br>    @Override<br>    protected void onCreate(Bundle savedInstanceState) {<br>        super.onCreate(savedInstanceState);<br>        setContentView(R.layout.activity_main);<br>    }<br>}</pre><pre>In this code, the onCreate() method is executed when the activity starts. The setContentView() method connects the activity with a layout file that defines the visual interface.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1D2CNIBkii8WLg6EQOaQ6g.png" /></figure><h3>XML Layout Files</h3><p>The <strong>XML layout files</strong> define the visual structure and user interface of an Android application. These files are stored inside the <strong>res/layout</strong> folder.</p><p>XML is used because it allows developers to separate the design of the application from the programming logic. This separation improves code readability and makes it easier to update the interface without modifying the main code.</p><p>A layout file typically contains different UI elements such as:</p><ul><li>TextView for displaying text</li><li>Button for user actions</li><li>EditText for user input</li><li>ImageView for displaying images</li></ul><p>Example XML layout:</p><pre>&lt;LinearLayout<br>    xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;<br>    android:orientation=&quot;vertical&quot;<br>    android:layout_width=&quot;match_parent&quot;<br>    android:layout_height=&quot;match_parent&quot;&gt;</pre><pre>    &lt;TextView<br>        android:text=&quot;Welcome to My App&quot;<br>        android:layout_width=&quot;wrap_content&quot;<br>        android:layout_height=&quot;wrap_content&quot;/&gt;</pre><pre>    &lt;Button<br>        android:text=&quot;Login&quot;<br>        android:layout_width=&quot;wrap_content&quot;<br>        android:layout_height=&quot;wrap_content&quot;/&gt;</pre><pre>&lt;/LinearLayout&gt;</pre><h3>Android Manifest File</h3><p>The <strong>Android Manifest file</strong> is a critical configuration file that provides essential information about the application to the Android operating system.</p><p>Every Android application must include this file because it tells the system how the application should behave.</p><p>The manifest file is responsible for:</p><ul><li>Declaring application components such as activities</li><li>Specifying application permissions</li><li>Defining the application icon and name</li><li>Setting hardware and software requirements</li><li>Identifying the entry point of the application</li></ul><p>Example Manifest structure:</p><pre>&lt;manifest&gt;<br>    &lt;application&gt;<br>        &lt;activity android:name=&quot;.MainActivity&quot;&gt;<br>            &lt;intent-filter&gt;<br>                &lt;action android:name=&quot;android.intent.action.MAIN&quot;/&gt;<br>                &lt;category android:name=&quot;android.intent.category.LAUNCHER&quot;/&gt;<br>            &lt;/intent-filter&gt;<br>        &lt;/activity&gt;<br>    &lt;/application&gt;<br>&lt;/manifest&gt;<br></pre><h3>Gradle Build Scripts</h3><p>Gradle is the build automation system used in Android development. It helps compile the source code, manage dependencies, and package the application into an installable file such as an APK or Android App Bundle.</p><p>Gradle simplifies the development process by automating many tasks that would otherwise require manual configuration.</p><p>There are two main Gradle files in an Android project:</p><ul><li><strong>Project-level Gradle</strong> — manages settings for the entire project</li><li><strong>App-level Gradle</strong> — manages settings specific to the application module</li></ul><p>Example Gradle configuration:</p><pre>android {<br>    compileSdkVersion 33<br>    defaultConfig {<br>        applicationId &quot;com.example.myapp&quot;<br>        minSdkVersion 21<br>        targetSdkVersion 33<br>    }<br>}</pre><p>This configuration defines the Android SDK version used for compilation and the minimum supported Android version.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zAzTc_NXxARTkj9aPFCdGw.png" /></figure><h3>Conclusion</h3><p>Understanding the Android project structure is an important step for anyone learning Android development. Although the number of files and folders may initially appear complex, each component plays a specific role in building and managing the application.</p><p>The <strong>Java/Kotlin directory</strong> contains the application logic, while <strong>XML layout files</strong> define the user interface. The <strong>Android Manifest file</strong> provides configuration information required by the Android system, and <strong>Gradle build scripts</strong> manage the build process and dependencies.</p><p>By understanding how these components work together, developers can efficiently organize their projects and create high-quality Android applications.</p><h3>References</h3><ol><li>Android Developers Official Documentation</li><li>Android Studio User Guide</li><li>Google Android Development Training</li><li>Mobile Application Development Study Materials</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37296fd333c8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to NoSQL — A Deep Dive into Version Stamps]]></title>
            <link>https://medium.com/@rohanshelke9157/introduction-to-nosql-a-deep-dive-into-version-stamps-546165a1488b?source=rss-d456dd9088a2------2</link>
            <guid isPermaLink="false">https://medium.com/p/546165a1488b</guid>
            <dc:creator><![CDATA[Rohan Shelke]]></dc:creator>
            <pubDate>Sun, 14 Sep 2025 18:22:45 GMT</pubDate>
            <atom:updated>2025-09-14T18:22:45.882Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>Introduction to NoSQL — A Deep Dive into Version Stamps</strong></h3><h3><strong>Introduction</strong></h3><p>Databases are the backbone of every modern application. From online shopping to cab booking apps, databases ensure smooth handling of user data. Traditionally, relational databases dominated this space, offering structured storage and strong consistency. However, as internet usage exploded and applications demanded global reach, relational databases started facing serious limitations.</p><p>This led to the rise of NoSQL databases, designed for scalability, flexibility, and distributed performance. Among the many concepts in NoSQL, version stamps play a crucial role in managing data integrity across distributed environments.</p><p><strong><em>(Reference: Eric Brewer first talked about the CAP theorem in 2000, explaining the trade-off between consistency, availability, and partition tolerance.)</em></strong></p><h3><strong>Why NoSQL?</strong></h3><p>Relational databases such as Oracle, MySQL, and PostgreSQL are powerful when dealing with structured data and small to medium workloads. However, companies like Google, Facebook, and Amazon discovered that these databases struggled with three critical requirements:</p><p>1. Scalability — relational databases scale vertically, which is expensive and limited.</p><p>2. Flexibility — unstructured or semi-structured data did not fit neatly into rigid tables.</p><p>3. Global Distribution — latency issues arose when users across continents accessed the same centralized database.</p><p>NoSQL databases emerged as a solution. They favored eventual consistency over strict ACID properties, embraced flexible schemas, and scaled horizontally across clusters of cheap machines.</p><p><strong><em>(Reference: Michael Stonebraker in 2010 compared SQL and NoSQL databases and highlighted why NoSQL became important. )</em></strong></p><h3><strong>Types of NoSQL Databases</strong></h3><p>NoSQL is not a single database but a family of systems, each optimized for a different type of workload:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*MloKGsbcuhoE0z5ca96zHw.png" /></figure><p>These categories provide developers with freedom to choose the right tool depending on their application’s nature.</p><p><strong><em>(Reference: MongoDB Documentation — </em></strong><a href="https://www.mongodb.com/docs"><strong><em>https://www.mongodb.com/docs</em></strong></a><strong><em>)</em></strong></p><h3><strong>The Challenge of Concurrency</strong></h3><p>In distributed systems, multiple clients may try to update the same record simultaneously. Without proper mechanisms, this leads to problems like:</p><p>• Lost updates — one update overwrites another.</p><p>• Inconsistent data — different replicas store different versions.</p><p>• Stale reads — clients working with outdated records.</p><p>The CAP theorem explains why it is impossible to guarantee consistency, availability, and partition tolerance at the same time. Most NoSQL databases therefore prioritize availability and partition tolerance while relying on clever techniques, such as version stamps, to mitigate consistency issues.</p><p><strong><em>(Reference: Brewer, E. CAP Theorem, ACM Symposium on Distributed Computing, 2000.)</em></strong></p><h3><strong>Version Stamps — The Basics</strong></h3><p>A version stamp is like a fingerprint attached to every record. Each time the record is updated, the stamp changes. This allows the system to detect if the data you are trying to update is already outdated.</p><p>This technique is part of optimistic concurrency control. Instead of locking data while a client edits it (which reduces performance), the database simply checks the version stamp during the update.</p><p><strong><em>(Reference: Amazon DynamoDB Documentation — </em></strong><a href="https://docs.aws.amazon.com/dynamodb"><strong><em>https://docs.aws.amazon.com/dynamodb</em></strong></a><strong><em>)</em></strong></p><h3><strong>How Version Stamps Work</strong></h3><p>The process works in three steps:</p><p>1. Read Phase — The client reads the record along with its version stamp.</p><p>2. Update Phase — The client modifies the data locally.</p><p>3. Write Phase — The client sends the updated data back with the version stamp.</p><p>• If the version matches → update succeeds, and a new version stamp is generated.</p><p>• If the version mismatches → update is rejected, since someone else updated it first.</p><p>This ensures that only the latest version holder can successfully commit changes.</p><p><strong><em>(Reference: FoundationDB Documentation — </em></strong><a href="https://apple.github.io/foundationdb"><strong><em>https://apple.github.io/foundationdb</em></strong></a><strong><em>)</em></strong></p><h3><strong>Real-World Scenarios</strong></h3><p>1. Cab Booking System — User A and User B both read booking #101 with version v1.</p><p>• User A updates → accepted, new version v2.</p><p>• User B updates with v1 → rejected.</p><p>2. E-Commerce Inventory — Two buyers attempt to purchase the last unit of a product.</p><p>• First buyer’s update succeeds.</p><p>• Second buyer’s update fails because the version is outdated.</p><p>3. Social Media Post Editing — Two admins try editing the same post.</p><p>• Version stamps prevent overwriting, ensuring conflicts are detected.</p><p><strong><em>(Reference: Apache Cassandra Documentation — </em></strong><a href="https://cassandra.apache.org/"><strong><em>https://cassandra.apache.org</em></strong></a><strong><em>)</em></strong></p><h3><strong>Visual Representations</strong></h3><p>• Flow Diagram –</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*PFposr36_Cv7T6nGfj8GnA.png" /></figure><p>• Timeline Chart — illustrating multiple users updating the same record.</p><p>• Conflict Detection Graphic — representing rejected updates with mismatched stamps.</p><p><strong><em>(Reference: CouchDB Official Guide — </em></strong><a href="https://docs.couchdb.org/"><strong><em>https://docs.couchdb.org</em></strong></a><strong><em>)</em></strong></p><h3><strong>Benefits of Version Stamps</strong></h3><p>• No locking overhead → better performance.</p><p>• Efficient conflict detection in distributed environments.</p><p>• Suitable for highly scalable applications.</p><p>• Lightweight compared to traditional concurrency methods.</p><p>(Reference: MongoDB University Courseware, 2022.)</p><h3><strong>Limitations of Version Stamps</strong></h3><p>• Frequent update conflicts may require retry loops.</p><p>• Not always suitable for financial transactions demanding strong consistency.</p><p>• Applications must sometimes implement additional conflict resolution logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*k-4oVxv7TF0X-xgawwrAeQ.png" /></figure><p><strong><em>(Reference: Dynamo Paper — Amazon, 2007.)</em></strong></p><h3><strong>Comparison with Other Techniques</strong></h3><p>Technique Pros Cons Locks Prevent conflicts entirely Slow, can cause deadlocks Timestamps Easy to implement Requires clock synchronization Version Stamps Lightweight, scalable May reject updates (retry needed)</p><p><strong><em>(Reference: Hellerstein, J. “Concurrency Control in Distributed Databases,” UC Berkeley, Lecture Notes.)</em></strong></p><h3><strong>Conclusion</strong></h3><p>In today’s world of massive data and global applications, strict locking methods are too slow and rigid. Version stamps provide a balanced way to handle concurrency in NoSQL databases. They enable optimistic concurrency control, ensure conflict detection, and maintain data integrity across distributed systems.</p><p>That is why major NoSQL databases like MongoDB, DynamoDB, Cassandra, and CouchDB rely on versioning systems. While not perfect, they strike the right balance between performance and reliability — exactly what modern applications need.</p><h3>References</h3><ul><li>Eric Brewer introduced the CAP theorem in 2000, explaining the trade-offs between consistency, availability, and partition tolerance.</li><li>Michael Stonebraker (2010) compared SQL and NoSQL databases, highlighting the reasons NoSQL became necessary.</li><li>Amazon’s Dynamo paper (2007) showed how versioning helps achieve high availability in key-value stores.</li><li>MongoDB’s official documentation explains NoSQL database types and their uses.</li><li>Amazon DynamoDB docs describe conditional writes using version stamps.</li><li>Apache Cassandra guides explain lightweight transactions and concurrency control.</li><li>CouchDB docs describe how revision IDs work for conflict detection.</li><li>Joseph Hellerstein’s UC Berkeley lectures outline concurrency control techniques in distributed systems.</li><li>FoundationDB documentation illustrates optimistic concurrency using version stamps.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=546165a1488b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>