Start Reinventing the Wheel, Maybe Your Wheel will be better than a Rocket!
Published: 2022-10-05 15:36:55

When I started writing my own framework, a lot of people started questioning me, why should anyone use mine over a popular framework like Nextjs, which is backed by a lot of tech giants and even backed by Vercel, compared to my framework only being worked on by me?
Since I couldn't answer them that time since my project was relatively new, It's time to show how reinventing the wheel makes my version of wheel much better than the good-ol' wheel we used to know and use...

## Ditched NPM, Started Using URL Imports
This might still be a controversial topic on why "you shouldn't use URL Imports!" as seen on my previous blogs:tm: (pun intended), let me first answer those people who question that why should you trust a CDN like esm.sh over npm? In the end, we don't bundle node modules folder with the project, and so our server **DOES** have to download them over their side from npm registry. So if you can't trust a project like esm.sh or esm.run or any other alternatives, you shouldn't really trust npm registry? I have heard people saying that if you depend on third party CDNs, they might send harmful js to your server and execute them... But won't NPM registry server do the same too? (unless someone reports its hacked, npm would be serving a dangerous package without anyone noticing...)

If we don't spend much time thinking over this security, (and if you really think that much, consider selfhosting esm.sh or your own server for your needs...) let me show you how much storage I saved by converting a Nextjs project to My Framework [Ree.js](https://ree.js.org), and it used URL Imports to achieve such less storage!

![Nextjs Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h1f5oil1n2xsszr7te8u.png)
> Nextjs Project Size


![Reejs Project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rfzxygp5jx36q7q0e06u.png)
> Reejs Project Size

Please note: Reejs doesn't "builds" anything like Nextjs and others does. Consider Reejs to be a framework like Deno's Fresh, that runs on Nodejs and on Deno (and Bun once **their** bugs are fixed). Not to mention, Reejs' REEST Server has a lot better performance than Fresh's server.

Consider Reading my blog on my REEST Server:
{% embed https://dev.to/renhiyama/ree-imagine-the-reest-server-for-reejs-1abe %}

And to top it off, Reejs maintains a lot better performance than Nextjs.
Let me show you some Lighthouse Stats!


![Nextjs Site](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dmqp74y16wutd6w0zh1b.png)

Not to mention the Network Tab goes brrr:

![Nextjs Network Tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yl61al33pkxaemw9it86.png)

---


![Reejs Site](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pcvkg5mlmio8mc87ww9v.png)

And the Network Tab is simply just too good to be true!


![Reejs Network Tab](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2mmwg2kgjqqmaqsqrnbw.png)

---

Oh and wait, Nextjs' production builds take a lot of time to build, and that's not the case with Reejs. Not to mention the download time for a Nextjs project (including others too) suffers a HUGE bottleneck thanks to NPM.

---

So I think I did reinvent the wheel, and its better, right? It probably won't be the best code, but its definitely better and faster than other frameworks!

Anyways, I would be soon adding "Resumability" feature from QwikJS framework to Reejs, let's hope it ree-ally becomes a ree-ality!
You might wanna consider adding a star to our Reejs repo:

{% embed https://github.com/rovelstars/reejs %}

Don't forget to hit a like, and bookmark this! Comment down below if you got any questions!

Btw I got motivated to write this blog, thanks to @whitep4nth3r 's post:

{% embed https://dev.to/whitep4nth3r/i-changed-my-mind-about-writing-new-javascript-frameworks-h4m %}

Ree-inventing the wheel sometimes really makes a better wheel!

Have an epik Day! 😎