<?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: Pazu</title>
    <description>The latest articles on DEV Community by Pazu (@pazu).</description>
    <link>https://dev.to/pazu</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%2F1118221%2F603387aa-76f3-4a61-8e5a-7b48db713229.png</url>
      <title>DEV Community: Pazu</title>
      <link>https://dev.to/pazu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pazu"/>
    <language>en</language>
    <item>
      <title>🖼️I made an image viewer for locally AI-generated images by Easy Diffusion</title>
      <dc:creator>Pazu</dc:creator>
      <pubDate>Wed, 04 Oct 2023 15:21:51 +0000</pubDate>
      <link>https://dev.to/pazu/i-made-an-image-viewer-for-locally-ai-generated-images-by-easy-diffusion-1b6o</link>
      <guid>https://dev.to/pazu/i-made-an-image-viewer-for-locally-ai-generated-images-by-easy-diffusion-1b6o</guid>
      <description>&lt;p&gt;&lt;a href="https://easydiffusion.github.io/"&gt;Easy Diffusion&lt;/a&gt; is a web UI for using Stable Diffusion models and generate image locally using your CPU or GPU.&lt;/p&gt;

&lt;p&gt;You can save your images locally with its metadata. But they are stored inside many folders and it's hard to browse them.&lt;/p&gt;

&lt;p&gt;I made a node.js server + Svelte UI to browse all your images with a search bar searching for specific keywords in the prompt.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code here
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/MarioVieilledent/EasyDiffusion_Image_Browser"&gt;Github repo&lt;/a&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Put the repo inside your Easy Diffusion image destination folder&lt;/li&gt;
&lt;li&gt;Simply click the bat file (Windows) and server should serve images&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;More details in readme file. Thx for reading. ✅&lt;/p&gt;

</description>
      <category>stablediffusion</category>
      <category>easydiffusion</category>
      <category>node</category>
      <category>svelte</category>
    </item>
    <item>
      <title>Which JS Framework is the smallest?</title>
      <dc:creator>Pazu</dc:creator>
      <pubDate>Thu, 13 Jul 2023 10:09:20 +0000</pubDate>
      <link>https://dev.to/pazu/which-js-framework-is-the-smallest-161p</link>
      <guid>https://dev.to/pazu/which-js-framework-is-the-smallest-161p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Which JS Framework build the smallest minified JS bundle? And which one has the smallest development folder?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Probably the most complete study about benchmarking JS Front-end Frameworks is the &lt;a href="https://krausest.github.io/js-framework-benchmark/2022/table_chrome_104_windows.html"&gt;Benchmark by Krausest&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cyqBbbxz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wnf6bfynhnkehsxe8qdo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cyqBbbxz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wnf6bfynhnkehsxe8qdo.png" alt="Benchmark by Krausest" width="685" height="812"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This study focuses on the time execution, CPU performances, lighthouse metrics as well as memory allocation.&lt;/p&gt;

&lt;p&gt;But There's no indication about those criteria:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The syntax quality for developers&lt;/li&gt;
&lt;li&gt;The size of the development folder (all node modules included)&lt;/li&gt;
&lt;li&gt;The size of the built webapp and distributed to browsers&lt;/li&gt;
&lt;li&gt;The size of the JS minified bundle in the built app&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It is to rank most known Front-ent JS Frameworks that I build the &lt;strong&gt;exact same app&lt;/strong&gt; with several frameworks and compared them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frameworks tested
&lt;/h2&gt;

&lt;p&gt;As I already know Angular, React and Svelte, I was able to also try modern frameworks, that are often simple to get started because they are often very similar to react : components are functions returning JSX elements (tsx in my case, I only used TypeScript).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://react.dev/"&gt;React&lt;/a&gt; &lt;em&gt;Tested with &lt;code&gt;create-react-app&lt;/code&gt; and &lt;code&gt;vite&lt;/code&gt;&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://angular.io/"&gt;Angular&lt;/a&gt; &lt;em&gt;Introduce good practices such as OOP, TS, testing&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://vuejs.org/"&gt;Vue.js&lt;/a&gt; &lt;em&gt;With composition API&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://svelte.dev/"&gt;Svelte&lt;/a&gt; &lt;em&gt;With vite, cleanest and simplest syntax in my opinion&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.solidjs.com/"&gt;Solid JS&lt;/a&gt; &lt;em&gt;Very promising for the future&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://qwik.builder.io/"&gt;Qwik&lt;/a&gt; &lt;em&gt;Behave differently from others because of resumability&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://preactjs.com/"&gt;Preact&lt;/a&gt; &lt;em&gt;Excellent alternative to React&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://vanilla-js.com/"&gt;Vanilla&lt;/a&gt; &lt;em&gt;Remains the smallest, but exponentially hard syntax&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  App built
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--II-ez9bE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3qs96fy8b33aen6swfs2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--II-ez9bE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3qs96fy8b33aen6swfs2.png" alt="App look" width="639" height="310"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I built a simple SPA app in all of the frameworks, the app:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Displays a constant name of the app as well as a SVG logo&lt;/li&gt;
&lt;li&gt;Has an incrementing reactive variable&lt;/li&gt;
&lt;li&gt;Has a text input pushing its content into an array when focused is lost or when enter is pressed.&lt;/li&gt;
&lt;li&gt;Displays the the content of the list, where each element calls another component (called MessageComponent and displaying the message and the date time of it's creation)&lt;/li&gt;
&lt;li&gt;Save into localhost the list content&lt;/li&gt;
&lt;li&gt;Has a button to empty the list&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;All the apps works similar and has the same CSS parts.&lt;/p&gt;

&lt;p&gt;All the apps use a main component that call in a for loop the message component.&lt;/p&gt;

&lt;h2&gt;
  
  
  GitHub repository
&lt;/h2&gt;

&lt;p&gt;You can find more information about the project as well as the source code of all apps in &lt;a href="https://github.com/MarioVieilledent/js-framework-comparison"&gt;this repo&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Results
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Size of minified JS bundle in KB
&lt;/h3&gt;

&lt;p&gt;Here I compare the size of the minified JS bundle (built by &lt;code&gt;npm run build&lt;/code&gt;, or &lt;code&gt;ng build --configuration=production&lt;/code&gt;, etc.).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Lower is better&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--o6dG0Lfc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0sbezm0yiel8x97ihmnv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--o6dG0Lfc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0sbezm0yiel8x97ihmnv.png" alt="Size of JS bundles" width="619" height="855"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we can observe that React has the largest bundle size, exceeding half a megabyte of JavaScript code. Although this may seem relatively small, it is important to consider that each time the page is refreshed, the entire bundle needs to be transmitted over the network and interpreted by the browser. Therefore, we aim to make the JS bundle as lightweight as possible.&lt;/p&gt;

&lt;p&gt;The React app built with Vite is nearly four times smaller, around 140 KB, and is comparable to Angular. However, both of these apps still have a significant size.&lt;/p&gt;

&lt;p&gt;Next, we have Qwik and Vue, which are approximately 50 KB in size, even smaller than the previous frameworks. In this comparison between the three major frameworks, Vue emerges as the winner. It is worth noting that Qwik differs from other frameworks because it utilizes resumability, which means that only a small portion of the JS bundle is loaded and interpreted by the browser when necessary.&lt;/p&gt;

&lt;p&gt;Now, let's talk about the winners: Preact, Solid.js, and Svelte. These frameworks have incredibly small JS bundles, measuring at 13.7 KB, 10 KB, and 6.7 KB respectively. This is significantly smaller compared to the other frameworks! Both Preact and Solid serve as excellent alternatives to React, as they employ similar (or very close) syntax. In my opinion, Svelte is the best among them all due to its clean, easy-to-understand, and expressive syntax.&lt;/p&gt;

&lt;p&gt;Lastly, it's important to mention that there is no "minified JS bundle" in Vanilla JS since it does not involve any specific framework. Even with minimal DOM manipulation, a Vanilla JS file can still reach a size of 1.1 KB (which is not far off from the Svelte JS bundle...).&lt;/p&gt;

&lt;h3&gt;
  
  
  Size of development folder in MB
&lt;/h3&gt;

&lt;p&gt;In this second part, I take a look at the total size of the development folder including all the node modules dependencies.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Lower is better&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Txdx4tGD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cpavtxfei8w7tjzt64gg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Txdx4tGD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cpavtxfei8w7tjzt64gg.png" alt="Size of dev folder" width="576" height="486"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The heaviest framework for the development phase is &lt;code&gt;Angular&lt;/code&gt;, climbing up to almost half a giga byte of data. That's pretty huge considering the app builded is a simple page with a reactive button and a reactive list.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;React&lt;/code&gt; and &lt;code&gt;Qwik&lt;/code&gt; are smaller, respectively 293 and 169 MB.&lt;/p&gt;

&lt;p&gt;Then comes all the other frameworks that are close to each other, around 100 MB.&lt;/p&gt;

&lt;p&gt;Of course &lt;code&gt;Vanilla JS&lt;/code&gt; doesn't require any dependency, because there's no difference between the development and the production code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Expressiveness
&lt;/h2&gt;

&lt;p&gt;In my opinion:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;Svelte&lt;/code&gt; and &lt;code&gt;Vue&lt;/code&gt; (using Components API) wins the battle, they provides the &lt;strong&gt;simplest and most declarative syntax&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;Angular&lt;/code&gt; has also a nice declarative syntax on top of a great organisation of components. Though, it can result in a lot of src files to handle. And is a bit hard to start with.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;React&lt;/code&gt;, &lt;code&gt;Qwik&lt;/code&gt; and &lt;code&gt;Solid&lt;/code&gt; components return JSX that contains JavaScript expressions, this focus on more and smaller reusable components (especially compared to the heavy &lt;code&gt;Angular&lt;/code&gt; components), but have the drawback to mix HTML and JS code together, so it can be confusing, and the MVC is hard to achieve.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In any case, vanilla JS is to be avoided for any kind of projects.&lt;/p&gt;




&lt;p&gt;Thank you for reading, I would love to hear your thoughts on this project :)&lt;/p&gt;

</description>
      <category>frontend</category>
      <category>javascript</category>
      <category>typescript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>📈 More Statistics 📉 for Stack Overflow 2023 survey</title>
      <dc:creator>Pazu</dc:creator>
      <pubDate>Wed, 12 Jul 2023 11:30:49 +0000</pubDate>
      <link>https://dev.to/pazu/better-statistics-for-stack-overflow-2023-survey-2o3h</link>
      <guid>https://dev.to/pazu/better-statistics-for-stack-overflow-2023-survey-2o3h</guid>
      <description>&lt;p&gt;So recently, I gathered data from the &lt;em&gt;2023 developer survey of Stack Overflow&lt;/em&gt;, and I decided to create an account here to share my project.&lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://survey.stackoverflow.co/2023/#technology-admired-and-desired"&gt;survey's results&lt;/a&gt;, on the Desired/Admired part, technologies are sorted by "Desired" only, it's not possible to sort them by "Admired". Also, it would be interesting to rank and compare them with the average between "Desired" and "Admired", as well as the width between the two dots.&lt;/p&gt;

&lt;p&gt;It's for these reasons I build a simple display based on the data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mariovieilledent.github.io/"&gt;Browse results&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/MarioVieilledent/stackoverflow-better-stats"&gt;Github repo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>stackoverflow</category>
      <category>statistics</category>
      <category>svelte</category>
    </item>
  </channel>
</rss>
