<?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: Alireza Naseri</title>
    <description>The latest articles on DEV Community by Alireza Naseri (@alireza_naseri_481e266dae).</description>
    <link>https://dev.to/alireza_naseri_481e266dae</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%2F3604121%2F70096743-bfd4-4c2f-a101-3c4b9baad16d.png</url>
      <title>DEV Community: Alireza Naseri</title>
      <link>https://dev.to/alireza_naseri_481e266dae</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/alireza_naseri_481e266dae"/>
    <language>en</language>
    <item>
      <title>Node.js Core: Event Loop &amp; Native Power</title>
      <dc:creator>Alireza Naseri</dc:creator>
      <pubDate>Fri, 27 Feb 2026 08:41:12 +0000</pubDate>
      <link>https://dev.to/alireza_naseri_481e266dae/nodejs-core-event-loop-native-power-493e</link>
      <guid>https://dev.to/alireza_naseri_481e266dae/nodejs-core-event-loop-native-power-493e</guid>
      <description>&lt;p&gt;Title: Beyond the Hype: How Node.js Actually Handles Concurrency (Event Loop + libuv)&lt;/p&gt;

&lt;p&gt;Post (Markdown):&lt;/p&gt;

&lt;p&gt;Node.js is often described as “single‑threaded”, but that’s only true for JavaScript execution. The real concurrency story is asynchronous I/O + native code.&lt;/p&gt;

&lt;p&gt;1) The Event Loop is an orchestrator&lt;br&gt;
When you start an I/O task (filesystem, networking, DNS), Node.js delegates the heavy lifting to the operating system and/or libuv. Meanwhile, the JS thread stays free to keep the app responsive.&lt;/p&gt;

&lt;p&gt;2) Why native (C/C++) matters&lt;br&gt;
JavaScript can’t directly access low‑level OS primitives. Node relies on native bindings to bridge:&lt;/p&gt;

&lt;p&gt;JS → C/C++ (libuv, V8 internals) → OS → back to JS&lt;/p&gt;

&lt;p&gt;3) The thread pool is for “can’t block the loop” work&lt;br&gt;
Some tasks are too expensive to run on the JS thread (CPU‑heavy or certain blocking operations). Node offloads these into libuv’s thread pool (configurable via UV_THREADPOOL_SIZE) to avoid freezing the event loop.&lt;/p&gt;

&lt;p&gt;Key takeaway:&lt;/p&gt;

&lt;p&gt;Single JS thread ≠ low performance. It means one thread for JS, plus native concurrency under the hood.&lt;/p&gt;

&lt;p&gt;Hashtags: #nodejs #backend #javascript #performance #systems&lt;/p&gt;

&lt;p&gt;Image (Concept Card):&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv17metf2tubwtyb1oim8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv17metf2tubwtyb1oim8.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>javascript</category>
      <category>node</category>
      <category>performance</category>
    </item>
    <item>
      <title>How Moving to MVC Changed the Way I Write Express Apps</title>
      <dc:creator>Alireza Naseri</dc:creator>
      <pubDate>Wed, 25 Feb 2026 10:01:49 +0000</pubDate>
      <link>https://dev.to/alireza_naseri_481e266dae/how-moving-to-mvc-changed-the-way-i-write-express-apps-3bdj</link>
      <guid>https://dev.to/alireza_naseri_481e266dae/how-moving-to-mvc-changed-the-way-i-write-express-apps-3bdj</guid>
      <description>&lt;p&gt;When I first started learning Node.js, everything lived inside a single file.&lt;/p&gt;

&lt;p&gt;Routes, business logic, and responses were tightly coupled — and it worked… until it didn’t.&lt;/p&gt;

&lt;p&gt;At some point, my Express apps became hard to read, harder to test, and almost impossible to scale.&lt;/p&gt;

&lt;p&gt;That’s when I truly understood why structure matters more than speed at the beginning.&lt;/p&gt;

&lt;p&gt;Node.js is single‑threaded, but its event‑driven, non‑blocking nature is what makes it powerful.&lt;/p&gt;

&lt;p&gt;Express makes HTTP handling simple — but MVC is what makes applications maintainable.&lt;/p&gt;

&lt;p&gt;Why MVC actually helped me&lt;br&gt;
MVC isn’t about adding layers for the sake of complexity.&lt;/p&gt;

&lt;p&gt;Controllers handle request/response logic&lt;br&gt;
Models represent data (not just databases)&lt;br&gt;
Views render the output&lt;br&gt;
A model can be a database, a file, or even an external API.&lt;/p&gt;

&lt;p&gt;Once I separated these concerns, my code became:&lt;/p&gt;

&lt;p&gt;Easier to reason about&lt;br&gt;
Easier to test&lt;br&gt;
Easier to extend without fear&lt;br&gt;
A simple controller example&lt;/p&gt;

&lt;p&gt;js&lt;/p&gt;

&lt;p&gt;exports.getProducts = (req, res) =&amp;gt; {&lt;br&gt;
  Product.fetchAll(products =&amp;gt; {&lt;br&gt;
    res.render('shop', { products });&lt;br&gt;
  });&lt;br&gt;
};&lt;br&gt;
Clean architecture isn’t about writing more code.&lt;/p&gt;

&lt;p&gt;It’s about writing code that survives growth.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>backend</category>
      <category>javascript</category>
      <category>node</category>
    </item>
  </channel>
</rss>
