Okay so here's the plan. I will try to create a new javascript backend framework (most probably not because I'm just trying to rewrite pre-existing...
For further actions, you may consider blocking this person and/or reporting abuse
Why not write this in TS?
That's something I'm going to do in future. But for now I'm writing it in plain js because I'm just trying to make it work for now, If you will check the second part of the ramen series, I've mentioned that I'm just trying to get a brief idea of how to make it work. And after doing that I'll create a new typescript branch where I'll be writing it again from the ground up and with better code structure.
This is my fear with all javascript frameworks...it gets built poorly first, then made better later...but then it never gets made better and then tons of users use it lol
Learn Typescript. In the enterprise world basically the it's not a neat toy world, everything in done in TS. As @arindoneatk stated retrofitting is a really bad idea. Wish you the best and look forward to seeing your hard work. If you have Typescript questions just ask. Ppl are nicer than you think and we're all suckers for something cool!
Yes sure I really appreciate the community and everyone, If you'll checkout the latest development on Ramen I have added TypeScript as a future plan + it's on high priority right now :)
Ghana is right. You can also right it in typescript for type safety. It can go a long way for you. But do what you feel is right.
Good job! Playing with some stuff like this helps to understand many things behind the scene. I confirm that because I created restfun for the same idea.
To parse query parameters from URL, you can use URLSearchParams or node:querystring. I used URLSearchParams first, then realized that
querystring
is much faster.Anyway, there utils give you
req.query
in express without manually parsing url string. You may need them to parse form data too.Form can be submitted with 'application/x-www-form-urlencoded' or 'application/json' type. If that's 'application/json' you can use JSON.parse as you do. But when that's 'application/x-www-form-urlencoded', you must handle submitted data as url query string.
For
req.params
, you can use URLPattern polyfill because it has not been implemented in Node.js yet. It can help to handle router and find the matched ones.I've used this polyfill at first and it worked as well, but the performance is not good (just similar to express). So I replaced it with find-my-way to get better performance (x7 faster than express). You can also refer regexparam and @funjs/route-parser.
There are several algorithms for router matching we can investigate when possible. But among the nodejs frameworks, the uWebSockets.js based ones are still the fastest.
All the best
This is inspiring, keep it up
Keep going ! Good luck !
This is encouraging. Great idea!
Hey thanks a lot jeff :D
I hope someday that I could do something like this.
cool but frameworks being born everyday sucks on dev ends, which we all guilt of and yet also victims, anyway, it's very courageous to take on such a big task whole heartedly, I hope you will make it, am struggling to document my CSS framework, anyone interested in building a CSS framework?
Great
This is quite cool!
Building a framework is not an easy feat - I've tried myself. I'm glad you found enough motivation to start on such a big project! Looking forward to seeing your work!
I appreciate the fact that you have very good understanding of how computers and browsers interact.
Nice 🌺.
Go Ahead Bro 💪
That's a great one bro!! Ramen on the move. The name is ... 😂
That's a good one bro.
Great idea for a project to learn from and extend your skills. Looking forward to watching this develop in 2023.
Thanks Gil appreciate it :)