<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kasun Dananjaya</title>
    <description>The latest articles on DEV Community by Kasun Dananjaya (@kasunicts48).</description>
    <link>https://dev.to/kasunicts48</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F706806%2Fe55417d9-6149-443d-9810-e450e917a246.png</url>
      <title>DEV Community: Kasun Dananjaya</title>
      <link>https://dev.to/kasunicts48</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kasunicts48"/>
    <language>en</language>
    <item>
      <title>Understanding Redux : Fundamentals of Redux State Management</title>
      <dc:creator>Kasun Dananjaya</dc:creator>
      <pubDate>Mon, 17 Jul 2023 10:38:00 +0000</pubDate>
      <link>https://dev.to/kasunicts48/understanding-redux-fundamentals-of-redux-state-management-1f29</link>
      <guid>https://dev.to/kasunicts48/understanding-redux-fundamentals-of-redux-state-management-1f29</guid>
      <description>&lt;p&gt;Imagine you're building a big LEGO structure with many different pieces. You want to make sure that all the pieces fit together and that it's easy to keep track of them. That's where Redux comes in!&lt;/p&gt;

&lt;p&gt;Redux is like a special box that helps you organize and manage all the pieces of your LEGO structure. It keeps everything in order and makes it easier for you to work with.&lt;/p&gt;

&lt;p&gt;In computer programming, Redux is a tool that helps developers manage the data (or state) of an application. It's like a central storage space where all the important information about the application is kept.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Here's how it works:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffwlba2dv008ld72aw4hl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffwlba2dv008ld72aw4hl.jpg" alt="Image description" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;State:&lt;/strong&gt; Imagine the state as the current snapshot or the status of your LEGO structure. It represents all the important information about your application, like the number of LEGO pieces, their colors, and how they fit together.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Actions:&lt;/strong&gt; Actions are like special instructions that tell Redux what changes you want to make to the state. For example, if you want to add more pieces to your LEGO structure or change the color of a piece, you can create actions to describe these changes.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Reducers:&lt;/strong&gt; Reducers are like little workers inside the Redux box. They take the current state and the actions you created, and they figure out how to update the state properly. They follow your instructions and make sure everything is in order.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Store:&lt;/strong&gt; The store is like the big box where Redux keeps the state and all the updates. It's the central place that holds all the important information about your application.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By using Redux, developers can keep their applications organized, manage complex data, and make sure everything works smoothly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F58xo41s68bhdd7pwfq3s.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F58xo41s68bhdd7pwfq3s.jpg" alt="Image description" width="602" height="256"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Redux is like a special box that helps developers manage the data of their applications.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;State represents the current instance or status of the application.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Actions are special instructions that describe changes to the state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Reducers are the workers that follow the instructions and update the state.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The store is like the big box where Redux keeps all the important information.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So, just like using a special box to keep your LEGO pieces organized, Redux helps developers keep their applications organized and manageable. It's a helpful tool that makes programming more efficient and enjoyable!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.buymeacoffee.com/kasun.dev"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wYWufrCi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" width="545" height="153"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>redux</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Why Nest.js better than Express.js</title>
      <dc:creator>Kasun Dananjaya</dc:creator>
      <pubDate>Mon, 10 Jul 2023 07:06:30 +0000</pubDate>
      <link>https://dev.to/kasunicts48/why-nestjs-better-than-expressjs-5bmp</link>
      <guid>https://dev.to/kasunicts48/why-nestjs-better-than-expressjs-5bmp</guid>
      <description>&lt;p&gt;&lt;strong&gt;NestJS is a framework built on top of Express.js and offers several advantages over using Express.js directly. Here are some reasons why NestJS is considered better than Express.js in certain scenarios:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. TypeScript Support:&lt;/strong&gt;&lt;br&gt;
NestJS is designed with TypeScript in mind and provides excellent support for it. TypeScript is a statically typed superset of JavaScript, which helps catch errors at compile-time, enhances code maintainability, and improves developer productivity. While Express.js also supports TypeScript, NestJS embraces it more deeply, providing decorators, dependency injection, and strong typing throughout the framework.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Modular Architecture:&lt;/strong&gt;&lt;br&gt;
NestJS promotes a modular architecture pattern inspired by Angular, allowing developers to organize their code into reusable and easily testable modules. It provides decorators and dependency injection that simplify the creation and management of modules, controllers, and services, making it easier to build scalable and maintainable applications.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Built-in Dependency Injection:&lt;/strong&gt;&lt;br&gt;
NestJS has a built-in dependency injection (DI) system that simplifies managing and injecting dependencies into various components. DI helps decouple and organize the code, making it easier to write unit tests and maintain the application. Express.js does not have a built-in DI system, although it can be integrated with external libraries for achieving dependency injection.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Decorators and Metadata:&lt;/strong&gt;&lt;br&gt;
NestJS leverages decorators and metadata to define routes, middleware, and other application components. This approach enhances the code’s readability and reduces boilerplate code, making it easier to understand and maintain the application. Express.js does not provide built-in decorators, requiring developers to write more explicit code for defining routes and middleware.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Integrated Tooling:&lt;/strong&gt;&lt;br&gt;
NestJS provides a CLI (Command Line Interface) that assists in generating and scaffolding the application code. It simplifies the creation of modules, controllers, services, and other components, saving development time and effort. The built-in tooling helps with code generation, building, testing, and debugging, making the development process more efficient.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;6. Community and Ecosystem:&lt;/strong&gt;&lt;br&gt;
NestJS has a growing and active community that contributes to the framework’s development, provides support, and shares reusable modules and libraries. The ecosystem around NestJS is expanding rapidly, with numerous plugins, middleware, and utilities available for common tasks. This active community and ecosystem make it easier to find solutions, share knowledge, and leverage existing resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;br&gt;
While Express.js is a lightweight and flexible framework that is well-suited for small and simple applications, NestJS offers additional features, abstractions, and tooling that can benefit larger and more complex projects. Ultimately, the choice between NestJS and Express.js depends on the specific requirements and preferences of the project and development team.&lt;/p&gt;

</description>
      <category>nestjs</category>
      <category>typescript</category>
      <category>backend</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
