<?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 Pamudu Manjitha Ratnayake on Medium]]></title>
        <description><![CDATA[Stories by Pamudu Manjitha Ratnayake on Medium]]></description>
        <link>https://medium.com/@pamuduratnayake?source=rss-5b811d0700e6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*UGn_qUpVR_EiIJ6y</url>
            <title>Stories by Pamudu Manjitha Ratnayake on Medium</title>
            <link>https://medium.com/@pamuduratnayake?source=rss-5b811d0700e6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:01:20 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pamuduratnayake/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[SQL vs NoSQL]]></title>
            <link>https://pamuduratnayake.medium.com/sql-vs-nosql-f0003ad23680?source=rss-5b811d0700e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0003ad23680</guid>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[sql-vs-nosql]]></category>
            <dc:creator><![CDATA[Pamudu Manjitha Ratnayake]]></dc:creator>
            <pubDate>Mon, 16 May 2022 10:06:23 GMT</pubDate>
            <atom:updated>2022-05-16T10:06:23.626Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*nHnqIhGJSmpo7VanYKpx2Q.png" /></figure><p>All subfields of data science are built on data. You’ll need to collect and evaluate data regardless of the size or purpose of the structure you’re constructing. This information is usually maintained in a database management system (DBMS). To engage with the database management system, you must speak its language or one that it knows. SQL is the language that is used to interface with DBMSs.</p><p>In recent years, a new phrase in the database world has emerged: NoSQL databases. If you’re new to data science, you’ve probably come across both SQL and NoSQL databases.</p><blockquote>what is the difference and when to use each of them?</blockquote><p>Simple, SQL, and NoSQL interface with many database types. Relational databases are interacted with using SQL, whereas non-rational databases are interacted with using NoSQL.</p><h3>Relational Databases</h3><p>The information is stored in relational databases in various tables, each with several records (rows). These tables are linked together by one or more relationships. The relationship between the tables is defined by the keys. The table field (column) that holds unique values for each entry is known as a key. If a field is designated as a table’s main key, it can appear in several tables and be used to access numerous tables at the same time. When a primary key is used to connect two tables, it is referred to as a foreign key in the other table.</p><h3>Non-Relational Databases</h3><p>Non-relational databases, or NoSQL databases, do not store data in tables and records like relational databases do. Instead, the data storage structure of these databases is built and optimized for specific applications. NoSQL databases employ Object-relational-mapping (ORM) to communicate with their data instead of SQL, which is used by relational databases. Column-oriented, document-oriented, key-value pairs, and graph databases are the four most common forms of NoSQL databases. These categories can be used separately or in combination. The option you choose will be determined by your application and the data you need to keep.</p><h4>Document-oriented Database</h4><p>The structure of the data sorted in a document-oriented database does not have to be rigorous. It’s more of a collection of fields and data values arranged in a document’s structure. To safeguard the data, these document-oriented databases are frequently saved as JSON strings that can be encoded using YAML, XML, or plain text. One advantage of utilizing a document-oriented database is that you don’t have to use the same structure for all of your documents. This allows the developer to sort several data kinds inside the same database. MongoDB is a document-oriented database written in Python.</p><h4>Key-value Databases</h4><p>If you’re acquainted with Python, a key-value database is similar to a Python dictionary. Every database data object will be saved as a key and value pair.</p><h4>Column-oriented Databases</h4><p>A column-oriented database stores and organizes data in columns, as the name implies. If you need to store sparse data, this form of database is ideal. Sparse data is more easily organized using a column-oriented method.</p><h4>Graph databases</h4><p>When your data is extremely interrelated, you’ll need a database that can handle it quickly. Graph databases are the most sophisticated NoSQL databases. It is, nevertheless, quite adaptable, making it ideal for a wide range of applications.</p><h3>Which is better between SQL and NoSQL?</h3><p>So, how do we decide whether to use SQL or NoSQL databases?</p><p>To answer this question, you must evaluate four factors: flexibility, scalability, consistency, and available technology.</p><ol><li>Flexibility is important when your data has a variety of forms and kinds. NoSQL databases, by definition, provide you more flexibility in designing your schema and storing diverse data formats within the same database. On the other hand, SQL databases have a more rigorous structure and schema.</li><li>Have you ever seen a Japanese parking elevator? It enables you to park vehicles on top of one another. Now, consider this: would it be more efficient to add levels to current elevator or to construct new ones? You can add layers to SQL databases since they are vertically scalable (increase its load). Although NoSQL databases are horizontally scalable, you may increase their load by distributing the work over numerous servers.</li><li>SQL databases are designed to be very consistent. However, depending on the DBMS, a NoSQL database might be either consistent or inconsistent. MongoDB, for example, is a consistent database, but Cassandra is not.</li><li>One factor to examine is the database technology’s present level of development. SQL databases are more developed than NoSQL databases since they have been around for longer. Starting with SQL and then transitioning to NoSQL may be the best option for novices.</li></ol><p>If you’re working with an RDBMS (relational database management system), want to examine the data’s behavior, or want to create bespoke dashboards, SQL is the preferable choice. SQL also performs better with sophisticated queries and provides for speedier data storage and recovery.</p><h3>Conclusion</h3><p>In the end, I can’t tell if SQL is superior to NoSQL or vice versa. Each has its own set of benefits and drawbacks, and your decision will be dependent on your data, your application, and what helps the development process go more smoothly for you.</p><p>SQL databases are older, therefore its set schema design and structure have been investigated and defined. Because of its variable structure, NoSQL databases are easily scalable, adaptable, and relatively simple to use.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0003ad23680" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interested In Koa.js ?]]></title>
            <link>https://pamuduratnayake.medium.com/interested-in-koa-js-4225cc53314f?source=rss-5b811d0700e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/4225cc53314f</guid>
            <category><![CDATA[koajs]]></category>
            <dc:creator><![CDATA[Pamudu Manjitha Ratnayake]]></dc:creator>
            <pubDate>Mon, 16 May 2022 04:12:11 GMT</pubDate>
            <atom:updated>2022-05-16T04:12:11.770Z</atom:updated>
            <content:encoded><![CDATA[<h3>Interested In Koa.js ?</h3><h3>What is Koa.js?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_SEhpSaIh7-l1jV-yFgeDQ.jpeg" /></figure><p>Node.js makes it easy for web developers to create fast and scalable network applications utilizing JavaScript as a cross-platform server-side runtime environment. Many web developers now utilize Node.js to create both the frontend and backend of a JavaScript web application. Using a number of Node.js frameworks, web developers may speed up the creation of bespoke web apps and application programming interfaces (APIs).</p><p>Node.js web application framework Koa.js is frequently used. The designers of another popular Node.js framework, Express.js, developed and manage Koa.js. Koa.js provides a simple interface for constructing web apps and APIs as a lightweight Node.js framework. The framework’s features and technologies aid programmers in accelerating the creation of web apps and APIs.</p><h4><strong>Differentiate Koa.js from Other Node.js Frameworks</strong></h4><p><strong>Modern and Futuristic</strong></p><p>Koa.js, unlike other Node.js frameworks, is based on the ECMAScript 6 or ECMAScript 2015 standard. ECMAScript 2015 adds a number of new classes and modules to make developing complicated applications easier. Koa.js also makes use of generators from the ECMAScript 2015 standard. As a result, it assists developers in creating apps that remain relevant over time.</p><p><strong>Error Handling</strong></p><p>While developing web applications, programmers look for better ways to detect and manage issues. By utilizing middleware more efficiently, Koa.js simplifies and improves error handling. The framework’s built-in error catchall assists developers in preventing website crashes. Even without adding new code, programmers may report failures with a simple ‘try/catch’ statement. Developers may even modify error handling in Koa.js by simply altering the default configuration.</p><p><strong>Generators</strong></p><p>As previously stated, Koa.js makes advantage of the generators standard from ECMAScript 2015. Generators simplify synchronous programming while also facilitating control flow both upstream and downstream. Developers may also utilize generators as functions to pause and resume code execution while maintaining the same stack. As a result, users may simply increase the speed of a web application by executing script in a customized sequence.</p><p><strong>Small Footprint</strong></p><p>Koa.js is a Node.js framework that is lightweight and adaptable. As a result, it takes up less space than competing Node.js frameworks. Many developers use Koa.js to design smaller and better middleware while developing server-side apps. They may, however, adapt the framework to meet the needs of different projects by plugging in a variety of modules.</p><p><strong>Router Module</strong></p><p>Scripts, pictures, HTML pages, and other website resources are often provided over many routes by most web frameworks. However, Koa.js’ core module does not support routes. To establish several routes for diverse website resources, web developers must utilize the Koa-router module. They may simply execute a command to install the Koa-router module. The module also allows developers to design both static and dynamic routes.</p><p><strong>HTTP Methods</strong></p><p>Through HTTP methods like GET, POST, PUT, and DELETE, Koa.js recognizes and understands the action requested by a client. As a result, developers must verify that each client request contains the right HTTP method. A request to obtain data, for example, must include the GET method, but a request to accept encapsulated material must use the POST method.</p><p><strong>Request Object</strong></p><p>Koa.js makes use of a request object built on top of Node.js’ default request object. However, the framework’s request object speeds up HTTP server development by providing a variety of extra features. The object may also be used to obtain the header, path, method, and URL aspects of a request.</p><p><strong>Response Object</strong></p><p>Koa.js’ response object is based on the vanilla response object supplied by Node.js. However, like the Koa request object, the Koa response object has a lot of extra features. The object may also be used to retrieve crucial response attributes such as the header, body, message, and status.</p><h3><strong>Context</strong></h3><p>Koa.js allows developers to encapsulate the vanilla response and request objects into a single object using Context, in addition to augmenting the vanilla response and request objects supplied by Node.js. The unified object makes it easier for developers to create web apps and APIs by providing a variety of useful methods and accessors. JavaScript developers may also establish a context for each request and refer to that context as the middleware’s receiver.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4225cc53314f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is REST ?]]></title>
            <link>https://pamuduratnayake.medium.com/what-is-rest-49256da5704b?source=rss-5b811d0700e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/49256da5704b</guid>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[rest]]></category>
            <dc:creator><![CDATA[Pamudu Manjitha Ratnayake]]></dc:creator>
            <pubDate>Sun, 15 May 2022 17:13:48 GMT</pubDate>
            <atom:updated>2022-05-15T17:13:48.794Z</atom:updated>
            <content:encoded><![CDATA[<h3>What is REST ?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/938/1*ZM82raTAQrw1KUkHiwErqw.png" /></figure><h3>REpresentational State Transfer</h3><p>REST, or REpresentational State Transfer, is an architectural approach for establishing standards amongst web-based computer systems, allowing them to interact more easily. REST-compliant systems, often known as RESTful systems, are distinguished by their statelessness and separation of client and server concerns. We’ll explain what these phrases signify and why they’re important traits for web services.</p><h4>Client and server separation</h4><p>The client and server implementations under the REST architectural style can be done independently of one another, with neither knowing about the other. This implies that the client’s code can be modified at any moment without impacting the server’s operation, and the server’s code may be changed without affecting the client’s operation. They may be maintained modular and independent as long as one side knows what type of communications to deliver to the other. We increase the flexibility of the interface across platforms and improve scalability by separating the user interface problems from the data storage concerns by simplifying the server components. Furthermore, the separation allows each component to develop independently.</p><p>Different clients hit the same REST endpoints, do the same activities, and receive the same results while utilizing a REST interface.</p><h3>Communication between Client and Server</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T5bPRtIGFog_MNgFy6erfg.png" /></figure><p>Clients submit requests to retrieve or change resources, while servers respond with replies under the REST architecture. Let’s look at the most common methods for making requests and sending answers.</p><p>To obtain or change data on the server, REST needs a client to send a request to the server. A typical request includes the following elements:</p><ul><li>A header that allows the client to pass along information about the request.</li><li>A route to a resource.</li><li>An optional message body containing data.</li><li>An HTTP verb that describes what sort of action to do.</li></ul><p>In a REST system, we employ four core HTTP verbs in requests to communicate with resources:</p><ul><li>GET — retrieval of a single resource (by id) or a set of resources</li><li>POST — create a new resource</li><li>PUT — update a specific resource (by id)</li><li>DELETE — remove a single resource by id</li></ul><h4>Sending Responses</h4><p>When transmitting a data payload to the client, the server must provide a content-type header in the response header. This content-type header field informs the client about the data type being sent in the response body. These content types are MIME Types, much as the ones in the request header’s accept field. The content-type returned by the server should be one of the options supplied by the client in the accept field of the request.</p><p>The server’s responses include status codes that indicate the client whether the operation was successful. You don’t need to know every status code as a developer, but you should be familiar with the most popular ones and how they’re used:</p><ul><li>200 — OK</li><li>201 — CREATED</li><li>204 — NO CONTENT</li><li>400 — BAD REQUEST</li><li>403 — FORBIDDEN</li><li>404 — NOT FOUND</li><li>500 — INTERNAL SERVER ERROR</li></ul><h3>Conclusion</h3><p>We’ve learned about the REpresentational State Transfer (REST), also we’ve learned about the communication between Client and Server. If you’ve used REST before, this was very straightforward. If you’ve never used REST before, you may go over the article again to have a better understanding of it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=49256da5704b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Rebase vs Git Merge]]></title>
            <link>https://pamuduratnayake.medium.com/git-rebase-vs-git-merge-7d3cb34b6941?source=rss-5b811d0700e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d3cb34b6941</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[git-rebase]]></category>
            <category><![CDATA[git-merge]]></category>
            <dc:creator><![CDATA[Pamudu Manjitha Ratnayake]]></dc:creator>
            <pubDate>Thu, 17 Mar 2022 12:07:24 GMT</pubDate>
            <atom:updated>2022-03-17T12:07:24.793Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mEKjvz13IPS6EMdu0IpYqA.jpeg" /></figure><p>In Git there are two ways to integrate changes between two branches. Git Rebase and Git Merge are those two ways.</p><h4>What is Git Rebase?</h4><p>When we use git rebase, it re-writes the changes of one branch onto another branch without creating a new commit. But Rebasing is not recommended if the feature branch that you’re obtaining updates from is shared with your other team members in your development team, as the rebasing procedure will result in inconsistent repositories. Rebasing makes a lot of sense for people.</p><p>Rebasing is a superior way to simplify a complicated history since it allows you to update the commit history interactively. Unwanted commits may be removed, two or more commits can be merged into one, and the commit statement can be edited. Rebase will show you conflicts one commit at a time, whereas merge will show you all of them at once. It is better and much easier to resolve conflicts, but keep in mind that undoing a rebase is considerably more difficult than reverting a merge if there are several conflicts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m1XjK-nNUxFg-T0_C-PDog.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I_c4YYIUGLWz11Co1NwIIA.png" /></figure><h4>What is Git Merge?</h4><p>When you run git merge, your HEAD branch will generate a new commit, preserving the ancestry of each commit history. Git merge works well when you never change git history in feature branches. It’s simpler to cooperate on branches when you don’t require a golden rule telling you what you shouldn’t do. You’ll never need to do the force push upstream, for example, because you’ll never overwrite someone else’s changes.</p><p>This is critical if one of the team mate of your development team make any changes to your feature branch without consulting you beforehand. Whether or if this is beneficial is entirely dependent on how you interact. You can review just the changes that have occurred since the initial review and subsequent changes. That is not feasible in a process that rewrites commits. An advantage of merging is, the commits on the source branch are separated from other branch commits. This can be useful if you want to take the feature and <a href="https://kolosek.com/git-merge/">merge</a> it into another branch later.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*6ru-sB5tnJq4v94lCZARgg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vo_1F2lkDPo-AHu5EwEgIA.png" /></figure><h4>Which one is better?</h4><p>When your development team uses a feature based workflow or is not familiar with rebase, <strong>then git merge</strong> is the right choice for you.</p><p>On the other side, <strong>git rebase</strong> may be the best option if you like a clean, linear history. You’ll save time by avoiding redundant commits and keeping changes more centralised and linear.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d3cb34b6941" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript or TypeScript.]]></title>
            <link>https://pamuduratnayake.medium.com/javascript-or-typescript-30d3e38c4225?source=rss-5b811d0700e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/30d3e38c4225</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[javascript-vs-typescript]]></category>
            <category><![CDATA[scripting-language]]></category>
            <category><![CDATA[programming-languages]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Pamudu Manjitha Ratnayake]]></dc:creator>
            <pubDate>Sat, 26 Feb 2022 06:07:26 GMT</pubDate>
            <atom:updated>2022-02-26T06:07:26.145Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uyO8jUSmEltsap9gqmqpTA.jpeg" /></figure><h3><strong>What does mean by Scripting Language?</strong></h3><p>Scripting language is a set of commands that has the ability to execute without being compiling. That means Scripting Language has the ability to perform different actions with in a particular run-time environment. Mainly they are used in web development, games, creating plugins and system administration. Scripting languages are interpreted languages. (Interpreted languages run through a program line by line and execute each command, without requiring them previously to have been compiled into a machine language program). Scripting languages are supported by almost every platform, they don’t need any special kind of software to run them. Mostly scripting languages are open-source languages.</p><p>Two main types of scripting languages,</p><p>Client-side scripting languages: Client-side scripting languages run off the browser. That mean on the client end. Examples are HTML, CSS, JavaScript, jQuery.</p><p>Server-side scripting languages : Server-side scripting languages run on a web server and they are used to create dynamic web pages. When a client sends a request, the server responds via HTTP. Examples are PHP, Python, Node.js, Pearl, Ruby.</p><h3>What does mean by Programming Language?</h3><p>Programming Languages are mainly used to interact with computers and mostly used to build mobile apps, websites and also desktop apps. Programming languages are usually consist of two components. They are syntax and semantics. Programming Languages can be categorized in to three parts. They are,</p><p>Machine Languages: This is a low-level language that computers can understand easily.</p><p>Assembly Languages: This is also a kind of low-level language created for specific processors.</p><p>High-Level languages: This is used to create user-friendly software and websites. High-level languages can be further divided in to three and they are, Procedural-oriented programming languages, Object-oriented programming languages, Natural Language.</p><p>.</p><h4>So all programming languages are scripting languages?</h4><p>The answer is, No! All scripting languages are programming languages but all programming languages are not scripting languages.</p><h3>Which one is better? JavaScript or TypeScript</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*5IlTSjyZRKu6RfyN3ObxVQ.jpeg" /></figure><h4>JavaScript</h4><p>JavaScript is a scripting language that helps to create interactive and dynamic web pages. JavaScript is highly characterized by its dynamic typing and just-in-time (JIT) compiler. JavaScript follows a client-side implementation and its a multi-paradigm language. JavaScript is compatible with all kind of browsers. JavaScript does not need to compile, errors can only be found during run-time. JavaScript has dynamic typing.</p><p>Now a days JavaScript standing out as a server-side technology mainly due the development and the popularity of Node.js.</p><h4>TypeScript</h4><p>TypeScript is an object oriented programming language and it is not a scripting language. JavaScript can manage lots of code lines but it was not be able to developed to handle very extensive and complex applications. Because of that, Microsoft introduced TypeScript and it is a superset of JavaScript created for handle the larger applications by being strongly typed and by including compile-time error controls. TypeScript has a compile-time error feature that mean it compiles the code and check for compilation errors that may be found in the syntax. TypeScript enables both static and dynamic typing.</p><h3>Conclusion</h3><p>We’ve learned the difference between JavaScript and TypeScript and also we’ve learned, what are scripting languages and what are programming languages. In my opinion, TypeScript is easy to maintain, great for code organization and enhances project productivity.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30d3e38c4225" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>