<?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 Deshan Senarathna on Medium]]></title>
        <description><![CDATA[Stories by Deshan Senarathna on Medium]]></description>
        <link>https://medium.com/@deshansameera1100?source=rss-dfa01a2f4806------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*taS6y7-qLFDtZ2E_hIoeiw.png</url>
            <title>Stories by Deshan Senarathna on Medium</title>
            <link>https://medium.com/@deshansameera1100?source=rss-dfa01a2f4806------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 09:37:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@deshansameera1100/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[File-Based Routing in React Native Expo]]></title>
            <link>https://medium.com/@deshansameera1100/file-based-routing-in-react-native-expo-70ece312941e?source=rss-dfa01a2f4806------2</link>
            <guid isPermaLink="false">https://medium.com/p/70ece312941e</guid>
            <category><![CDATA[expo]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[routing]]></category>
            <dc:creator><![CDATA[Deshan Senarathna]]></dc:creator>
            <pubDate>Thu, 18 Jul 2024 10:59:08 GMT</pubDate>
            <atom:updated>2024-07-18T11:02:22.133Z</atom:updated>
            <content:encoded><![CDATA[<p>Expo Router offers a powerful and intuitive approach to managing navigation within your React Native Expo applications. It leverages a file-based system, where the presence of a file within your app directory automatically establishes a corresponding route. This streamlined approach simplifies routing configuration and fosters a clear organization of your app’s structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2BsGHbcukcUS7iBqfZpL4Q.png" /></figure><p><strong>Key Concepts:</strong></p><ul><li><strong>Root Layout (</strong><strong>app/_layout.tsx):</strong> This file serves as the foundation for your app&#39;s navigation. It typically houses your application&#39;s overall layout, including global providers (e.g., Redux store, authentication context), theme definitions, styles, and navigation container components (like Stack Navigator or Tab Navigator from React Navigation). Providers defined here become accessible across all routes in your app.</li><li><strong>Routes:</strong> Any JavaScript or TypeScript file within the app directory (excluding app/_layout.tsx) automatically translates to a route. The file name (without the extension) corresponds to the route path (URL). For instance, a file named Home.js creates a route accessible at /home.</li><li><strong>Route Components:</strong> Each route file exports a React component that represents the content displayed for that particular route. You have full control over the component’s structure and logic.</li></ul><p>Using File-based routing React Native Expo Application can be easly navigate through the screens</p><p>Imagine you’re about to embark on this adventure. Your first task is to create an initial route for your app. To do this, you head over to the app directory and add a file named index.tsx. This file will serve as the entry point to your app, matching the / route. Inside index.tsx, you craft a simple yet elegant home screen</p><pre>import { View, Text, StyleSheet } from &#39;react-native&#39;;<br><br>export default function HomeScreen() {<br>  return (<br>    &lt;View style={styles.container}&gt;<br>      &lt;Text&gt;Home&lt;/Text&gt;<br>    &lt;/View&gt;<br>  );<br>}<br><br>const styles = StyleSheet.create({<br>  container: {<br>    flex: 1,<br>    justifyContent: &#39;center&#39;,<br>    alignItems: &#39;center&#39;,<br>  },<br>});</pre><p>As you expand your app, you introduce new features and screens. For instance, you decide to add a settings page. To do this, you create a new directory named settings within the app directory and add another index.tsx file inside it</p><pre>app<br>  └── index.tsx  // matches &#39;/&#39;<br>  └── settings<br>      └── index.tsx  // matches &#39;/settings&#39;</pre><p><a href="https://docs.expo.dev/develop/file-based-routing/#_layout-file">_layout file</a></p><p>Layout files in a directory are used to define shared UI elements such as headers, tab bars so that they persist between different routes.Any time you create a new project, by default the app directory will contain a root layout file (app/_layout).</p><pre>app<br>  └── index.tsx  // matches &#39;/&#39;<br>  └── settings<br>      └── index.tsx  // matches &#39;/settings&#39;<br>  └── _layout     //Root layer</pre><p><a href="https://docs.expo.dev/develop/file-based-routing/#root-layout">Root layout</a></p><p>Traditionally, React Native projects are structured with a single root component (defined as App.js or index.js). Similarly, the first layout file (_layout.tsx) inside the app directory is considered to be the single root component.</p><p>Between multiple routes, a Root layout file in Expo Router is used to share UI between multiple routes such as injecting global providers, themes, styles, delay splash screen rendering until assets and fonts are loaded, or defining your app’s root navigation structure..</p><p>Happy coding! 💻✨</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70ece312941e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Serverless Computing]]></title>
            <link>https://medium.com/@deshansameera1100/serverless-computing-39ef8d688142?source=rss-dfa01a2f4806------2</link>
            <guid isPermaLink="false">https://medium.com/p/39ef8d688142</guid>
            <dc:creator><![CDATA[Deshan Senarathna]]></dc:creator>
            <pubDate>Mon, 15 Jul 2024 14:57:19 GMT</pubDate>
            <atom:updated>2024-07-15T15:14:15.602Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Modern Approach to Application Development</h3><p>Serverless computing is an application development and execution model that allows developers to build and run application code without having to manage the underlying servers or back-end infrastructure. While the term “serverless” might suggest a lack of servers, it actually means that the cloud service provider (CSP) manages the servers, making them invisible to the developer. This approach enables developers to focus on writing the best front-end application code and business logic without worrying about server maintenance, provisioning, or scaling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*oP9mxJrwj8OTzCqQ1K8EMw.png" /></figure><h3>How Serverless Computing Works</h3><p>In a serverless computing model, developers write their application code and deploy it to containers managed by a CSP. The cloud provider handles all the necessary infrastructure to run the code, scaling resources up and down based on demand. This includes routine tasks like operating system updates, security management, capacity planning, and system monitoring.</p><h3>Key Benefits of Serverless Computing</h3><ol><li><strong>Focus on Code</strong>: Developers can concentrate on writing application code and business logic without worrying about server management.</li><li><strong>Automatic Scaling</strong>: The cloud provider automatically scales the infrastructure based on demand, ensuring optimal performance and cost-efficiency.</li><li><strong>Cost Efficiency</strong>: Developers only pay for the compute resources used during code execution. When the code is not running, there are no charges, a concept known as “scaling to zero.”</li></ol><h3>Examples of Serverless Computing Platforms</h3><p>Several leading cloud service providers offer serverless platforms, including:</p><ul><li><strong>Amazon Web Services (AWS Lambda)</strong>: Allows developers to run code in response to events without provisioning servers.</li><li><strong>Microsoft Azure (Azure Functions)</strong>: Provides an event-driven, compute-on-demand experience.</li><li><strong>Google Cloud (Google Cloud Functions)</strong>: Enables the execution of code in response to cloud events.</li><li><strong>IBM Cloud (IBM Cloud Code Engine)</strong>: Offers serverless compute for containerized workloads.</li></ul><h3>Practical Examples of Serverless Computing</h3><h3>Image Processing</h3><p>Imagine you have a web application where users can upload images. You want to process these images (resize, apply filters, etc.) before storing them. Using serverless computing, you can write a function to handle the image processing and deploy it to a serverless platform like AWS Lambda.</p><ol><li><strong>Develop the Function</strong>: Write the image processing code.</li><li><strong>Deploy to AWS Lambda</strong>: Deploy the function to AWS Lambda.</li><li><strong>Trigger the Function</strong>: Configure the function to trigger when an image is uploaded to an S3 bucket.</li><li><strong>Automatic Scaling</strong>: AWS Lambda automatically scales to handle any number of image uploads, processing each image as it arrives.</li></ol><h3>RESTful API</h3><p>Suppose you’re building a RESTful API for a web application. Using serverless computing, you can deploy each API endpoint as a separate function.</p><ol><li><strong>Develop API Functions</strong>: Write the functions for each endpoint (e.g., GET, POST, DELETE).</li><li><strong>Deploy to Google Cloud Functions</strong>: Deploy the functions to Google Cloud Functions.</li><li><strong>API Gateway</strong>: Use Google Cloud’s API Gateway to route requests to the appropriate functions.</li><li><strong>Cost Efficiency</strong>: You only pay for the execution time of each function, not for idle server time.</li></ol><h3>The Role of Serverless Computing in Cloud-Native Development</h3><p>Serverless computing, along with microservices and containers, forms the core of cloud-native application development. Microservices break applications into small, independent services, while containers provide a consistent environment for these services. Serverless computing further enhances this model by removing the need to manage the underlying infrastructure.</p><h3>Market Growth and Adoption</h3><p>According to a report from SkyQuest Technology, the global serverless architecture market was valued at USD 8.01 billion in 2022 and is expected to grow to USD 50.86 billion by 2031.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39ef8d688142" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>