<?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: OlshaMB</title>
    <description>The latest articles on DEV Community by OlshaMB (@olshamb).</description>
    <link>https://dev.to/olshamb</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%2F1129371%2Fb3dd6214-935e-4c70-81bd-651b0518eff5.png</url>
      <title>DEV Community: OlshaMB</title>
      <link>https://dev.to/olshamb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/olshamb"/>
    <language>en</language>
    <item>
      <title>The anarchy of web ecosystem</title>
      <dc:creator>OlshaMB</dc:creator>
      <pubDate>Sun, 30 Jul 2023 12:14:20 +0000</pubDate>
      <link>https://dev.to/olshamb/the-anarchy-of-web-ecosystem-1m14</link>
      <guid>https://dev.to/olshamb/the-anarchy-of-web-ecosystem-1m14</guid>
      <description>&lt;h2&gt;
  
  
  The web of anarchy
&lt;/h2&gt;

&lt;p&gt;Current web is really a mess. List of w3c standards is infinitely growing, and the old standards are not going away, we have to support them.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Total number of actual standards is &lt;strong&gt;300+&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What causes the most problems?
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Spoiler: JavaScript
&lt;/h3&gt;

&lt;p&gt;Javascript is the language written for not executing billions of lines of code and not for running the most popular and large apps. It was written as quick scripting lang&lt;/p&gt;

&lt;p&gt;But for me it's not that JS is bad language makes web broken, it's the bundlers, transpilers, runtimes that break JS, they try to fix the ecosystem and they create complexety, like we must now use &lt;code&gt;typescript&lt;/code&gt; to build apps that work and error out when logically needed(like unknown vars), then it converts into ugly bundler code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Node.js
&lt;/h3&gt;

&lt;p&gt;Yea, that thing, the idea of running js in the backend was awful, but ok, we have it, except Node.js bringed us CommonJS, a &lt;strong&gt;very hacky way&lt;/strong&gt; to use external modules.&lt;/p&gt;

&lt;p&gt;But hallelujah, we have imports now, &lt;em&gt;oh stop I forgot about backward compatibility&lt;/em&gt;, yea with introductions of &lt;strong&gt;imports&lt;/strong&gt; &lt;code&gt;requires&lt;/code&gt;  are not going away.&lt;/p&gt;

&lt;h3&gt;
  
  
  Bundlers
&lt;/h3&gt;

&lt;p&gt;The most scary thing in JS. What is broken with them&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Configs(&lt;strong&gt;Any zero config option will eventually go to a config&lt;/strong&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Requires multiple files, &lt;strong&gt;because of different module systems&lt;/strong&gt; and &lt;strong&gt;environments&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Joins everything &lt;strong&gt;into one bundle&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build times&lt;/strong&gt;:
&amp;gt; [!warning] Build times
&amp;gt; Almost all of the bundlers are written in js for node, and really unoptimized.
&amp;gt; But a lot of bundlers are moving in the right way, we will talk about that later
&amp;gt; Each &lt;strong&gt;webpack&lt;/strong&gt; bundle with monaco takes &lt;strong&gt;at least 1 minute to build&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Everything above takes time and resourses, just to setup a new projects.&lt;/p&gt;

&lt;h3&gt;
  
  
  Frameworks
&lt;/h3&gt;

&lt;p&gt;They are confusing for beginners, poping up very quickly and each has a different syntax or strategy.&lt;br&gt;
&lt;strong&gt;Why the popped up?&lt;/strong&gt;&lt;br&gt;
Because the web and JS are imperative and imperative is not right choice for big apps or quality code. For scripting a button it's fine but not for making a hole code editor.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Examples of much better ui langs:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;All of them are declarative, have a nice way to connect ui with logic.&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://slintpad.com/?" rel="noopener noreferrer"&gt;
      slintpad.com
    &lt;/a&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://developer.apple.com/xcode/swiftui/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZPDmdrEU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://developer.apple.com/news/images/og/swiftui-og.png" height="420" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://developer.apple.com/xcode/swiftui/" rel="noopener noreferrer" class="c-link"&gt;
          SwiftUI Overview - Xcode - Apple Developer
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          SwiftUI is an innovative, exceptionally simple way to build user interfaces across all Apple platforms with the power of Swift.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--YGsestYO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://developer.apple.com/favicon.ico" width="64" height="64"&gt;
        developer.apple.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;
&lt;br&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://flutter.dev/development" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--mREIXhhG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://storage.googleapis.com/cms-storage-bucket/70760bf1e88b184bb1bc.png" height="394" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://flutter.dev/development" rel="noopener noreferrer" class="c-link"&gt;
          
      
        
          
        
      
      
        Development
      
    
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          Flutter transforms the app development process so you can ship more, faster. Deploy to six targets from a single codebase.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--HPTiAe6a--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://storage.googleapis.com/cms-storage-bucket/4fd0db61df0567c0f352.png" width="64" height="64"&gt;
        flutter.dev
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  The solution
&lt;/h2&gt;

&lt;p&gt;I can talk about broken all day, but let's get to my point.&lt;/p&gt;

&lt;h3&gt;
  
  
  Surely, the way to fix it, it's to rewrite?
&lt;/h3&gt;

&lt;p&gt;No, the rewrites only make the web more broken, also the full incompatable rewrite is &lt;strong&gt;NOT AN OPTION&lt;/strong&gt;, we need backwards compatability to work with ecosystem&lt;/p&gt;

&lt;h3&gt;
  
  
  Wasm doesn't help
&lt;/h3&gt;

&lt;p&gt;Wasm is a great thing, but it doesn't improve the performace, only performance stability and you will be loading a big binary to platform that doesn't have syscalls and you will need to call js to do anything&lt;br&gt;
I thing if you are making an app in rust and need ssr with dynamic frontend go with it, but for the sake of rust&lt;/p&gt;

&lt;h3&gt;
  
  
  The way we are heading and I hope we will continue heading
&lt;/h3&gt;

&lt;p&gt;Many tools have optimized dev builds and use imports in browser to their advantage, like &lt;strong&gt;vite&lt;/strong&gt;.&lt;br&gt;
The &lt;strong&gt;new tools&lt;/strong&gt; that are made with &lt;strong&gt;static compiled langs&lt;/strong&gt; for web ecosystem are in development like &lt;a href="https://turbo.build/pack"&gt;turbopack&lt;/a&gt;, &lt;a href="https://github.com/dudykr/stc"&gt;stc&lt;/a&gt;, &lt;a href="https://bun.sh/"&gt;bun&lt;/a&gt; and more.&lt;br&gt;
Many more are already here: &lt;a href="https://www.rspack.dev/"&gt;rspack&lt;/a&gt;, &lt;a href="https://deno.land/"&gt;deno&lt;/a&gt;,&lt;a href="https://swc.rs/"&gt;swc&lt;/a&gt;, &lt;a href="https://vitejs.dev/"&gt;vite&lt;/a&gt;,&lt;a href="https://github.com/orogene/orogene"&gt;oregone&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most of my idea is: Tools go faster and simpler&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;br&gt;
You can comment on my mastodon toot or on lemmy or dev.to.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>rust</category>
    </item>
  </channel>
</rss>
