<?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 Nimasha Gamage on Medium]]></title>
        <description><![CDATA[Stories by Nimasha Gamage on Medium]]></description>
        <link>https://medium.com/@NimashaGamage?source=rss-24f17041dfde------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KlErch93bnBPDM9fjanAag.png</url>
            <title>Stories by Nimasha Gamage on Medium</title>
            <link>https://medium.com/@NimashaGamage?source=rss-24f17041dfde------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 12:30:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@NimashaGamage/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[Serverless Computing on AWS: Understanding the Fundamentals]]></title>
            <link>https://medium.com/@NimashaGamage/serverless-computing-on-aws-understanding-the-fundamentals-7e88eaa50538?source=rss-24f17041dfde------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e88eaa50538</guid>
            <category><![CDATA[aws-lambda]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[serverless]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Nimasha Gamage]]></dc:creator>
            <pubDate>Sun, 05 Jul 2026 07:35:44 GMT</pubDate>
            <atom:updated>2026-07-05T07:38:29.570Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tRUnbyxmz_DuHTvp2KoseQ.png" /></figure><p>Cloud computing has significantly transformed the way modern applications are built, deployed, and maintained. Traditionally, developers were responsible for provisioning servers, configuring operating systems, managing scalability, monitoring infrastructure, and applying security updates before they could focus on writing application code.</p><p>Serverless computing changes that experience.</p><p>Instead of spending time managing infrastructure, developers can concentrate on building application features while the cloud provider automatically handles server provisioning, scaling, availability, and infrastructure maintenance behind the scenes.</p><p>Among today’s cloud platforms, <strong>Amazon Web Services (AWS)</strong> provides one of the most mature and widely adopted serverless ecosystems. Services such as <strong>AWS Lambda</strong>, <strong>Amazon API Gateway</strong>, <strong>Amazon S3</strong>, <strong>Amazon DynamoDB</strong>, and <strong>Amazon CloudWatch</strong> enable developers to build scalable, reliable, and cost-effective applications without managing servers.</p><p>Whether you’re building REST APIs, automating repetitive tasks, processing files, or developing event-driven applications, serverless technologies simplify development while reducing operational overhead.</p><p>In this beginner-friendly guide, we’ll explore the core concepts of serverless computing on AWS, including:</p><ul><li>What serverless computing really means</li><li>How traditional and serverless architectures differ</li><li>The benefits of adopting serverless applications</li><li>Common real-world serverless use cases</li><li>How AWS Lambda executes code in response to events</li></ul><p>By the end of this article, you’ll have a solid understanding of serverless computing and AWS Lambda, providing a strong foundation for your cloud computing journey.</p><h3><strong>What is Serverless Computing?</strong></h3><p>Despite its name, <strong>serverless does not mean there are no servers</strong>.</p><p>Servers still exist, but developers no longer need to provision, configure, maintain, or scale them. Instead, AWS automatically handles the underlying infrastructure while developers focus solely on writing application code.</p><p>Think of it like using electricity in your home.</p><p>You don’t own or maintain the power plant — you simply use electricity whenever you need it and pay only for what you consume.</p><p>Serverless computing follows the same principle.</p><p>Instead of managing virtual machines or physical servers, you deploy your application, and AWS takes care of:</p><ul><li>Infrastructure provisioning</li><li>Automatic scaling</li><li>Operating system maintenance</li><li>Security patches</li><li>High availability</li><li>Resource management</li></ul><p>This allows developers to spend more time building features rather than maintaining infrastructure.</p><h3>Traditional vs. Serverless Architecture</h3><p>Let’s compare the two approaches.</p><h4>Traditional Architecture</h4><p>In a traditional application, developers are responsible for almost everything:</p><ul><li>Purchasing or provisioning servers</li><li>Installing operating systems</li><li>Configuring web servers</li><li>Managing databases</li><li>Scaling during traffic spikes</li><li>Monitoring server health</li><li>Applying software updates</li></ul><p>Even when no users are accessing the application, the servers continue running, resulting in ongoing infrastructure costs.</p><h4>Serverless Architecture</h4><p>With serverless architecture:</p><ul><li>No servers to manage</li><li>Automatic scaling</li><li>Built-in high availability</li><li>Pay only for actual usage</li><li>Faster development</li><li>Reduced operational overhead</li></ul><p>AWS provisions compute resources only when your code is executed.</p><p>When there are no incoming requests, there are no running compute resources — and therefore, no compute charges.</p><p>This pricing model is often referred to as <strong>pay-per-use</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PZH8SjfBfKewFKfiNHP9fg.png" /><figcaption>Comparison between traditional server-based architecture and AWS serverless architecture.</figcaption></figure><h3>Why Choose Serverless?</h3><p>Serverless computing has become increasingly popular because it allows developers to build applications more efficiently while reducing infrastructure complexity.</p><p>Here are some of its major benefits.</p><h4>1. No Server Management</h4><p>AWS manages servers, operating systems, security patches, and infrastructure updates.</p><p>Developers simply upload their code.</p><h4>2. Automatic Scaling</h4><p>Applications automatically scale up or down depending on incoming requests.</p><p>Whether your application receives 10 requests or 10 million requests, AWS dynamically allocates resources to meet demand.</p><h4>3. Cost Efficiency</h4><p>Unlike traditional servers that run continuously, AWS Lambda charges only for the compute time your function actually uses.</p><p>This makes serverless particularly attractive for applications with unpredictable or intermittent workloads.</p><h4>4. Faster Development</h4><p>Since developers no longer spend time configuring infrastructure, they can focus on delivering application features more quickly.</p><h4>5. Built-in High Availability</h4><p>AWS automatically distributes workloads across multiple availability zones, improving application reliability without additional configuration.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Lq3Ev9w0cIFjLpbdJOI8ig.png" /><figcaption>Key advantages of adopting serverless computing on AWS.</figcaption></figure><h3>Common Use Cases</h3><p>Serverless isn’t suitable for every workload, but it excels in many real-world scenarios.</p><p>Some common examples include:</p><ul><li>REST APIs</li><li>File processing</li><li>Image resizing</li><li>Scheduled jobs</li><li>IoT applications</li><li>Chatbots</li><li>Data processing pipelines</li><li>Event-driven automation</li><li>Backend services for mobile applications</li></ul><h3>Meet AWS Lambda</h3><p>At the heart of AWS serverless development is <strong><em>AWS Lambda</em></strong><em>.</em></p><p>AWS Lambda is a serverless compute service that runs your code in response to events.</p><p>Instead of creating and managing servers, you simply upload your function, and Lambda executes it whenever an event occurs.</p><p>Examples of events include:</p><ul><li>A user sends an HTTP request through API Gateway.</li><li>A file is uploaded to an S3 bucket.</li><li>A record is added to DynamoDB.</li><li>A scheduled event occurs using EventBridge.</li><li>An SNS message is published.</li></ul><p>Lambda supports multiple programming languages, including:</p><ul><li>Python</li><li>Java</li><li>Node.js</li><li>C#</li><li>Go</li><li>Ruby</li><li>Custom runtimes</li></ul><p>One of Lambda’s biggest advantages is that AWS automatically provisions the required compute resources and scales your application based on incoming requests.</p><h3>How AWS Lambda Works</h3><p>Every Lambda function follows a simple lifecycle.</p><ol><li>An event occurs.</li><li>AWS receives the event and invokes the Lambda function.</li><li>Your application code executes within a managed runtime environment.</li><li>The function returns a response or interacts with other AWS services.</li><li>AWS automatically releases the compute resources once execution is complete.</li></ol><p>From the developer’s perspective, the entire process happens automatically.</p><p>There is no need to create servers, configure networking, or manage scaling.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-6xhcuh3FoWZRkxMPd_xrg.png" /><figcaption>AWS Lambda execution lifecycle from an event trigger to response generation.</figcaption></figure><h3>Key Takeaways</h3><p>The most important concepts to remember are:</p><ul><li>Serverless computing removes the need to manage servers — not the servers themselves.</li><li>AWS Lambda is the core compute service that powers serverless applications on AWS.</li><li>Serverless applications follow a pay-per-use pricing model, helping reduce infrastructure costs.</li><li>AWS automatically handles provisioning, scaling, availability, and infrastructure management.</li><li>Developers can focus on building business logic instead of maintaining servers.</li><li>Serverless architecture is especially well suited for event-driven, scalable, and cloud-native applications.</li></ul><h3>Conclusion</h3><p>Serverless computing simplifies cloud application development by allowing developers to focus on building features instead of managing infrastructure. With services like AWS Lambda, AWS handles provisioning, scaling, and availability, making it easier to build scalable, reliable, and cost-effective applications.</p><p>In this article, we explored the fundamentals of serverless computing, compared it with traditional architecture, discussed its key benefits and common use cases, and learned how AWS Lambda processes events. These core concepts provide a solid foundation for understanding serverless development on AWS and preparing for more advanced cloud-native architectures.</p><p>As you continue your AWS learning journey, a strong understanding of these fundamentals will help you confidently explore more advanced serverless services and build modern, event-driven applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e88eaa50538" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How JWT Actually Works Behind the Scenes (Not Just Copy-Paste Code)]]></title>
            <link>https://medium.com/@NimashaGamage/how-jwt-actually-works-behind-the-scenes-not-just-copy-paste-code-4877cb78e487?source=rss-24f17041dfde------2</link>
            <guid isPermaLink="false">https://medium.com/p/4877cb78e487</guid>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[jwt-authentication]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <dc:creator><![CDATA[Nimasha Gamage]]></dc:creator>
            <pubDate>Thu, 19 Feb 2026 06:53:19 GMT</pubDate>
            <atom:updated>2026-02-19T06:53:19.311Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*KG-Hs5N2HLfvOh9nAvyZXw.jpeg" /></figure><p>When building modern web applications, authentication is one of the first real security challenges developers face.</p><p>In many tutorials, you will see something like this:</p><pre>npm install express jsonwebtoken bcryptjs</pre><pre>const token = jwt.sign({ userId: user.id }, SECRET, { expiresIn: &quot;1h&quot; });</pre><p>It works. The application runs. The login endpoint returns a token. Protected routes become accessible.</p><p>But what is really happening behind that single jwt.sign() function call?</p><p>What does the token actually contain?<br>How does the server trust it?<br>Why is it considered “stateless”?<br>And what makes it secure?</p><p>In this article, we will explore how <strong>JSON Web Tokens</strong> work internally — from structure to cryptographic signing — using both theory and practical Node.js + Express examples.</p><h3>1. What Is a JSON Web Token?</h3><p>A <strong>JSON Web Token</strong> is a compact, URL-safe format for securely transmitting information between two parties.</p><p>It is commonly used for:</p><ul><li>Authentication (verifying user identity)</li><li>Authorization (granting access to resources)</li><li>Securing Application Programming Interfaces</li><li>Communication between microservices</li></ul><p>Unlike traditional session-based authentication, JSON Web Tokens do not require the server to store session data in memory or a database. Instead, the token itself carries the necessary information.</p><p>This makes it a <strong>stateless authentication mechanism</strong>.</p><h3>2. The Internal Structure of a JSON Web Token</h3><p>A JSON Web Token consists of three parts separated by dots:</p><pre>header.payload.signature</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pWr_jmclu8lsHJ-DOuniLg.png" /></figure><p>Each part plays a critical role in ensuring integrity and trust.</p><h4>1. Header</h4><p>The header typically contains:</p><ul><li>The type of token (which is JSON Web Token)</li><li>The signing algorithm being used</li></ul><p>Example:</p><pre>{<br>  &quot;alg&quot;: &quot;HS256&quot;,<br>  &quot;typ&quot;: &quot;JWT&quot;<br>}</pre><p>Here:</p><ul><li>alg refers to the algorithm used for signing. In this case, it is Hash-based Message Authentication Code using SHA-256.</li><li>typ specifies the token type.</li></ul><h4>2. Payload</h4><p>The payload contains <strong>claims</strong>.</p><p>Claims are pieces of information about the user or metadata about the token.</p><p>Example:</p><pre>{<br>  &quot;userId&quot;: &quot;12345&quot;,<br>  &quot;role&quot;: &quot;admin&quot;,<br>  &quot;iat&quot;: 1700000000,<br>  &quot;exp&quot;: 1700003600<br>}</pre><p>Common claims include:</p><ul><li>Issuer (who created the token)</li><li>Subject (who the token refers to)</li><li>Issued at (when the token was created)</li><li>Expiration time (when the token becomes invalid)</li></ul><p>⚠️ Important clarification:</p><p>The payload is <strong>not encrypted</strong>.<br> It is only Base64 URL encoded.</p><p>Anyone who has the token can decode and read the payload.</p><p>Therefore, sensitive data such as passwords must never be included inside the token.</p><h4>3. Signature</h4><p>The signature ensures that the token has not been altered.</p><p>It is created using:</p><pre>HMACSHA256(<br>  base64UrlEncode(header) + &quot;.&quot; + base64UrlEncode(payload),<br>  secretKey<br>)</pre><p>The secret key exists only on the server.</p><p>If someone modifies the payload, the signature will no longer match during verification.</p><p>This is what protects the token from tampering.</p><h3>3. What Happens When a Token Is Created?</h3><p>Let us break down the signing process step by step.</p><p>When you write:</p><pre>jwt.sign(payload, SECRET_KEY)</pre><p>Internally, the following occurs:</p><ol><li>The header object is converted into JSON format.</li><li>The payload object is converted into JSON format.</li><li>Both are Base64 URL encoded.</li><li>They are concatenated with a dot.</li><li>A cryptographic hashing function is applied using the secret key.</li><li>The resulting signature is appended.</li></ol><p>The final output looks like this:</p><pre>eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.<br>eyJ1c2VySWQiOiIxMjM0NSIsInJvbGUiOiJhZG1pbiJ9.<br>abc123signaturexyz</pre><p>This entire string is the JSON Web Token.</p><h3>4. Complete Authentication Flow</h3><p>Understanding the lifecycle of a token is essential.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QW9FOJL5L4ZDZgU0GtYr7A.png" /></figure><h4>Step-by-step process:</h4><ol><li>The client sends login credentials to the server.</li><li>The server verifies the credentials.</li><li>If valid, the server generates a JSON Web Token.</li><li>The client stores the token.</li><li>For future requests, the client sends the token in the Authorization header.</li><li>The server verifies the token signature.</li><li>Access is granted or denied.</li></ol><h3>5. Practical Implementation Using Node.js and Express</h3><p>Let us now build a clean example.</p><h4>Step 1: Install Dependencies</h4><pre>npm install express jsonwebtoken bcryptjs</pre><ul><li>Express is a web application framework for Node.js.</li><li>jsonwebtoken is used to create and verify JSON Web Tokens.</li><li>bcryptjs is used to hash and compare passwords securely.</li></ul><h4>Step 2: Login and Token Generation</h4><pre>const express = require(&quot;express&quot;);<br>const jwt = require(&quot;jsonwebtoken&quot;);<br>const bcrypt = require(&quot;bcryptjs&quot;);<br><br>const app = express();<br>app.use(express.json());<br><br>const SECRET_KEY = &quot;your_strong_secret_key&quot;;<br><br>const user = {<br>  id: &quot;123&quot;,<br>  email: &quot;test@email.com&quot;,<br>  password: bcrypt.hashSync(&quot;password123&quot;, 10),<br>  role: &quot;admin&quot;<br>};<br><br>app.post(&quot;/login&quot;, async (req, res) =&gt; {<br>  const { email, password } = req.body;<br><br>  if (email !== user.email) {<br>    return res.status(400).json({ message: &quot;Invalid credentials&quot; });<br>  }<br><br>  const isValidPassword = await bcrypt.compare(password, user.password);<br><br>  if (!isValidPassword) {<br>    return res.status(400).json({ message: &quot;Invalid credentials&quot; });<br>  }<br><br>  const token = jwt.sign(<br>    {<br>      userId: user.id,<br>      role: user.role<br>    },<br>    SECRET_KEY,<br>    {<br>      expiresIn: &quot;1h&quot;<br>    }<br>  );<br><br>  res.json({ token });<br>});</pre><h4>Step 3: Middleware for Token Verification</h4><pre>function authenticateToken(req, res, next) {<br>  const authorizationHeader = req.headers[&quot;authorization&quot;];<br><br>  if (!authorizationHeader) {<br>    return res.status(401).json({ message: &quot;Access denied&quot; });<br>  }<br><br>  const token = authorizationHeader.split(&quot; &quot;)[1];<br><br>  jwt.verify(token, SECRET_KEY, (error, decoded) =&gt; {<br>    if (error) {<br>      return res.status(403).json({ message: &quot;Invalid or expired token&quot; });<br>    }<br><br>    req.user = decoded;<br>    next();<br>  });<br>}</pre><h4>Step 4: Protected Route</h4><pre>app.get(&quot;/dashboard&quot;, authenticateToken, (req, res) =&gt; {<br>  res.json({<br>    message: &quot;Welcome to the dashboard&quot;,<br>    user: req.user<br>  });<br>});</pre><h3>6. Why JSON Web Tokens Are Called Stateless</h3><p>In traditional session-based authentication:</p><ul><li>The server stores session information in memory or a database.</li><li>Each request requires session lookup.</li><li>Scaling requires shared session storage.</li></ul><p>In token-based authentication:</p><ul><li>The token contains user identity and claims.</li><li>The server only verifies the signature.</li><li>No session storage is required.</li></ul><p>This makes JSON Web Tokens highly suitable for distributed systems and microservices architectures.</p><h3>7. Signing Versus Encryption</h3><p>It is critical to understand this distinction.</p><p>Signing ensures:</p><ul><li>Data integrity</li><li>Authenticity</li></ul><p>Encryption ensures:</p><ul><li>Confidentiality</li></ul><p>JSON Web Tokens are signed by default.<br>They are not encrypted.</p><p>If confidentiality is required, encryption mechanisms must be applied separately.</p><h3>8. Common Security Mistakes Developers Make</h3><ol><li>Storing tokens in browser local storage (vulnerable to cross-site scripting attacks)</li><li>Using weak secret keys</li><li>Not setting expiration times</li><li>Storing sensitive information inside the payload</li><li>Not enforcing secure Hypertext Transfer Protocol connections</li></ol><p>Security should always be intentional, not accidental.</p><h3>Final Thoughts</h3><p>Understanding how JSON Web Tokens work internally transforms you from a developer who copies authentication code into a developer who understands security architecture.</p><p>Behind every token:</p><ul><li>There is structured data.</li><li>There is cryptographic signing.</li><li>There is trust verification.</li><li>There is stateless design.</li></ul><p>When you understand the internals, you write safer systems.</p><p>And safer systems build better software.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4877cb78e487" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Journey into Linux: From Curiosity to Practical Confidence]]></title>
            <link>https://medium.com/@NimashaGamage/my-journey-into-linux-from-curiosity-to-practical-confidence-685c10fae7d1?source=rss-24f17041dfde------2</link>
            <guid isPermaLink="false">https://medium.com/p/685c10fae7d1</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[learning-journey]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Nimasha Gamage]]></dc:creator>
            <pubDate>Tue, 03 Feb 2026 06:00:48 GMT</pubDate>
            <atom:updated>2026-02-03T06:00:48.397Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OZEhgP0nZgn5C-Pgd1Fhmg.jpeg" /></figure><p>Linux has become a foundational technology in modern software development, cloud computing, and DevOps environments. For a long time, Linux felt like a distant concept to me — frequently mentioned in technical discussions, job descriptions, and system documentation, yet rarely explored in depth. As I progressed in my academic work and practical development experience, I realized that learning Linux was no longer optional but essential.</p><p>This article documents my personal journey into Linux, from initial curiosity to developing practical confidence. It is written for beginners who want a clear, structured, and realistic introduction to Linux without feeling overwhelmed.</p><h3>Why I Decided to Learn Linux</h3><p>My motivation to learn Linux grew gradually. While working on development projects and studying system-related subjects, I noticed a recurring pattern:</p><ul><li>Most servers run on Linux</li><li>Cloud platforms rely heavily on Linux-based systems</li><li>DevOps tools, containers, and automation scripts assume Linux knowledge</li><li>Job descriptions consistently list Linux as a core requirement</li></ul><p>Despite this, I realized that my understanding was superficial. I knew Linux existed, but I did not truly understand how it worked, how files were structured, or why developers preferred command-line interaction over graphical interfaces.</p><p>Rather than treating Linux as just another tool, I decided to approach it as a <strong>fundamental skill</strong> — similar to learning how an operating system functions internally.</p><h3>Understanding What Linux Really Is</h3><p>One of the first misconceptions I had was thinking of Linux as a single operating system. In reality, Linux is a <strong>kernel</strong>, not a complete operating system by itself. The kernel is the core component responsible for managing hardware resources such as memory, processors, storage devices, and input/output operations.</p><p>What we commonly refer to as “Linux” is actually a <strong>Linux distribution</strong>, which combines:</p><ul><li>The Linux kernel</li><li>A shell (command-line interface)</li><li>System libraries and utilities</li><li>Package management tools</li><li>Desktop environments or server tools</li></ul><p>This modular structure is one of the reasons Linux is so flexible and powerful.</p><h3>Choosing a Linux Distribution as a Beginner</h3><p>When I began, I quickly realized that choosing a distribution was an important decision. There are hundreds of Linux distributions, each designed for specific purposes.</p><p>After researching and comparing options, I selected <strong>Ubuntu</strong> as my starting point. The reasons were straightforward:</p><ul><li>Extensive documentation and tutorials</li><li>Strong community support</li><li>Stability and ease of use</li><li>Widespread industry adoption</li></ul><p>Starting with a beginner-friendly distribution allowed me to focus on learning Linux concepts rather than struggling with complex configuration issues.</p><h3>Setting Up Linux Without Replacing Windows</h3><p>Since my primary operating system was still Windows, I wanted a way to learn Linux without removing my existing setup or configuring a dual-boot system. I explored two practical approaches that proved extremely effective: <strong>Windows Subsystem for Linux (WSL)</strong> and <strong>container-based Linux environments</strong>.</p><h4>Windows Subsystem for Linux (WSL)</h4><p>Windows Subsystem for Linux allows a genuine Linux environment to run directly within Windows. It provides access to a real Linux terminal and file system behavior without requiring traditional virtual machines.</p><h4><strong>Installing WSL</strong></h4><p>To enable WSL, I opened <strong>PowerShell as an Administrator</strong> and ran the following command:</p><pre>wsl --install</pre><p>This command automatically:</p><ul><li>Enables required Windows features</li><li>Installs the WSL kernel</li><li>Downloads Ubuntu as the default Linux distribution</li><li>Sets WSL 2 as the default version</li></ul><p>After the installation completed, a system restart was required.</p><h4>Launching Linux for the First Time</h4><p>After restarting, I launched Ubuntu from the Start Menu or by running:</p><pre>wsl</pre><p>During the first launch, I was prompted to create a Linux username and password. Once completed, I had access to a fully functional Linux terminal inside Windows.</p><h4>Verifying the Linux Environment</h4><p>To confirm that Linux was running correctly, I executed the following commands inside the terminal:</p><p>Displays kernel and system information.</p><pre>uname -a</pre><p>Shows the current working directory.</p><pre>pwd</pre><p>Lists files and directories in the current location.</p><pre>ls</pre><h4>Updating the System</h4><p>As a best practice, I updated the Linux environment immediately:</p><pre>sudo apt update<br>sudo apt upgrade</pre><p>This ensured that all system packages and dependencies were up to date.</p><h4>Container-Based Linux Environments</h4><p>In addition to WSL, I explored Linux using containers. Containers provide isolated Linux environments that are lightweight and commonly used in modern development and DevOps workflows.</p><h4>Running Linux Using Containers</h4><p>After installing a container runtime, I pulled and launched a Linux container:</p><p>Downloads the official Ubuntu Linux image.</p><pre>docker pull ubuntu</pre><p>Starts an interactive Linux container session.</p><pre>docker run -it ubuntu</pre><p>Inside the container, I was working in a Linux environment similar to a production server.</p><h4>Verifying the Container Environment</h4><p>To confirm the Linux distribution running inside the container, I used:</p><pre>cat /etc/os-release</pre><p>This command displays operating system information for the container.</p><h3>Learning the Linux File System</h3><p>Understanding the Linux file system was a major milestone. Unlike Windows, Linux uses a single-root directory structure.</p><p>Some directories I learned early were:</p><ul><li>/home for user files</li><li>/etc for configuration files</li><li>/var for logs and variable data</li><li>/bin and /usr/bin for system commands</li></ul><p>This knowledge made navigation, configuration, and troubleshooting significantly easier.</p><h3>Becoming Comfortable with the Command Line</h3><p>At first, the command line felt intimidating. However, regular practice transformed it into one of the most powerful tools in my workflow.</p><p>I learned how to:</p><ul><li>Navigate directories</li><li>Create and edit files</li><li>Manage permissions</li><li>Install and remove software</li></ul><p>The command line emphasized precision and efficiency, allowing complex tasks to be completed quickly and reliably.</p><h3>Software Management and System Control</h3><p>Linux uses package managers to handle software installation and updates. This approach ensures security, consistency, and proper dependency management.</p><p>Instead of downloading installers manually, I could install software using a single command. This system-level control felt both efficient and professional.</p><h3>Final Reflections</h3><p>Linux is often perceived as complex or difficult, but my experience proved otherwise. With patience, curiosity, and consistent practice, Linux becomes an empowering and rewarding environment.</p><p>For anyone beginning their Linux journey, my advice is simple: start small, practice regularly, and do not be afraid to make mistakes. Every error contributes to deeper understanding.</p><blockquote>Linux is not just an operating system. It is a mindset.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=685c10fae7d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[DevSecOps for Beginners: How Security Fits into a CI/CD Pipeline]]></title>
            <link>https://medium.com/@NimashaGamage/devsecops-for-beginners-how-security-fits-into-a-ci-cd-pipeline-5388a5cc227b?source=rss-24f17041dfde------2</link>
            <guid isPermaLink="false">https://medium.com/p/5388a5cc227b</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[ci-cd-pipeline]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[cloud-security]]></category>
            <category><![CDATA[devsecops]]></category>
            <dc:creator><![CDATA[Nimasha Gamage]]></dc:creator>
            <pubDate>Wed, 21 Jan 2026 06:47:09 GMT</pubDate>
            <atom:updated>2026-01-21T07:02:15.043Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*wHfM2heMkNht2mMCeIGMzQ.jpeg" /></figure><p>When I first learned about DevOps, everything felt focused on <strong>speed</strong> — faster builds, faster deployments, faster releases. But very quickly, I realized something important: <strong>speed without security is risky</strong>.</p><p>This is where <strong>DevSecOps</strong> comes in.</p><p>DevSecOps is not about adding more tools or slowing teams down. It’s about <strong>making security a natural part of how we build and deliver software</strong>, starting from the first line of code all the way to production.</p><p>In this blog, I’ll explain <strong>how security fits into a CI/CD pipeline</strong>, in a simple and beginner-friendly way.</p><h3>What Does DevSecOps Really Mean?</h3><p>DevSecOps stands for <strong>Development, Security, and Operations</strong>.<br>Instead of treating security as a final step handled by a separate team, DevSecOps encourages <strong>everyone</strong> — developers, DevOps engineers, and security teams — to share responsibility.</p><p>The key idea is simple:</p><blockquote><strong>Security should be built in, not bolted on at the end.</strong></blockquote><p>By integrating security checks into CI/CD pipelines, teams can find vulnerabilities earlier, fix them faster, and release software with more confidence.</p><h3>A Quick Look at a Typical CI/CD Pipeline</h3><p>Before adding security, let’s understand the basic flow of a CI/CD pipeline.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*B1wqUENiLlD2wafKFVxxDg.png" /></figure><p>This pipeline automates the journey from <strong>code commit</strong> to <strong>production deployment</strong>.<br>DevSecOps enhances this pipeline by <strong>embedding security checks at every stage</strong> instead of adding a single security gate at the end.</p><h3>How Security Fits into Each Stage of the CI/CD Pipeline</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*7edHv3DOQ7XfP8mUJ5_pBg.png" /></figure><h4>1. Code Commit: Security Starts with Developers</h4><p>Security begins the moment a developer writes code.</p><p>At this stage, DevSecOps focuses on preventing common mistakes <strong>before code reaches the repository</strong>.</p><p>Typical practices include:</p><ul><li>Secure coding guidelines</li><li>Pre-commit hooks to detect secrets</li><li>Static Application Security Testing (SAST)</li></ul><p>These checks help catch issues like hard-coded credentials or insecure coding patterns early — when fixing them is easiest.</p><h4>2. Build Stage: Securing Dependencies and Containers</h4><p>During the build stage, applications often rely on:</p><ul><li>Open-source libraries</li><li>Third-party packages</li><li>Container images</li></ul><p>These components can introduce vulnerabilities without developers realizing it.</p><p>DevSecOps addresses this by adding:</p><ul><li>Dependency vulnerability scanning (SCA)</li><li>Container image scanning</li></ul><p>This ensures insecure libraries or images don’t silently move forward in the pipeline.</p><h4>3. Testing Stage: Detecting Runtime Security Issues</h4><p>Functional tests verify that the application works — but DevSecOps adds <strong>security-focused testing</strong> here.</p><p>Common security checks include:</p><ul><li>Dynamic Application Security Testing (DAST)</li><li>API security testing</li><li>Configuration validation</li></ul><p>These tests simulate real-world attacks and help identify vulnerabilities that only appear when the application is running.</p><h4>4. Deployment Stage: Securing Infrastructure and Configuration</h4><p>Even secure code can become vulnerable if the infrastructure is misconfigured.</p><p>DevSecOps ensures infrastructure is secure by using:</p><ul><li>Infrastructure as Code (IaC) scanning</li><li>Policy-as-Code enforcement</li><li>Secure secrets management</li></ul><p>These checks prevent insecure cloud configurations from reaching production.</p><h4>5. Monitoring: Continuous Security After Deployment</h4><p>Security does not end once the application is live.</p><p>DevSecOps emphasizes <strong>continuous monitoring</strong> to detect:</p><ul><li>Suspicious behavior</li><li>Runtime vulnerabilities</li><li>Security incidents</li></ul><p>This feedback loop helps teams respond quickly and continuously improve security.</p><h3>Why DevSecOps Is Important for Beginners</h3><p>As a beginner, DevSecOps might sound overwhelming — but its purpose is actually very practical.</p><p>DevSecOps helps you:</p><ul><li>Catch vulnerabilities early</li><li>Avoid last-minute security surprises</li><li>Build safer applications by default</li><li>Develop a security-aware mindset</li></ul><p>You don’t need to master everything at once. Even small steps — like scanning dependencies or avoiding hard-coded secrets — make a big difference.</p><h3>How to Start Learning DevSecOps</h3><p>If you’re just starting out, focus on the basics:</p><ul><li>Understand CI/CD fundamentals</li><li>Learn common vulnerabilities (OWASP Top 10)</li><li>Practice with simple security tools</li><li>Think about security while writing code</li></ul><p>DevSecOps is not a destination — it’s a continuous learning journey.</p><h3>Final Thoughts</h3><p>DevSecOps integrates security into every stage of the CI/CD pipeline, making it part of everyday development rather than a last-minute hurdle.</p><p>By shifting security left and automating checks, teams can move fast <strong>without compromising safety</strong>. For beginners, understanding where security fits into CI/CD is the first step toward building reliable, secure software in modern development environments.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5388a5cc227b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AWS IAM for Beginners — A Simple, Visual Guide to Securing Your AWS Account]]></title>
            <link>https://medium.com/@NimashaGamage/aws-iam-for-beginners-a-simple-visual-guide-to-securing-your-aws-account-11868dbd9167?source=rss-24f17041dfde------2</link>
            <guid isPermaLink="false">https://medium.com/p/11868dbd9167</guid>
            <category><![CDATA[aws-iam]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Nimasha Gamage]]></dc:creator>
            <pubDate>Mon, 19 Jan 2026 07:32:49 GMT</pubDate>
            <atom:updated>2026-01-19T07:36:37.324Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS IAM for Beginners — A Simple, Visual Guide to Securing Your AWS Account</h3><blockquote>“Security in AWS doesn’t start with firewalls or encryption — it starts with IAM.”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0aZnHYEmzNuUlPxYFLAiOA.png" /></figure><p>When beginners create an AWS account, they often jump straight into EC2, S3, or Lambda.<br>But AWS has <strong>one service that silently controls everything you do</strong> — <strong>IAM</strong>.</p><p>This article explains <strong>AWS IAM (Identity and Access Management)</strong> in a <strong>clear, visual, beginner-friendly way</strong>, without heavy jargon.<br>If you’re a <strong>student, intern, or AWS beginner</strong>, this guide is for you.</p><h3>What Is AWS IAM?</h3><p>AWS IAM controls access to your AWS account.</p><p>In simple terms:</p><blockquote><strong>IAM decides who can log in and what they’re allowed to do.</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/795/1*sVBzvJ9DPPalbkyHnLVhyw.png" /></figure><p>IAM answers two critical questions:</p><ul><li><strong>Who are you?</strong></li><li><strong>What are you allowed to access?</strong></li></ul><p>AWS IAM is:</p><ul><li>Free</li><li>Global</li><li>Mandatory for secure AWS usage</li></ul><h3>The Root User Problem (Why IAM Exists)</h3><p>When you first create an AWS account, AWS gives you a <strong>root user</strong>.</p><h4>Root User = Full Power</h4><ul><li>Can delete everything</li><li>Can access billing</li><li>Can close the account</li></ul><p>Using the root user daily is like:</p><blockquote>Giving everyone the master key to your house.</blockquote><h4>AWS Best Practice</h4><ul><li>Use root <strong>only once</strong> (setup + billing)</li><li>Use <strong>IAM users</strong> for daily work</li></ul><h3>IAM Building Blocks (Think in Layers)</h3><p>AWS IAM is built using <strong>four main components</strong>.</p><p>Let’s visualize them instead of memorizing definitions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*ep0x023iarbgJ-NgTJsMJA.png" /></figure><h4>1. IAM Users — “Who is accessing AWS?”</h4><p>An <strong>IAM User</strong> represents:</p><ul><li>A person (you, your teammate)</li><li>Or an application</li></ul><p>Each user can log in using:</p><ul><li>AWS Console (username &amp; password)</li><li>Access keys (for CLI / SDK)</li></ul><p><strong>Real-World Analogy</strong></p><blockquote>IAM User = Employee ID</blockquote><h4>2. IAM Roles — “Temporary permissions for services”</h4><p>IAM Roles are used when:</p><ul><li>AWS services need access to other services</li><li>Temporary access is required</li></ul><p><strong>Common Use Cases</strong></p><ul><li>EC2 → S3</li><li>Lambda → DynamoDB</li><li>One AWS account → another AWS account</li></ul><p><strong>Key Idea</strong></p><ul><li>Users = permanent identity</li><li>Roles = <strong>temporary permission set</strong></li></ul><h4>3. IAM Policies — “What is allowed?”</h4><p><strong>Policies define permissions.</strong><br> They are written in JSON and tell AWS:</p><ul><li>What actions are allowed</li><li>On which resources</li><li>Under what conditions</li></ul><p><strong>Beginner Translation</strong></p><blockquote>Policy = Rulebook</blockquote><p>Examples:</p><ul><li>Allow reading objects from S3</li><li>Deny deleting EC2 instances</li></ul><h4>4. IAM Groups — “Who belongs together?”</h4><p>An <strong>IAM Group</strong> is a collection of users with similar roles.</p><p>Instead of assigning permissions one by one:</p><ul><li>Create a group</li><li>Attach permissions to the group</li><li>Add users to it</li></ul><p><strong>Example Groups:</strong></p><ul><li>Developers</li><li>Interns</li><li>Admins</li></ul><p><strong>Why Groups Matter</strong></p><ul><li>Easier permission management</li><li>Cleaner security design</li></ul><h3>IAM Architecture — Visual Explanation</h3><p><strong>1. User → Group → Policy Flow</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/415/1*OfgjAEcEGzPaVDEp4WiWOw.png" /><figcaption>Users never get permissions directly — they inherit them from policies.</figcaption></figure><p><strong>2. Role-Based Access (No Passwords)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nb1LCGis-8oByimdv18laQ.png" /><figcaption>How AWS services access other services securely</figcaption></figure><h3>IAM Best Practices (Beginner Safe Rules)</h3><p>Follow these from day one:</p><ol><li><strong>Enable MFA for Root User:</strong> Extra security layer.</li><li><strong>Create IAM Users for Yourself:</strong> Never use root daily.</li><li><strong>Use Groups:</strong> Avoid individual permissions.</li><li><strong>Apply Least Privilege:</strong> Give <strong>only what’s required</strong>.</li><li><strong>Never Commit Access Keys:</strong> Especially on GitHub.</li></ol><h3>Common Beginner IAM Mistakes</h3><ul><li>Using root user for development</li><li>Giving AdministratorAccess to everyone</li><li>Hardcoding AWS keys in code</li><li>Forgetting to remove unused users</li></ul><p>Avoiding these already makes you <strong>more professional</strong> than many beginners.</p><h3>Final Thoughts</h3><p>AWS IAM may look complex at first, but when broken down visually:</p><blockquote>IAM is simply about identities, permissions, and trust.</blockquote><p>Master IAM early, and every other AWS service becomes easier and safer to use.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11868dbd9167" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[WSO2 Ballerina Integration with Google Calendar — Creating an OAuth Client and Retrieving the…]]></title>
            <link>https://medium.com/@NimashaGamage/wso2-ballerina-integration-with-google-calendar-creating-an-oauth-client-and-retrieving-the-760b99896069?source=rss-24f17041dfde------2</link>
            <guid isPermaLink="false">https://medium.com/p/760b99896069</guid>
            <category><![CDATA[oauth2]]></category>
            <category><![CDATA[google-api]]></category>
            <category><![CDATA[integration]]></category>
            <category><![CDATA[ballerina]]></category>
            <dc:creator><![CDATA[Nimasha Gamage]]></dc:creator>
            <pubDate>Wed, 29 Oct 2025 16:32:49 GMT</pubDate>
            <atom:updated>2025-10-30T04:27:01.580Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>WSO2 Ballerina Integration with Google Calendar — Creating an OAuth Client and Retrieving the Refresh Token</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mBU-p2eUkycPREXHEr9vow.png" /></figure><p>To enable Ballerina to interact with <strong>Google Calendar</strong>, we first need to <strong>activate the Google Calendar API</strong> provided by Google’s developer platform. Along with that, it’s essential to <strong>configure the authentication process</strong> required by Google APIs.</p><p>This involves setting up a few <strong>OAuth 2.0 configurations</strong> on the Google Cloud Console — such as creating a client, obtaining the client ID, client secret, and generating a <strong>refresh token</strong> that will be used for secure, authorized access.</p><p><strong>Step 1 — Create a Project in the Google Cloud Console</strong></p><p>Start by visiting the <a href="https://console.developers.google.com/apis/credentials"><strong>Google Cloud Console</strong></a>.</p><ol><li>In the top navigation bar, click on the <strong>project name</strong> dropdown.</li><li>Select <strong>“New Project”</strong> to create a new application.</li><li>Enter a descriptive name for your project — for example, <em>“My Project xxxxx”</em>.</li><li>Click <strong>Create</strong> to initialize the project.</li></ol><p>Once created, you’ll be redirected to your new project’s dashboard, where you can begin configuring APIs and credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QK7gRnTdHYzDgws1nvz-FQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/710/1*lq_k5xo0tn9ntFmHKlv9Zw.png" /></figure><h3>Step 2 — Configure the OAuth Consent Screen</h3><p>Once your project is created, you’ll need to set up the <strong>OAuth consent screen</strong>. This is required before you can generate OAuth 2.0 credentials.</p><ol><li>From the left sidebar, select <strong>APIs &amp; Services → Credentials</strong>.</li><li>Click <strong>Configure consent screen</strong> (you’ll see a yellow warning banner if it’s not yet configured).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--gt0LMAxyEKlCuBkJia9A.png" /></figure><p>3. Click <strong>Get Started</strong> and fill in the <strong>App Information</strong>:</p><ul><li><strong>App name</strong> — A descriptive name for your app.</li><li><strong>User support email</strong> — Your contact email.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*em33iF-sfgdPOSQlzTGPog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2luflisTVeOY-_GmaEk78Q.png" /></figure><p>4. Under <strong>Audience</strong>, confirm <strong>External </strong>is selected, then click <strong>Next</strong>.</p><p>5. Add your <strong>Contact Information</strong>, agree to the <strong>Google API Services User Data Policy</strong>, and finally click <strong>Create</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZ2fmS4vnUBfs16r5E4mVQ.png" /></figure><p>After this step, your consent screen will be ready and you can move on to creating <strong>OAuth 2.0 client credentials</strong>.</p><h3>Step 3 — Create OAuth 2.0 Client Credentials</h3><p>Now that the consent screen is configured, it’s time to create OAuth 2.0 credentials — these will allow Ballerina to securely communicate with the <strong>Google Calendar API</strong>.</p><ol><li><strong>Navigate to the Credentials page</strong></li></ol><ul><li>From the left sidebar, go to <strong>APIs &amp; Services → Credentials</strong>.</li><li>Click <strong>+ Create Credentials</strong>, then select <strong>OAuth client ID</strong> from the dropdown.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SEseFWln67x-dxJnHCjGfg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*uCuyB_wBk7NapglcW0IIQA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eWkrZZNY-l_Ai60XnXolMA.png" /></figure><p><strong>2. Choose the application type</strong></p><ul><li>In the <em>Create OAuth client ID</em> form, choose <strong>Web application</strong> as the <strong>Application type</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5zXR-Hy7pwxGc1E6dLPX5A.png" /></figure><p><strong>3. Configure the client details</strong></p><ul><li>Give your client a clear <strong>name</strong>.</li></ul><p>Under <strong>Authorized redirect URIs</strong>, add the following:</p><p><strong>Authorized redirect URIs -</strong><a href="https://developers.google.com/oauthplayground">https://developers.google.com/oauthplayground</a></p><ul><li>This redirect URL allows you to exchange authorization codes for access and refresh tokens using <strong>OAuth Playground</strong>, which we’ll use in the next step.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CmMFt8yFIcbY9mVePG8LuA.png" /></figure><p><strong>4. Create the credentials</strong></p><ul><li>Click <strong>Create</strong> to generate your OAuth client.</li><li>A dialog box will appear containing your <strong>Client ID</strong> and <strong>Client Secret</strong>.</li></ul><p><strong>⚠️ Important:</strong> Copy or download the credentials as a JSON file right away. You’ll need them later for token exchange — and starting June 2025, Google will restrict re-downloading these secrets after closing the dialog.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kFoYGi_yGXWXXq6g_Xa5yg.png" /></figure><p>After completing this step, you’ll have your <strong>Client ID</strong> and <strong>Client Secret</strong> ready.<br> Next, we’ll use <strong>OAuth Playground</strong> to generate the <strong>access token</strong> and <strong>refresh token</strong>.</p><h3>Step 4 — Enable the Google Calendar API and Admin SDK API</h3><p>Before using Ballerina to interact with Google Calendar, you must <strong>enable the necessary APIs</strong> in your Google Cloud project. These APIs allow your OAuth client to access and manage calendar and workspace data securely.</p><h4>1. Open the API Library</h4><ul><li>From the left sidebar, go to <strong>APIs &amp; Services → Library</strong>.</li><li>This page lists all available Google APIs that can be activated for your project.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rsLbRBlSWxchRSS2fATo5A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rjrqX0NttyO3riMCGe9aQA.png" /></figure><h4>2. Search for Google Calendar API</h4><ul><li>In the search bar, type <strong>“Google Calendar API”</strong>.</li><li>Click on the <strong>Google Calendar API</strong> result that appears.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*286q1PSRH3rXPiObKX3UOQ.png" /></figure><h4>3. Enable the Google Calendar API</h4><ul><li>Click <strong>Enable</strong> on the API details page.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1VG7OIxYXcLdYLPBdrkUIg.png" /></figure><h4>4. Enable the Admin SDK API</h4><p>For Google Workspace administrators or advanced integrations, the <strong>Admin SDK API</strong> allows access to user, group, and directory data.</p><ul><li>Return to the <strong>API Library</strong>.</li><li>Search for <strong>“Admin SDK API”</strong>.</li><li>Click it, then select <strong>Enable</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5gTNVWryJvenU3W5s55QxA.png" /></figure><h4>5. Verify Enabled APIs</h4><ul><li>To confirm activation, go to <strong>APIs &amp; Services → Enabled APIs &amp; Services</strong>.</li><li>You should now see both <strong>Google Calendar API</strong> and <strong>Admin SDK API</strong> listed.</li></ul><p>Once these APIs are enabled, your Google Cloud project is fully prepared to handle calendar operations through Ballerina.</p><h3>Step 5 — Obtain the Refresh Token using OAuth 2.0 Playground</h3><p>Now that you have your <strong>OAuth Client ID</strong> and <strong>Client Secret</strong> from Google Cloud Console, the next step is to use the <strong>OAuth 2.0 Playground</strong> to authorize your application and generate tokens for accessing Google resources.</p><h4>1. Open OAuth 2.0 Playground</h4><ul><li>Go to<a href="https://developers.google.com/oauthplayground/"> <strong>OAuth 2.0 Playground</strong></a>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ogI-hsSJ1WfXOHv8KeIWPg.png" /></figure><h4>2. Configure OAuth Settings</h4><ul><li>Click the <strong>settings icon ⚙️</strong> on the top-right corner.</li><li>Enable <strong>“Use your own OAuth credentials.”</strong></li><li>Paste the <strong>Client ID</strong> and <strong>Client Secret</strong> you obtained from the Google Cloud Console.</li><li>Keep <strong>OAuth flow</strong> as Server-side.</li><li>Set <strong>Access type</strong> to Offline — this ensures a refresh token can be generated.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*Iq1-WhCS3jjt4xKYPUw-Bw.png" /></figure><h4>3. Select Required API Scopes</h4><ul><li>On the left sidebar, expand and select:</li><li><strong>Google Calendar API v3</strong> → choose scopes such as</li></ul><p><a href="https://www.googleapis.com/auth/calendar.readonly"><em>https://www.googleapis.com/auth/calendar.readonly</em></a></p><ul><li><strong>Admin SDK API</strong> → choose scopes such as</li></ul><p><a href="https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly"><em>https://www.googleapis.com/auth/admin.directory.resource.calendar.readonly</em></a></p><ul><li>Click <strong>Authorize APIs</strong>.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F5vgq5ENebhG6yBGHbMk-g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-65DUKn1_xsZODhzzujZMg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tozwcFGLx29fsGsfukIJMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H1o-2Ety5pc_M_SBt6X6QQ.png" /></figure><h4>4. Authorize and Sign In</h4><ul><li>A Google sign-in screen will appear asking for permission.</li><li>Select your Google account and click <strong>Allow</strong> to grant access to the chosen scopes.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cxfgfqw1sgXiIxdtaPrJBA.png" /></figure><h4>5. Exchange Authorization Code for Tokens</h4><ul><li>After granting permissions, you’ll be redirected to <strong>Step 2</strong> in the OAuth Playground.</li><li>You will see an <strong>Authorization Code</strong> field automatically filled.</li><li>Click <strong>“Exchange authorization code for tokens.”</strong></li></ul><p>This will generate a <strong>Refresh Token</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SjpqRC6y9h0SVFf36USfWg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JtbiXtUDoAi-_fQyToXMeg.png" /></figure><p>Now we have everything we need to get the authentication done.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=760b99896069" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Docker and Kubernetes Explained for Absolute Beginners]]></title>
            <link>https://medium.com/@NimashaGamage/docker-and-kubernetes-explained-for-absolute-beginners-2781ef3bad67?source=rss-24f17041dfde------2</link>
            <guid isPermaLink="false">https://medium.com/p/2781ef3bad67</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[microservices]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <dc:creator><![CDATA[Nimasha Gamage]]></dc:creator>
            <pubDate>Mon, 12 May 2025 07:26:45 GMT</pubDate>
            <atom:updated>2025-05-12T07:26:45.444Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6zVsRrYUW_7a0_ZJ7S5pCg.png" /></figure><h3>Introduction</h3><p>In today’s world of software development, <strong>Docker</strong> and <strong>Kubernetes</strong> are everywhere. But if you’re new to them, they can feel overwhelming. Don’t worry — this guide will break them down in a beginner-friendly way using clear language and simple diagrams.</p><p>By the end of this post, you’ll understand:</p><ul><li>What Docker is and why we use it</li><li>What Kubernetes is and how it works with Docker</li><li>Basic concepts like containers, pods, and deployments</li><li>A simple example that ties everything together</li></ul><h3>What is Docker?</h3><p>Imagine your application needs specific tools to run — like Python 3.10, Node.js 20, or certain system libraries. Normally, you’d install these directly on your machine, and it gets messy fast.</p><p><strong>Docker solves this problem</strong> by letting you package your application and everything it needs into a <strong>container</strong>.</p><h4>A Container is Like a Shipping Container</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*HUVeF82ABkfq-LZbg9gOXA.png" /><figcaption>Container structure</figcaption></figure><p>Think of a container like a standardized shipping box that can carry anything — whether it’s toys or clothes. It works the same on ships, trains, or trucks.</p><p>A <strong>Docker container</strong> can carry:</p><ul><li>Your code</li><li>Runtime (e.g., Node.js, Python)</li><li>System tools and libraries</li><li>Configuration files</li></ul><p>And you can run it <em>anywhere</em> Docker is installed.</p><h3>What is Kubernetes?</h3><p>Now imagine you have <strong>dozens or hundreds</strong> of containers. How do you:</p><ul><li>Start and stop them?</li><li>Make sure they restart if they crash?</li><li>Handle traffic and load balancing?</li></ul><p>That’s where <strong>Kubernetes</strong> comes in. It’s a <strong>container orchestration platform</strong> that manages your Docker containers for you.</p><h3>A Simple Analogy</h3><ul><li><strong>Docker</strong> is like creating and running a single app in a container.</li><li><strong>Kubernetes</strong> is like the manager that deploys, scales, and monitors <em>lots</em> of containers across multiple machines.</li></ul><h3>Key Concepts</h3><h4>1. Docker Container</h4><p>A Docker container is created from a Docker image:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iAiUaeuqr4fG9-LnZeHRHg.jpeg" /><figcaption>Docker workflow diagram</figcaption></figure><h4>2. Kubernetes Cluster</h4><p>Kubernetes works with clusters, made of:</p><ul><li><strong>Master (Control Plane)</strong> — decides what to do</li><li><strong>Nodes (Workers)</strong> — run the containers</li></ul><p>Each node runs <strong>Pods</strong>, which contain one or more containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*fgY3ffy66PonWzqS0qZIwg.png" /></figure><h3>Real-World Workflow</h3><p>Let’s say you’ve built a weather app. Here’s what happens:</p><ol><li>You <strong>create a Docker image</strong> for your app.</li><li>You <strong>push it to Docker Hub</strong> (or another container registry).</li><li>You write a Kubernetes <strong>Deployment YAML file</strong>.</li><li>Kubernetes pulls the image and runs it in a <strong>Pod</strong>.</li><li>You expose the app using a <strong>Service</strong> so users can access it.</li></ol><h3>Conclusion</h3><p>Docker and Kubernetes are two of the most important tools in modern software development — and now, you’ve taken your first step in understanding how they work and why they matter.</p><p>To recap:</p><ul><li><strong>Docker</strong> makes it easy to package your application with all its dependencies into a single, portable unit — a container.</li><li><strong>Kubernetes</strong> helps you manage and scale those containers efficiently across multiple machines, handling things like deployment, load balancing, and automatic restarts.</li></ul><p>When used together, they provide a powerful, flexible foundation for building robust, scalable, and cloud-native applications.</p><p>If you’re just getting started, here are some simple steps to continue your learning journey:</p><ul><li><strong>Install Docker</strong> on your machine and try creating and running a basic container using a sample app (like a simple Node.js or Python script).</li><li><strong>Experiment with Kubernetes</strong> using <a href="https://labs.play-with-k8s.com/"><strong>Play with Kubernetes</strong></a> — a free, browser-based environment that lets you run Kubernetes clusters without any local setup.</li><li><strong>Explore tutorials</strong> or follow beginner-friendly YouTube walkthroughs that walk you through deploying your first app on Kubernetes.</li></ul><p>Don’t worry if it feels a bit confusing at first — with practice, it all starts to click. Keep experimenting, break things, and rebuild. That’s the best way to learn.</p><p>Happy containerizing!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2781ef3bad67" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a CRUD API with Node.js, Express.js, and TypeScript]]></title>
            <link>https://medium.com/@NimashaGamage/how-to-build-a-crud-api-with-node-js-express-js-and-typescript-2afa56f7d2c4?source=rss-24f17041dfde------2</link>
            <guid isPermaLink="false">https://medium.com/p/2afa56f7d2c4</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Nimasha Gamage]]></dc:creator>
            <pubDate>Sat, 14 Dec 2024 05:54:09 GMT</pubDate>
            <atom:updated>2024-12-14T05:54:09.613Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*9qiKpE2BW6C2NFzQvHg-JA.png" /></figure><p>This blog will guide you through creating a CRUD (Create, Read, Update, Delete) API using Node.js, Express.js, TypeScript, and MongoDB. Additionally, we’ll cover how to set up a .env file for managing environment variables like database connection strings securely.</p><p>Before diving into the implementation, here’s a quick overview:</p><ul><li><strong>Node.js</strong>: Executes JavaScript on the server side.</li><li><strong>Express.js</strong>: A minimalist web framework for Node.js.</li><li><strong>TypeScript</strong>: A statically typed superset of JavaScript.</li><li><strong>MongoDB</strong>: A NoSQL database ideal for flexible schema designs.</li></ul><h3>Prerequisites</h3><p>Ensure you have:</p><ol><li>Node.js installed (<a href="https://nodejs.org/">Download here</a>).</li><li>MongoDB installed locally or an account with a cloud provider like MongoDB Atlas.</li><li>Basic knowledge of JavaScript, TypeScript, and REST APIs.</li></ol><h3>Step 1: Set Up the Project</h3><ol><li><strong>Create a new project directory</strong>:</li></ol><pre>mkdir crud-api  <br>cd crud-api</pre><p><strong>2. Initialize the project</strong>:</p><pre>npm init -y</pre><h3><strong>Step 2: Install Dependencies</strong></h3><h4><strong>Run the following commands:</strong></h4><pre>npm install express body-parser mongoose dotenv  <br>npm install --save-dev typescript ts-node @types/node @types/express nodemon</pre><ul><li><strong>express</strong>: Framework for building web APIs.</li><li><strong>body-parser</strong>: Middleware for parsing JSON request bodies.</li><li><strong>mongoose</strong>: ODM for MongoDB.</li><li><strong>typescript</strong>: TypeScript compiler.</li><li><strong>@types/</strong>*: Type definitions for the respective packages.</li><li><strong>nodemon</strong>: Automatically restarts the server when changes are detected.</li></ul><h3>Step 3: Configure TypeScript</h3><ol><li><strong>Initialize TypeScript:</strong></li></ol><pre>npx tsc --init</pre><p>2. <strong>Update </strong><strong>tsconfig.json</strong> with these key settings:</p><pre>&quot;target&quot;: &quot;ES6&quot;,  <br>&quot;module&quot;: &quot;commonjs&quot;,  <br>&quot;outDir&quot;: &quot;./dist&quot;,  <br>&quot;rootDir&quot;: &quot;./src&quot;,  <br>&quot;strict&quot;: true</pre><h3>Step 4: Set Up the Application</h3><ol><li><strong>Create the project structure</strong>:</li></ol><pre>mkdir src  <br>touch src/server.ts </pre><h4>Folder Structure</h4><p>Here’s the recommended structure for our project:</p><pre>crud-api/  <br>│  <br>├── src/  <br>│   ├── controllers/  <br>│   │   └── itemController.ts  <br>│   ├── models/  <br>│   │   └── itemModel.ts  <br>│   ├── routes/  <br>│   │   └── itemRoutes.ts  <br>│   ├── utils/  <br>│   │   └── db.ts  <br>│   ├── server.ts  <br>│  <br>├── .env  <br>├── .gitignore  <br>├── package.json  <br>├── tsconfig.json  <br>└── README.md</pre><h3>Step 5: Configure Environment Variables</h3><ol><li><strong>Create a </strong><strong>.env file</strong> in the project root:</li></ol><pre>PORT=3000  <br>MONGO_URI=mongodb+srv://dummyUser:dummyPassword@cluster0.abcde.mongodb.net/myDatabase?retryWrites=true&amp;w=majority</pre><p>2. Install the dotenv library to load environment variables:</p><pre>npm install dotenv</pre><h3>Step 6: Set Up Database Connection</h3><ol><li><strong>Create a </strong><strong>db.ts file</strong> in the utils folder:</li></ol><pre>import mongoose from &#39;mongoose&#39;;  <br><br>const connectDB = async () =&gt; {  <br>    try {  <br>        await mongoose.connect(process.env.MONGO_URI as string);  <br>        console.log(&#39;Database connected successfully&#39;);  <br>    } catch (error) {  <br>        console.error(&#39;Database connection failed:&#39;, error);  <br>        process.exit(1);  <br>    }  <br>};  <br><br>export default connectDB;</pre><p>2. Import this function in server.ts and call it:</p><pre>import connectDB from &#39;./utils/db&#39;;  <br><br>connectDB();</pre><h3>Step 7: Implement the Server</h3><ol><li><strong>In </strong><strong>server.ts</strong>, add the following:</li></ol><pre>import express from &#39;express&#39;;  <br>import bodyParser from &#39;body-parser&#39;;  <br>import dotenv from &#39;dotenv&#39;;  <br>import router from &#39;./routes/itemRoutes&#39;; <br>import connectDB from &#39;./utils/db&#39;;  <br><br>dotenv.config();  <br><br>const app = express();  <br>const PORT = process.env.PORT || 3000;  <br><br>connectDB();  <br><br>app.use(bodyParser.json());  <br>app.use(&#39;/api/items&#39;, router);  <br><br>app.listen(PORT, () =&gt; {  <br>    console.log(`Server running on http://localhost:${PORT}`);  <br>});</pre><h3>Step 8: Define the Mongoose Model</h3><ol><li><strong>In </strong><strong>models/itemModel.ts</strong>, define the schema:</li></ol><pre>import mongoose from &#39;mongoose&#39;;  <br><br>const ItemSchema = new mongoose.Schema({  <br>    name: { type: String, required: true },  <br>    description: { type: String },  <br>    price: { type: Number, required: true },  <br>});  <br><br>export default mongoose.model(&#39;Item&#39;, ItemSchema);</pre><h3>Step 9: Implement Controllers</h3><ol><li><strong>In </strong><strong>controllers/itemController.ts</strong>, add CRUD logic:</li></ol><pre>import { Request, Response } from &#39;express&#39;;  <br>import Item from &#39;../models/itemModel&#39;;  <br><br>export const createItem = async (req: Request, res: Response) =&gt; {  <br>    try {  <br>        const newItem = new Item(req.body);  <br>        await newItem.save();  <br>        res.status(201).json(newItem);  <br>    } catch (error) {  <br>        res.status(500).json({ error: &#39;Failed to create item&#39; });  <br>    }  <br>};  <br><br>export const getItems = async (req: Request, res: Response) =&gt; {  <br>    const items = await Item.find();  <br>    res.status(200).json(items);  <br>};  <br><br>export const updateItem = async (req: Request, res: Response) =&gt; {  <br>    const updatedItem = await Item.findByIdAndUpdate(req.params.id, req.body, { new: true });  <br>    res.status(200).json(updatedItem);  <br>};  <br><br>export const deleteItem = async (req: Request, res: Response) =&gt; {  <br>    await Item.findByIdAndDelete(req.params.id);  <br>    res.status(204).send();  <br>};</pre><h3>Step 10: Create Routes</h3><ol><li><strong>In </strong><strong>routes/itemRoutes.ts</strong>, define the endpoints:</li></ol><pre>import express from &#39;express&#39;;  <br>import { createItem, getItems, updateItem, deleteItem } from &#39;../controllers/itemController&#39;;  <br><br>const router = express.Router();  <br><br>router.post(&#39;/&#39;, createItem);  <br>router.get(&#39;/&#39;, getItems);  <br>router.put(&#39;/:id&#39;, updateItem);  <br>router.delete(&#39;/:id&#39;, deleteItem);  <br><br>export default router;</pre><h3>Step 11: Test the API</h3><ol><li>Add scripts to package.json:</li></ol><pre>&quot;scripts&quot;: {  <br>    &quot;start&quot;: &quot;ts-node src/server.ts&quot;,  <br>    &quot;dev&quot;: &quot;nodemon src/server.ts&quot;  <br>}</pre><p>2. Start the server:</p><pre>npm run dev</pre><p>3. Use a tool like Postman or cURL to test the endpoints:</p><ul><li><strong>POST</strong> /api/items</li><li><strong>GET</strong> /api/items</li><li><strong>PUT</strong> /api/items/:id</li><li><strong>DELETE</strong> /api/items/:id</li></ul><h3>Conclusion</h3><p>Congratulations! You’ve built a fully functional CRUD API using Node.js, Express, and TypeScript. This setup forms the backbone of many modern web applications. Feel free to expand on this by adding features like authentication, validation, and advanced error handling.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2afa56f7d2c4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Getting Started with Spring Boot]]></title>
            <link>https://medium.com/@NimashaGamage/getting-started-with-spring-boot-b63ed496d213?source=rss-24f17041dfde------2</link>
            <guid isPermaLink="false">https://medium.com/p/b63ed496d213</guid>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spring-boot]]></category>
            <dc:creator><![CDATA[Nimasha Gamage]]></dc:creator>
            <pubDate>Mon, 09 Dec 2024 15:24:39 GMT</pubDate>
            <atom:updated>2024-12-09T15:24:39.498Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/466/1*OB55_fzC1IC4MR8SQdu_WQ.png" /></figure><h4><strong>A Step-by-Step Guide to Installation and Project Creation</strong></h4><h3><strong>Introduction</strong></h3><p>Spring Boot is a powerful framework designed to simplify the development of Java-based applications. By eliminating the need for extensive configuration, it allows developers to focus on writing code and building features. Whether you’re creating a REST API, a web application, or a microservice, Spring Boot streamlines the process with its auto-configuration capabilities and embedded servers.</p><p>In this guide, we’ll walk you through the essential steps to install Spring Boot, set up your development environment, and create your first Spring Boot project. This step-by-step tutorial is perfect for beginners who want to get started quickly and efficiently.</p><h3>Step 1: Installing Java and Maven</h3><ol><li><strong>Install Java Development Kit (JDK):</strong></li></ol><p>Ensure you have Java 8 or higher installed. Use the following command to check:</p><pre>java -version</pre><p>Download and install JDK from <a href="https://www.oracle.com/java/technologies/javase-downloads.html">Oracle’s website</a> or use OpenJDK.</p><p><strong>2</strong>. <strong>Install Maven (Optional):</strong></p><p>Maven is a tool to build and manage Java projects. Install it from <a href="https://maven.apache.org/">Maven’s website</a> or use a package manager like Homebrew (macOS):</p><pre>brew install maven</pre><h3><strong>Step 2: Setting Up Your IDE</strong></h3><p>Choose a robust IDE to simplify development:</p><ul><li><strong>IntelliJ IDEA</strong>: Recommended for its Spring Boot support.</li><li><strong>Eclipse</strong>: A popular option for Java developers.</li><li><strong>Visual Studio Code</strong>: Lightweight and flexible, with Spring Boot extensions available.</li></ul><p>Ensure your IDE has the necessary plugins or extensions for Spring Boot development.</p><h3><strong>Step 3: Using Spring Initializr to Create a Project</strong></h3><ol><li><strong>Access Spring Initializr:</strong><br>Visit <a href="https://start.spring.io/">Spring Initializr</a>.</li></ol><p><strong>2. Configure Your Project:</strong></p><ul><li><strong>Project Type:</strong> Maven or Gradle.</li><li><strong>Language:</strong> Java.</li><li><strong>Spring Boot Version:</strong> Use the latest stable version.</li><li><strong>Dependencies:</strong> Select <strong>Spring Web</strong> to enable web application development.</li></ul><p><strong>3. Generate and Download the Project:</strong></p><ul><li>Click “Generate” to download your project.</li><li>Extract the downloaded ZIP into your desired workspace.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TMabBCytqEaxAGThS4kcVw.png" /><figcaption>Spring Initializr Interface</figcaption></figure><h3>Step 4: Writing the Controller to Display a Message</h3><ol><li>Open the project in your IDE.</li><li>Navigate to the src/main/java/com/example/demo directory.</li><li>Create a new file named WelcomeController.java in the same package as your main application class.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*zJz7iWnqHOHDJjMLXA-DqQ.png" /><figcaption>Folder Structure</figcaption></figure><p>Add the following code to define the controller:</p><pre>package com.example.demo;<br><br>import org.springframework.web.bind.annotation.GetMapping;<br>import org.springframework.web.bind.annotation.RestController;<br><br>@RestController<br>public class WelcomeController {<br><br>    @GetMapping(&quot;/&quot;)<br>    public String welcome() {<br>        return &quot;Welcome to Spring Boot world!&quot;;<br>    }<br>}</pre><p>This controller defines a REST endpoint (/) that returns a simple text message.</p><h3>Step 5: Running the Project Locally</h3><ol><li><strong>Build the project using Maven to verify the setup:</strong></li></ol><pre>mvn clean install</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/386/1*3E_QN3-hlyMlRWvVBRnFxg.png" /><figcaption>Also, you can clean and install Maven using IntelliJ IDEA like this.</figcaption></figure><p><strong>2. Start the application with:</strong></p><pre>mvn spring-boot:run</pre><p>Alternatively, execute the main method (DemoApplication) in your application class directly from your IDE.</p><h3>Step 6: Verifying the Result</h3><ul><li>Open your browser and go to <a href="http://localhost:8080.">http://localhost:8080.</a></li><li>You should see the message <strong>“Welcome to Spring Boot world!”</strong> displayed in plain text.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/591/1*xvmGULva2vvE91-XWRLDqg.png" /></figure><h3><strong>Conclusion</strong></h3><p>Congratulations! You’ve successfully created your first Spring Boot application. In this guide, you learned how to:</p><ol><li>Install Java and Maven.</li><li>Set up your IDE for Spring Boot development.</li><li>Create a Spring Boot project using Spring Initializr.</li><li>Build a simple controller to display a welcome message.</li><li>Run and test your application locally.</li></ol><p>Spring Boot’s simplicity and flexibility make it an excellent choice for beginners and experts alike. From here, you can start exploring additional dependencies, writing RESTful APIs, and integrating databases. Dive deeper into Spring Boot’s rich ecosystem and take your projects to the next level!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b63ed496d213" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[SQL vs NoSQL: Choosing the Right Database for Your Application]]></title>
            <link>https://medium.com/@NimashaGamage/sql-vs-nosql-choosing-the-right-database-for-your-application-8c353f2eeb75?source=rss-24f17041dfde------2</link>
            <guid isPermaLink="false">https://medium.com/p/8c353f2eeb75</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Nimasha Gamage]]></dc:creator>
            <pubDate>Mon, 09 Dec 2024 06:45:29 GMT</pubDate>
            <atom:updated>2024-12-09T06:45:29.808Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/536/1*Rl1EZVZb8MqW2guCMx5IGA.png" /></figure><p>When building modern applications, choosing the right database is a critical decision. SQL and NoSQL are prominent database paradigms, each designed for specific use cases and offering unique strengths. This blog will explore their differences, advantages, disadvantages, and ideal use cases.</p><h4><strong>What Are SQL and NoSQL ?</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*hNyl5bfbdhrUlTc9jMgChg.png" /></figure><h4><strong>Key Differences Between SQL and NoSQL</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*AMSRJCtTnPLLDbqrFTqxBw.png" /></figure><h4><strong>When to Use SQL ?</strong></h4><p>SQL databases shine when:</p><ol><li><strong>Data Integrity Matters:</strong> Banking or financial systems rely on ACID compliance.</li><li><strong>Complex Relationships:</strong> Applications needing complex JOINs, such as social networks.</li><li><strong>Well-Defined Schema</strong>: Projects with clear, stable data models, like inventory systems.</li></ol><p><strong>Example:</strong></p><p>A retail application storing customer data in tables.</p><pre>CREATE TABLE Customers (<br>    CustomerID INT PRIMARY KEY,<br>    Name VARCHAR(255),<br>    Email VARCHAR(255),<br>    JoinDate DATE<br>);<br><br>INSERT INTO Customers (CustomerID, Name, Email, JoinDate) <br>VALUES (1, &#39;John Doe&#39;, &#39;john@example.com&#39;, &#39;2023-12-01&#39;);</pre><h4><strong>When to Use NoSQL ?</strong></h4><p>NoSQL databases are ideal for:</p><ol><li><strong>Big Data Applications</strong>: Systems handling massive, real-time data streams like IoT.</li><li><strong>Flexible Data Models</strong>: Dynamic and evolving schema requirements, like content management.</li><li><strong>High Scalability Needs</strong>: Distributed systems requiring horizontal scaling.</li></ol><p><strong>Example:</strong></p><p>A blog application storing posts and metadata in JSON documents.</p><pre>{<br>  &quot;postId&quot;: &quot;123&quot;,<br>  &quot;title&quot;: &quot;NoSQL Basics&quot;,<br>  &quot;author&quot;: &quot;Jane Doe&quot;,<br>  &quot;tags&quot;: [&quot;database&quot;, &quot;NoSQL&quot;],<br>  &quot;comments&quot;: [<br>    {&quot;user&quot;: &quot;John&quot;, &quot;message&quot;: &quot;Great article!&quot;},<br>    {&quot;user&quot;: &quot;Alice&quot;, &quot;message&quot;: &quot;Thanks for sharing.&quot;}<br>  ]<br>}</pre><h4><strong>Pros and Cons of SQL vs NoSQL</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*aVqgiSqYC8kF_Xpl_Co2lw.png" /></figure><h4><strong>Final Thoughts</strong></h4><p>Choosing between SQL and NoSQL depends on your application’s requirements. SQL is the right choice if your priority is data consistency, complex querying, or predefined schemas. For scalability, flexibility, and handling large volumes of unstructured data, NoSQL is the way to go.</p><p>What has your experience been with SQL or NoSQL? Share your thoughts in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8c353f2eeb75" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>