<?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 Kanishka Jayarathna on Medium]]></title>
        <description><![CDATA[Stories by Kanishka Jayarathna on Medium]]></description>
        <link>https://medium.com/@gathumina?source=rss-8b396e2344ba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5batLZFDmPgGeal7VnB6KQ.jpeg</url>
            <title>Stories by Kanishka Jayarathna on Medium</title>
            <link>https://medium.com/@gathumina?source=rss-8b396e2344ba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:47:52 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gathumina/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[My Experience and learnings from a MERN stack group Project]]></title>
            <link>https://medium.com/@gathumina/my-experience-and-learnings-from-a-mern-stack-group-project-11d799017e50?source=rss-8b396e2344ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/11d799017e50</guid>
            <dc:creator><![CDATA[Kanishka Jayarathna]]></dc:creator>
            <pubDate>Wed, 09 Aug 2023 09:17:28 GMT</pubDate>
            <atom:updated>2023-08-09T09:17:46.857Z</atom:updated>
            <content:encoded><![CDATA[<p>As an undergraduate in software engineering, we were assigned many group projects according to our curriculum. Recently as a group, we were assigned a project. For this group project we were required to develop a web application using the MERN stack. First, we were instructed to choose one topic out of several topics and we were required to develop our application around that topic. After several discussions, we decided to go with the topic “Government and Citizen Engagement”. We went</p><p>future and we were successful in finding a client for our project too. Requirements gathering was a key part of this project and we did not take it for granted. We had regular meetings with our clients and got to know exactly what they wanted. As I and my team members had prior experience in the development of a MERN application, we had some idea about what to produce.</p><h3>Technology stack used</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*FZtsSywuMonF2XPsnfgcgA.png" /><figcaption>MERN stack logos</figcaption></figure><p>For the technology stack, we were required to use the MERN stack. MERN stack is a popular stack for developing full-stack applications. Here the letters represent each technology used in the stack. First the “M” represents MongoDB. MongoDB is the database used in this stack. Mongo dB alone is a very popular database among developers worldwide. MongoDB is a NoSQL database. MongoDB is schema-less. This means that the structuring of data is not required. Here the data storage is document based. This means a row in a relational table is equal to a document. Each document has its unique object ID.</p><p><a href="https://www.mongodb.com/docs/manual/introduction/">Introduction to MongoDB</a></p><p>The “E” represents Express.JS in the MERN stack. Here we talk about the back end of the web application. Express.js is used to manage the back end of the application. Also, Express.js is a web application framework for Node.js which we will talk about next.</p><p><a href="https://expressjs.com/en/5x/api.html">5.x API</a></p><p>Node.js is a JavaScript runtime environment used for building server-side applications. Similarly, in MERN applications Node.js is used to execute the server-side code.</p><p><a href="https://nodejs.org/en/about">About Node.js® | Node.js</a></p><p>Lastly the” R” stands for React.js. React is an open-source JavaScript library used to create frontend UI elements. This is one of the most popular libraries used to develop the front end.</p><p><a href="https://react.dev/learn">Quick Start - React</a></p><h3>Collaborative nature of the group members</h3><p>One of the most important aspects of working as a group is the collaboration between team members. This helps us level up our skills which are involved in teamwork.</p><p><a href="https://smallbusiness.chron.com/work-effectively-team-environment-57331.html">How to Work Effectively in a Team Environment</a></p><p>For this project, our group consisted of 4 members. In the previous semester, I did one of my projects with these members. I’m proud to say that they are some of my closest friends. It is important for you to keep close contact with your group members. This is essential when things are getting tough and when you need all hands on deck. We made sure that we held daily meetings to keep updated with the progress of the project. While holding these meetings we did several brainstorming sessions so that everyone in the team gets to express their opinion. In a group communication is the key to success so we made sure we have built good communication grounds. For carrying out our group work effectively we used several online collaboration tools. We used Microsoft Teams to do our daily online meetings.</p><p><a href="https://www.microsoft.com/en-us/microsoft-teams/collaboration">Collaboration Tools and Solutions for Business | Teams</a></p><p>Also, we used google drive to store our important documents.</p><p><a href="https://www.makeuseof.com/tag/google-teamwork-tools/">The 8 Best Google Teamwork Tools for Online Collaboration</a></p><p>To carry out our main collaboration of maintaining the code base of our application we used GitHub. The discussion of the use of GitHub will be next.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*Y2furm8gyuCmvSoNGO0wsw.png" /><figcaption>Collaborative tools</figcaption></figure><h3>Use of Git for version Controlling</h3><p>GitHub if one of the most popular colligative tools for developers and many other people in different fields</p><p><a href="https://docs.github.com/en/get-started/quickstart/hello-world">Hello World - GitHub Docs</a></p><p>As developers, this can be considered the most used collaborative tool to develop software solutions. I’m in the development process version controlling is a crucial process. For these four projects, we used GitHub as our VCS (Version controlling system).</p><p><a href="https://www.atlassian.com/git/tutorials/what-is-version-control">What is version control | Atlassian Git Tutorial</a></p><p>First, we had to create a repository in one of our team member’s accounts. So, we went on and created a repository in my account. Then I added the rest of the members as collaborators so they could have access to that repository. GitHub has security features where only the users with access to a specific repository can access that repository and change any codebase in that repository. Also, we created a branch for each member to develop their section of the application. Along the way, we created specific branches to test out new functions when required. After each day we merged out branched to the main branch in the repository. This task is carried out to ensure that the final product is error-free.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*GkDassZqMloK7_zHOlkdoA.png" /><figcaption>GitHub Logo</figcaption></figure><h3>The new skills and knowledge acquired</h3><p>This project was not our first MERN project but we had a lot to learn. As the technologies are evolving day by day as developers we have to keep up with the latest versions of the technologies. One of the major things we learned is Vite.</p><p><a href="https://vitejs.dev/guide/">Getting Started</a></p><p>Vite is the latest build tool to develop the front end. This is very easy to set up and supports many latest dependencies. For this MERN application, we used yarn as our package manager for Node.js.</p><p><a href="https://yarnpkg.com/getting-started">Introduction | Yarn</a></p><p>As for the user experience, it was very fast than the NPM package manager that we used previously. The difference between NPM and yarn is how they handle dependencies.</p><p><a href="https://www.knowledgehut.com/blog/web-development/yarn-vs-npm#which-one-to-choose?%C2%A0">Yarn vs NPM: Which One is Best to Choose?</a></p><p>However, as a developer who has used both package managers, I have learned that yarn is much faster than NPM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*J9HnShlRSwgXev86GO1tSg.png" /><figcaption>yarn logo</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/413/1*z69OLzFUNXc7XAtWOW22Ig.png" /><figcaption>npm logo</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11d799017e50" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Industry best practices for MERN stack]]></title>
            <link>https://medium.com/@gathumina/industry-best-practices-for-mern-stack-736c636f83be?source=rss-8b396e2344ba------2</link>
            <guid isPermaLink="false">https://medium.com/p/736c636f83be</guid>
            <dc:creator><![CDATA[Kanishka Jayarathna]]></dc:creator>
            <pubDate>Tue, 09 May 2023 07:24:48 GMT</pubDate>
            <atom:updated>2023-05-09T07:24:48.290Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="The technologies in MERN stack" src="https://cdn-images-1.medium.com/max/680/1*x3njtIA70j-jxBFwvikBLQ.jpeg" /><figcaption>The Technologies in MERN stack</figcaption></figure><p>MERN stack is a popular open-source web developments framework. This stack is used to develop dynamic web applications. Here, MERN is just an acronym for 4 different technologies which are MongoDB, Express.js, React and Node.js. First of all, MongoDB is document based and non-SQL database. MongoDB is highly scalable and provides flexible database storage options. Express.js is a the open-source web application framework for Node.js in the MERN stack. This provides a set of tools and features for building web applications ad APIs. Features like routing, middleware and templating are provided by Express.js. React is open-source JavaScript library for building user interfaces. This s a technology developed by Facebook. React enables developers to create reusable UI components and manage these components using a unidirectional data flow. Finally, we have Node.js which is an open source, cross-platform JavaScript runtime environment. Node.js is widely used or building server-side web applications, command-line tools and real time applications. Node.js is popular due to its scalability, performance and ease of use. There many industry practices for MERN stack which will help you become a better MERN stack developer.</p><p>Below are several industry best practices for MERN stack. Interviews were held with two industry experts to discuss about industry best practices for MERN stack. Mr. Thushara Thiwanka who is an Associate Software Developer pointed out some important practices that MERN developers must practice. Also Mr. Abhishek Fernando who is a software engineer, showed me industry best practices that he uses as a MERN stack developer. Some of the dialogs that were in the interviews are mentioned with quotations for your reference.</p><h3>1. Using a linter and formatter</h3><p>Maintaining code quality and consistency is important. For this a linter and formatter will help us to achieve code quality and consistency. A linter ensures that your code adheres to a set of coding standards, making it easier to maintain and understand. A formatter automatically formats your code according to a set of rules making it consistent thought out the file making it easier to read. There are many linters and formatter available for developers. “I recommend using tools like ESLint and Prettier to ensure that the code adheres to a consistent style and format.”</p><ul><li><a href="https://www.npmjs.com/package/eslint">eslint</a></li><li><a href="https://www.npmjs.com/package/prettier">prettier</a></li></ul><h3>2. Use of Environment variables</h3><p>Environment variables are variables that are set in the operating system or the server environment and are sued to store configuration or sensitive information that need to be accessed by the application. “It is important to use environment variables for storing sensitive information like API keys, database credentials and passwords. So, I suggest using tools like ‘dotenv’ to load environment variables from a .env file.”</p><p><a href="https://www.npmjs.com/package/dotenv">dotenv</a></p><h3>3. Usage of a consistent folder structure</h3><p>It will be important as developers to improve the maintainability of the code. As we all know organizing things will help us to save time when we need to find something. This is where using a consistent folder structure will help the maintainability of the code. “As a MERN stack developer is use a specific solder structure for MERN stack. There many folder structures that you can adhere to, so that your application maintainable. Below is a common folder structure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/230/1*dfUZxlN-FEsNtixEOH6oLA.png" /><figcaption>A common folder structure used for MERN stack</figcaption></figure><h3>4. Implementation of error handling</h3><p>Implanting error handling is an important aspect in building a reliable application. There are several ways to achieve this as it is best if we practice these methods regularly. Usage of try catch blocks is one methods of implanting error handling. “I often use try catch blocks to catch the errors that my functions produce.” Returning descriptive error messages is also another method of handling errors. This is a more readable form of error message.</p><p><a href="https://www.ibm.com/docs/en/baw/20.x?topic=events-handling-errors-in-processes">Handling errors in processes</a></p><h3>5. Usage of reusable components in React</h3><p>The usage of reusable components is one of the key advantages of using React. This will help you to reduce the number of code lines in the application so that maintainability and scalability can be improved. Creating atomic components, usage of props to customize components, avoiding usage of state reusable components are some of the best practices in the usage of reusable components.</p><p><a href="https://legacy.reactjs.org/docs/components-and-props.html">Components and Props - React</a></p><h3>6. Usage of middleware</h3><p>Usage of middleware is important practice to build a powerful and a scalable application. When it comes to MERN stack applications, middleware refers to functions that are executed in between the request and response objects, allowing you to add additional functionality to the application. Authentication, logging, error handling, compression and caching are some of the common use cases for middleware in MERN stack application.</p><p><a href="https://redux.js.org/understanding/history-and-design/middleware">Middleware | Redux</a></p><h3>7. Usage of proper state management library</h3><p>State management libraries will be helpful when building large scale React applications to improve maintainability and scalability. This will be helpful in managing and updating application state in a consistent and predictable way. Centralized state, predictable state changes, easy debugging and scalability are some benefits of state management library. “I use redux as the state management library in my applications.” Redux, MobX and Recoil are state management libraries provided by React. There are some points that must be taken into consideration when choosing a state management library which are complexity of your application state, the performance requirements and the development team’s familiarity with the libraries.</p><p><a href="https://www.trio.dev/blog/7-top-react-state-management-libraries">7 Top React State Management Libraries</a></p><h3>8. Usage of docker</h3><p>Docker is a platform that enables developers to build, ship and run application containers. Containers provides an isolated environment which simplifies the development, testing and deployment process. Consistent development environment, easy application deployment, scalability, microservices architecture and resting are some of the sue cases of docker.</p><p><a href="https://docs.docker.com/get-started/overview/">Docker overview</a></p><h3>9. Documentation and testing</h3><p>It is a critical aspect of building a high quality MERN stack applications to use documentation and testing. Documenting your code, writing unit tests, usage of integration tests, automated tests and usage of continuous integration and deployment (CI/CD) are some of the best practices for documentation and testing.</p><h3>10. Continuous integration and deployment (CI / CD)</h3><p>Continuous integration and deployment are a software development practice that involves automatic building, testing and deployment. Continuous integration involves in automatic building and testing code changes that are made. Continuous deployment involves automatically deploying the code changes to production as soon as they pass their tests. Faster time to market, improved quality and better collaboration are some of the benefits of CI/CD.</p><p><a href="https://www.infoworld.com/article/3271126/what-is-cicd-continuous-integration-and-continuous-delivery-explained.html">What is CI/CD? Continuous integration and continuous delivery explained</a></p><p>In conclusion the above practices are the best practices for MERN stack but there can be a best practice according to personal preferences. It is crucial to understand and practice these practices to become a better MERN stack developer.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=736c636f83be" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>