<?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 Ovindi Jayawardana on Medium]]></title>
        <description><![CDATA[Stories by Ovindi Jayawardana on Medium]]></description>
        <link>https://medium.com/@ovindijayawardana?source=rss-1f24611fec67------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*InV6c9MJuA1UTXsTRRCIMA.jpeg</url>
            <title>Stories by Ovindi Jayawardana on Medium</title>
            <link>https://medium.com/@ovindijayawardana?source=rss-1f24611fec67------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 08:46:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ovindijayawardana/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[AF Final Project]]></title>
            <link>https://medium.com/@ovindijayawardana/af-final-project-db9cebe6977f?source=rss-1f24611fec67------2</link>
            <guid isPermaLink="false">https://medium.com/p/db9cebe6977f</guid>
            <dc:creator><![CDATA[Ovindi Jayawardana]]></dc:creator>
            <pubDate>Sun, 24 May 2020 18:22:41 GMT</pubDate>
            <atom:updated>2020-05-24T18:22:41.365Z</atom:updated>
            <content:encoded><![CDATA[<p>Final Project GIT repository : <a href="https://github.com/tdwic/store_managemt_system">https://github.com/tdwic/store_managemt_system</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=db9cebe6977f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to ReactJS]]></title>
            <link>https://medium.com/@ovindijayawardana/introduction-to-reactjs-a5dfdd95822b?source=rss-1f24611fec67------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5dfdd95822b</guid>
            <category><![CDATA[reactjs]]></category>
            <dc:creator><![CDATA[Ovindi Jayawardana]]></dc:creator>
            <pubDate>Fri, 03 Apr 2020 17:27:11 GMT</pubDate>
            <atom:updated>2020-04-03T17:27:11.384Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V7UIIU0G4pK15vtd8vSgiQ.jpeg" /></figure><p>React is a JavaScript library created by Facebook and is used for building user interfaces and front-end applications. React is also often called as a framework due to its behavior and capabilities. It’s also the most popular front-end framework in the industry right now.</p><h3><strong>Why use React?</strong></h3><ul><li>Makes front-end JavaScript much easier.</li><li>Uses self contained, independent components with their own state.</li><li>Much more interactive UI’s.</li><li>Virtual DOM- Allows us to only update whats needed except for reloading the entire page.</li><li>Uses JSX- Easily incorporate JS in markup.</li><li>Easy to work with teams.</li></ul><h3><strong>What are React Components?</strong></h3><p>React components are considered as the building blocks of the UI. Each component exists within the same space but is executed independently from one another. A component contains its own structure, methods as well as APIs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*dn28hd7gB_r96qwfJoycpQ.png" /></figure><p>As indicated above the entire UI is considered as a tree. Here, the starting component becomes the root component and each of the independent units become branches, which can be further divided into sub branches.</p><p><strong>Anatomy of a Class Component</strong></p><pre>import React from &#39;react&#39;;<br>import ReactDOM from &#39;react-dom&#39;;<br> <br>class MyComponent extends React.Component{<br>    render(){<br>        return(       <br>              &lt;div&gt;           <br>                &lt;h1&gt;Hello&lt;/h1&gt;<br>                &lt;h1&gt;This is a Component&lt;/h1&gt;<br>              &lt;/div&gt;<br>        );<br>    }<br>}<br>ReactDOM.render(<br>    &lt;MyComponent/&gt;, document.getElementById(&#39;content&#39;)<br>);</pre><p>The component has to include the extends React.Component statement so that it creates an inheritance to React.component, which grants your component to access its functions. it also requires a render() methods which returns the HTML code.</p><p>you could also use the above component within another component.</p><pre>import MyComponent from &#39;./MyComponent&#39;;</pre><p>There are two ways that components receive data:</p><p><strong>1.Props</strong></p><p>Props are known as properties. React props are like function arguments in JavaScript and attributes in HTML. It can be also used to pass data from one component to another. Also, if your component has a constructor function, props should be always passed to the constructor and also to the React.Component via super() method.</p><p><strong>2. State</strong></p><p>In React, component properties should be kept in an object called state. It determines how the component will behave and render. The state can be accessed using this reference; <strong>e.g this.state. </strong>Similarly to change the value in the state object <strong>this.setState</strong> method can be used.</p><h3><strong>What’s the difference between State &amp; Props?</strong></h3><ul><li>Props are immutable which State is mutable; State of a component can be changed using this.setState().</li><li>State can only be used in Class Components, Props have no such limitation.</li><li>Props are set through the parent component which State is generally updated through event handlers.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5dfdd95822b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why is Node.js Promising For 2020?]]></title>
            <link>https://medium.com/@ovindijayawardana/why-is-node-js-promising-for-2020-2c1d0eef6bb3?source=rss-1f24611fec67------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c1d0eef6bb3</guid>
            <category><![CDATA[nodejs]]></category>
            <dc:creator><![CDATA[Ovindi Jayawardana]]></dc:creator>
            <pubDate>Sat, 07 Mar 2020 06:44:52 GMT</pubDate>
            <atom:updated>2020-03-07T06:44:52.201Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6VOPdwNCoiU-KoNOvdTwCg.png" /></figure><p>Node.js is an open-source, cross-platform, JavaScript runtime environment that includes everything you need to execute a program. It’s a combination of libraries, helpers, and various tools that help you to create and operate enhanced and great web applications.</p><p>Every Node.js web framework provides developers with a top-notch performance through its excellent architecture. It comprises of many frameworks that will dominate the web development field in 2020 depending on speed, ease of use, complexity and community support.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*5cRgLTkZlOMB6VMkCOORPQ.jpeg" /></figure><h4><strong>1. Serverless and Hardware free</strong></h4><p>Serverless computing was 2019’s most talked-about buzzword, at least in the development space. Most web applications run on high maintenance servers, however Node.js consists of a highly advantageous feature which eliminates factors like hardware and server maintenance from performance deciding factors.</p><p>Ability to throw a function and make two services talk to each other is basically what makes serverless platform so important. Now it’s not necessary to establish a server to integrate two different services. Overall it has immensely improved upon project quality, reduces costs and enhanced the efficiency.</p><h4><strong>2. Microservices</strong></h4><p>Microservices are a software design pattern which breaks the entire system into smaller, independent and functional units. This concept is used by many world famous organizations including<em> Uber, eBay, Netflix</em> and etc. Hassle free development of complex applications along with well structured apps with improved performance and scalability could be easily implemented using the microservice architecture.</p><h4>3. Scalability</h4><p>Another key feature of Node.js is that its easy to scale applications in horizontal as well as vertical directions. applications can be scaled in a horizontal manner by the addition of additional nodes to the existing system. It also offers you the option of adding extra resources to single nodes during vertical scaling. Another benefit of it is that only the part of the affected code needs to be changed rather than changing the entire code structure.</p><h4><strong>4. GraphQL</strong></h4><p>GraphQL is a query language created by Facebook which provides a common interface between the client and the server for data fetching. Including GraphQL in an application enables the use of sources of multiple data in an efficient and effective manner. Overall it simplifies the workflow to a great extent on multiple platforms.</p><h4><strong>5.Real Time Applications</strong></h4><p>Real-time applications(RTA) is an application program that functions within a specific time frame that the user senses as immediate or current. RTA’s are widely used regularly. Such applications require a strong processing at the backend. As Node.js is event-driven, tackling of I/O bound tasks are extremely good, data transfer between the client and server is quick since Node.js enables writing JavaScript on both client and server side.</p><h4>6.Cloud Solutions</h4><p>Everything from building a new cloud application from scratch to scaling the existing cloud apps, Node.js can be deployed to improve efficiency and performance. Its serverless structure is one of the main reasons behind its better capabilities.</p><p>Node.js has been constantly growing with time and environment and the language has been delivering a great platform to its clients based on the desired requirements. The framework has fuelled the digital transformation in numerous ways and has helped many organizations leverage the advantage of the technology.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c1d0eef6bb3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s new in JavaScript ES10 (ES2019)?]]></title>
            <link>https://medium.com/@ovindijayawardana/whats-new-in-javascript-es10-es2019-cc1ccf8ade73?source=rss-1f24611fec67------2</link>
            <guid isPermaLink="false">https://medium.com/p/cc1ccf8ade73</guid>
            <category><![CDATA[es-2019]]></category>
            <category><![CDATA[es10]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Ovindi Jayawardana]]></dc:creator>
            <pubDate>Tue, 03 Mar 2020 15:40:34 GMT</pubDate>
            <atom:updated>2020-03-03T15:40:34.871Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KjfKmBjfSxT5C7DLbZTW7A.png" /></figure><p>ES which stands for ECMAScript is a standardized specification of a scripting language. Initially it was named as Mocha and finally as JavaScript. So far there are ten editions published.</p><p>The new features of ES10 includes flat(), flatMap(), object.fromEntries(), trimStart(), optional catch binding and many more. In this post, we will take a look at these new features and see how they upgrade the language.</p><h3>1. flat() and flatMap()</h3><p>The flat() method flattens the array by a given depth. The default flat level is 1. The flat(Infinity) method flattens the array to the last depth of the array.</p><pre>const Numbers = [12,3,3,[33,3,4,55,[34,6,7,9,0]]];<br>console.log(Numbers.flat()); // Default flat level is 1<br>// output : [12, 3, 3, 33, 3, 4, 55, Array(5)]<br>console.log(Numbers.flat(Infinity));<br>// output : [12, 3, 3, 33, 3, 4, 55, 34, 6, 7, 9, 0]</pre><p>The flatMap() method first maps each element using a mapping function and then, flattens the result into a new array.</p><pre>const Numbers = [1,2,3,4,5,6];<br>const alphaNumber = [&#39;one&#39;, &#39;two&#39;, &#39;three&#39;, &#39;four&#39;, &#39;five&#39;, &#39;six&#39;];<br>const mappedAndFlattenedExample = Numbers.flatMap((number, index) =&gt; [<br>  number,<br>  alphaNumber[index]<br>]);<br>console.log(mappedAndFlattenedExample);<br>// output : [1, &#39;one&#39;, 2, &#39;two&#39;, 3, &#39;three&#39;, 4, &#39;four&#39;, 5, &#39;five&#39;, 6, &#39;six&#39;]</pre><h3>2. trimStart() and trimEnd()</h3><p>The trimStart() / trimLeft() methods removes whitespaces from the beginning of the string.</p><pre>const greeting = &#39;   Hello world!   &#39;;</pre><pre>console.log(greeting);<br>//output: &quot;   Hello world!   &quot;;</pre><pre>console.log(greeting.trimStart());<br>//output: &quot;Hello world!   &quot;;</pre><p>The trimEnd() / trimRight() methods remove whitespaces from the end of the string.</p><pre>const greeting = &#39;   Hello world!   &#39;;</pre><pre>console.log(greeting);<br>//output: &quot;   Hello world!   &quot;;</pre><pre>console.log(greeting.trimEnd());<br>//output: &quot;   Hello world!&quot;;</pre><h3>3. Object.fromEntries()</h3><p>The Object.fromEntries() method transforms a list of key-value pairs into an object.</p><pre>const entries = new Map([<br>  [&#39;foo&#39;, &#39;bar&#39;],<br>  [&#39;baz&#39;, 42]<br>]);</pre><pre>const obj = Object.fromEntries(entries);</pre><pre>console.log(obj);<br>//output: Object { foo: &quot;bar&quot;, baz: 42 }</pre><h3>4. Optional Catch Binding</h3><p>One of the new features they came up with is the ability to not to bind the error parameter within the catch close.</p><pre>try {<br>      throw &quot;Error not bothered about&quot;;<br>    } catch {<br>      // logic..<br>    }</pre><h3>5. Description property for Symbol objects</h3><p>When creating symbols, now you can add a description to it for debugging purposes. It’ll return a string containing the description of the symbol.</p><pre>let sym = Symbol(&#39;foo&#39;);<br>console.log(sym.description);    <br>//output: foo<br><br>sym = Symbol();<br>console.log(sym.description);    <br>//output: undefined<br><br>// create a global symbol<br>sym = Symbol.for(&#39;bar&#39;);<br>console.log(sym.description);    <br>//output: bar</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cc1ccf8ade73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding S.O.L.I.D Principles]]></title>
            <link>https://medium.com/@ovindijayawardana/understanding-s-o-l-i-d-principles-86de8ee9f7a5?source=rss-1f24611fec67------2</link>
            <guid isPermaLink="false">https://medium.com/p/86de8ee9f7a5</guid>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[solid-principles]]></category>
            <dc:creator><![CDATA[Ovindi Jayawardana]]></dc:creator>
            <pubDate>Sat, 29 Feb 2020 04:18:04 GMT</pubDate>
            <atom:updated>2020-02-29T04:18:04.095Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ow1pTI8oZR6Dnh4R" /><figcaption>Photo by <a href="https://unsplash.com/@clemhlrdt?utm_source=medium&amp;utm_medium=referral">Clément H</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>SOLID</strong> is an acronym based upon 5 design principles which was introduced by Robert C. Martin in order to make software designs more understandable, easier to maintain and easier to extend.</p><h3>S- Single responsibility principle</h3><pre><em>A class should have one, and only one, reason to change.</em></pre><p>A blender consists of toggle buttons to basically quicken the blending process . Each time it directly affects the primary goal of the blender, to emulsify food. emulsifying food ingredients is the only thing it does, it will not make you coffee too!</p><p>One class should serve only one purpose. i.e all methods and properties of a class should all work towards the same goal.</p><h3>O- Open-closed principle</h3><pre>`<em>Entities should be open for extension, but closed for modification.</em></pre><p>A holiday package offers a variety of services together such as travel arrangements, stay, food etc. Open for extension means the travel company could add additional items to your package. For example they could throw in a complimentary vehicle for your holiday, however they cannot remove the main services offered to you.</p><p>Software entities (classes, functions, etc) should be extendable without actually changing the contents of the class that’s been extended.</p><h3><strong>L- Liskov substitution principle</strong></h3><pre><em>Objects of a superclass shall be replaceable with objects of its subclasses.</em></pre><p>Taxi apps offers their service based on options starting from a mini to a luxury sedan. The company must send a car that fits your requirements. The requirement of the most basic option is to get you a car that takes you from point A to B. Any car, whether standard, VIP fulfills that requirement. i.e other options inherit and extend from the standard option.</p><h3>I- Interface segregation principle</h3><pre><em>A client should not be forced to implement an interface that it doesn&#39;t use.</em></pre><p>Instead of throwing all kinds of garbage away without any kind of segregation, waste can be separated into different dustbins based on different categories of waste such as wet and dry which should be disposed separately.</p><p>Simply, this rule states that we should break our interfaces into smaller ones, so they satisfy the exact needs of the client .</p><h3>D- Dependency inversion principle</h3><pre><em>High level modules should not depend on low level modules. Both should depend on abstractions.</em></pre><p>A computer consists of several ports for each external device, I cannot attach a keyboard to a printer port and vice versa. The same problems occurs with other devices as well. Therefore its like a tight coupling, where I cannot change the external device on the given interface. However, using a USB port any device could be easily attached to the machine to perform the required task.</p><p>There should not be tight coupling among software components and to avoid such coupling, the components should depend on abstractions i.e a contract (interface / abstract class).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=86de8ee9f7a5" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>