2024 JS Backend Frameworks Are Getting Weird...

  Рет қаралды 11,959

Ben Davis - Tech

Ben Davis - Tech

Күн бұрын

There is so much to talk about when it comes to modern JavaScript backends. The server is everywhere now, so where do standalone backend frameworks like Hono fit in anymore?
DEMO REPOS
SvelteKit: github.com/bmdavis419/sveltek...
Astro: github.com/bmdavis419/astro-h...
CREDITS
github.com/Rykuno/Sveltekit-B...
github.com/askerdev/astro-ful...
• A Better Way to Write ...
my stuff
discord: / discord
x (twitter): / bmdavis419
insiderviz: www.insiderviz.com
blok: www.theblokapp.com
timestamps
0:00 intro
1:20 wtf is hono
1:50 sveltekit example app
6:00 RPC demo
10:50 astro example app
18:00 app architecture is weird these days
24:00 the reason I even started messing with this stuff

Пікірлер: 72
@deado7282
@deado7282 2 ай бұрын
Its fun watching ben going forward and backward with his tooling and architecture in 3 month intervals.
@deado7282
@deado7282 2 ай бұрын
"Why I Stopped Using Backend Frameworks" just a month old.
@pookiepats
@pookiepats 2 ай бұрын
😂
@kylerjohnson988
@kylerjohnson988 2 ай бұрын
@@deado7282 He does say that for his use case he didn't _need_ a separate back-end and it allowed him to ship those projects faster. The context was that he stopped using back-end frameworks for those use cases. The title is a little click-baity, but dude is a content creator trying to play the algorithm. He's not going back on what he said at all. There's a lot of nuance in this field and context is set by use cases which vary widely.
@deado7282
@deado7282 2 ай бұрын
@@kylerjohnson988 I didn't watch that particular video. But it is a common theme that he adopts a new technology for a project, sees one of it's pitfalls and moves to the next library/language/cloud provider/whatever immediately.
@bmdavis419
@bmdavis419 2 ай бұрын
And you will watch me do it many more times, I am very much just trying to figure this stuff out as much as the next guy and am constantly learning new stuff so yea, you are gonna see me change tech and try new stuff a lot. Right now I'm super hyped about TS and AI, in 6 months I might be all in on Elixir or Go, IDK, the point is I'm just gonna end up talking about whatever I'm building and how I'm feeling about it. The point is not that you have to do things the same way, but rather just put stuff in front of people that they might not have already seen
@guenhyoungpark6197
@guenhyoungpark6197 14 күн бұрын
This is awesome! Look forward to seeing more Hono deep-dive tutorial in production! 👍👍 Thank you
@massy-3961
@massy-3961 2 ай бұрын
Isn’t +server.ts means it will already run on the server? Doesn’t that mean your rpc is just a local one in the first place meaning you could of just made a function and called it with type safety already? Or am I missing something.
@MadeInJack
@MadeInJack 2 ай бұрын
Still learning so I'm not able to reply specifically, but I have the same doubt
@bmdavis419
@bmdavis419 2 ай бұрын
You are correct, I cover this in the back half of the video!
@RikunoFilms
@RikunoFilms 2 ай бұрын
Sveltekit's internal fetch handler behaves a little different. If you have an internal request from a server file, it proxies the request directly to the function handler! According to Svltekit docs - "Internal requests (e.g. for +server.js routes) go directly to the handler function when running on the server, without the overhead of an HTTP call.". Pretty cool!
@samu_ba
@samu_ba 2 ай бұрын
Couple of questions: 1. Why not host Hono directly without sveltekit for you app backend? 2. Regarding RPC stuff, are you aware of telefunc? Been drinving that with sveltekit for some time now. From DX perspective that feels almost perfect. 3. Which advantages do you see Hono has over Elysia, which is very similar but has more advanced auto typing going on.
@bmdavis419
@bmdavis419 2 ай бұрын
1) You can, honestly the only reason I would not for a lot of projects is that they just dont have a huge reason to, the reasons I would give would be it needs a non serverless env, a faster runtime, or something else specical 2) Have not heard of it, will check it out 3) I've never really tried elysia so honestly I need to go check it out!
@s.adnansami5106
@s.adnansami5106 2 ай бұрын
​@@bmdavis419 Doesn't Hono have it's own engine to compile React code or at least JSX?
@kizigamer6895
@kizigamer6895 2 ай бұрын
This video is very great!! Me also had the same issue this client and server thing was hurting my head as me started learning backend with nodejs and express and then i tried ASTRO THIS issue of what is client and what is server what is SSR and what is CSR and which one to choose and when to choose which db to use All these questions of fullstack js i had figure out myself by just testing and deep research Thanks for new info that seperate backend can be linked in ASTRO also but still i have doubts and dont understand the later part of your video why you going with hono in sveltekit app and me still learning so a video on clarifying a bit more would be nice!
@katejeo27
@katejeo27 2 ай бұрын
I start using almost a year ago, but the jwt has issues if u notice it. any fix
@JLarky
@JLarky 2 ай бұрын
BTW, I don't think you need to export everything as get/post/put, Astro has "all"
@bmdavis419
@bmdavis419 2 ай бұрын
Good call, just fixed!
@lThePotatoCrew
@lThePotatoCrew 2 ай бұрын
Yeah, I use this to build a public api endpoint for my shopify remix app :)
@aminediboune
@aminediboune Ай бұрын
can you point me to an example?
@sudityashrivastav
@sudityashrivastav 2 ай бұрын
The most beautiful comments format i ever seen.
@denverjamesduran2750
@denverjamesduran2750 2 ай бұрын
Hi! Sorry just wondering.. doesnt sveltekit already havw backend capabilities? Why and what would be the advantagw of using this hono?
@bmdavis419
@bmdavis419 2 ай бұрын
It does! I talk about this a lot in the back half of the video
@denverjamesduran2750
@denverjamesduran2750 2 ай бұрын
@@bmdavis419 my bad man I thought the sveltekit part is only at the beginning I honestly skipped the video upon seeing astro thinking itd be different thank you so much
@denverjamesduran2750
@denverjamesduran2750 2 ай бұрын
@@bmdavis419 Can I use this sveltekit+hono with Capacitor? Im thinking of using adapter-static (cause capacitor only works on static sites) so that I can still upload it to cloudflare pages.. however, if I use static, 1. Will the mounted hono still run? 2. Will I still be able to use my Cloudflare D1 Database:? 3. On the android APK, can it call the hono routes? (ex. simple todo apk)
@denverjamesduran2750
@denverjamesduran2750 2 ай бұрын
It may be a skill issue but I tried just now, and with no luck, I was not able to make it work. I just thought it would be really cool if I can build webapps that has CRUD that can be converted to Mobile apps directly.. looks like for now, I just need to manually implement things first :) I get errors on building the webapp (your repo) to adapter-static. `307 / -> /todos Error: Cannot prerender pages with actions` but everything must be pre-renderable unless I dont want it included. also the +server.ts has POST and PUT / PATCH which is also not allowed... now I wonder how did you make use of this on your app? unless you did not use capacitor? If you could give some tips that'd be amazing and appreciated :)
@Arphusyu
@Arphusyu 2 ай бұрын
This look like the software design pattern call MVVC : Model View (client) / View Controller (Backend)
@siamekanto
@siamekanto 2 ай бұрын
what's that coding font?
@devyb-cc
@devyb-cc 2 ай бұрын
the fact that the line between backend and frontend core are getting thiner and thiner these days, made me think of js frameworks are php 2.0 with sprinkles.
@bmdavis419
@bmdavis419 2 ай бұрын
I think it does more then PHP did back in the day, but the spirit is the same. I did not really live through PHP (I was in high school) but from what I've seen its a similar idea.
@s.adnansami5106
@s.adnansami5106 2 ай бұрын
Finally someone who made the same mistake as me! (18:30) I was so confused, like why the heck am I calling the Astro API routes from the " - - - " frontmatter if both are run server-side anyway and I can perfectly call my DB and other stuff in the " - - - " frontmatter. I mean, I like seperation of concerns and frameworks not being too opinionated but now it feels kinda whacky. Interesting to think that this is now basically like the PHP days, especially with Laravel since Laravel works on the MVC architecture so it has its own backend but you can run server-side PHP code in your templates just as normal, the same way we do in Astro.js.
@bmdavis419
@bmdavis419 2 ай бұрын
Yea I did kinda realize while making this that yea, things have gotten kinda crazy. I love all the things we can do, but I really am starting to understand the return to HTMX bros more, there is just a LOT of complexity here (for a lot of gain I might add)
@s.adnansami5106
@s.adnansami5106 2 ай бұрын
​@@bmdavis419 My school teacher once said that trends come and go and then return again. The internet is relatively modern, so we are one of the first generations to see this in terms of Webtechnologies. Also, people can only tolerate so much complexity and bloat, which was at the beginning acceptable. A few js scripts like JQuery or npm packages, that was fine. But with all those shiny nice things come hefty node modules. Like why am I being told to use npm, setup tailwind with webpack or whatever and build it for a simple HTML landing page...
@wthf
@wthf 2 ай бұрын
what is the http client that you are using?
@bmdavis419
@bmdavis419 2 ай бұрын
httpie.io/
@engageintellect
@engageintellect 2 ай бұрын
Doesn’t Sveltekit do all of this OTB?
@backupmemories897
@backupmemories897 2 ай бұрын
can you cover mikado-v0.8
@Souljacker7
@Souljacker7 2 ай бұрын
I miss read the thumbnail logo and was WAIT, PEOPLE WENT TOO FAR!
@bmdavis419
@bmdavis419 2 ай бұрын
I think a lot of people did lmao
@Danielo515
@Danielo515 2 ай бұрын
Where the fuck does this run? Hahaha, a question that I find myself doing a lot recently
@coder_one
@coder_one 2 ай бұрын
Hono is nice with JSX and HTMX. No need for Frontend framework, great DX.
@bmdavis419
@bmdavis419 2 ай бұрын
I've seen this, it is quite cool I'll definitely end up trying HTMX soon
@Pollux70
@Pollux70 2 ай бұрын
That's not redundancy. If your backend is going to be read by multiple languages you need byte-level type safety.
@duongphuhiep
@duongphuhiep Ай бұрын
where is your Go/RPC backend?
@asadanik5987
@asadanik5987 2 ай бұрын
I think 😂its getting a lot. We need one stable compiler for JavaScript now. Badly.... who also can support TypeScript out of the box.
@bmdavis419
@bmdavis419 2 ай бұрын
Bun, and yes I agree it is a lot, I kinda did not realize how complex it had really gotten until I sat down and made this video
@asadanik5987
@asadanik5987 2 ай бұрын
@@bmdavis419 🙂yes thats also big thing. People can't making domain on JavaScript/TypeScript technology because of its versatility. I also kind of searching for anything which more domain focused field to be specialised.
@madmaxdev
@madmaxdev 2 ай бұрын
Checkout elysia as well.
@bmdavis419
@bmdavis419 2 ай бұрын
I am!
@naranyala_dev
@naranyala_dev 2 ай бұрын
hono + drizzle
@akibmahmudrime2845
@akibmahmudrime2845 2 ай бұрын
why not elysia?
@a7kerkh
@a7kerkh 2 ай бұрын
because elysia initially was built for bun, in here we using nodejs
@khazixfangirl6087
@khazixfangirl6087 2 ай бұрын
@@a7kerkhWhy not Fastify?
@alexandrep4913
@alexandrep4913 2 ай бұрын
Just keep golang as your backend. Its far more performant than JS and has amazing concurrency abilities to bring that performance to the level that it is competing with low level languages without the development cost and time. Using JS as a backend is just odd.
@enzomiraglio6833
@enzomiraglio6833 2 ай бұрын
Go for adonis for love of god
@pookiepats
@pookiepats 2 ай бұрын
Ever since i went freelance… i realize Javascript is pure money. Nobody can match my bids and turnaround times lol with their old ass Java frameworks ahahahaha
@kasper369
@kasper369 2 ай бұрын
Can you give me advice, I want to do freelacning with javascript but I am blocked by Wordpress.
@pookiepats
@pookiepats 2 ай бұрын
​@@kasper369 sure but not sure what you mean by blocked? My advice generally is to pick an industry you're familiar with, then pick one problem to solve (for example in my case I work with distributors and food manufacturers so MRP is a big challenge - so I am building a modern mobile app that can dynamically react to various factors like commodity pricing spikes, stock levels, sales orders skyrocketing or vendors pushing their lead times). If you have direct contacts (warm leads) to pitch these products to then do so, otherwise I would build 2-3 functional POC's you can use as demonstrations of your talents - then work on a narrative; develop a demo environment and a structured pitch you can call up on command that will fit into 5-7 minutes. As a freelancer, you have to be ready to SHOW what you're capable of and you also have to be able to paint the picture of the problem you solve - it's not impossible to make sales otherwise but having a narrative to show the users HOW and WHY your software benefits them is POWERFUL and a huge benefit of using a dynamic language like Javascript. Most of your competition will focus on the old tired dog and pony shows, you need to come prepared to stand out - so practice those presentations too. As for Wordpress, if you have alot of customers using it currently - if you have familiarity with a more modern framework like Astro for example; then I would start to also build a narrative pitch about the benefits of moving them from a wordpress to an Astro; that way you can simultaneously distance yourself from Wordpress while still being able to benefit from the fact that you have existing customers on Wordpress - they suddenly all become potential prospects. P.S. - Look up security vulnerabilities in Wordpress, there is plenty of information and data on the topic that you can use as ammo to argue in your favor, don't be afraid to lean into your ideas - it is dog eat dog out here. Your competition will say anything to cut you out of the running.
@pookiepats
@pookiepats 2 ай бұрын
oh also there's the obvious, you should have your apps hosted on your own custom domain and have a landing page (marketing page) that displays and explains your software in a concise visually appealing way (google creative tim - they have some awesome starter templates to get you rolling if you feel stuck).
@naga_sg
@naga_sg 2 ай бұрын
not first :/
@ishaanmalhotra3008
@ishaanmalhotra3008 2 ай бұрын
Good, appreciate your honesty. You'll get it next time!
@MarkTheSWE
@MarkTheSWE 2 ай бұрын
At this point javascript it about to be ruby on rails… glad I have been moving away from javascript/typescript
@netro4680
@netro4680 2 ай бұрын
no hono bro
@Adanjakub
@Adanjakub 2 ай бұрын
Seems gimmicky
@TheHeadOfHell
@TheHeadOfHell 2 ай бұрын
yet another js framework
@DeveloperMan_
@DeveloperMan_ Ай бұрын
bro grow out of your svelte phase, i did grow out of it back to react
I DONT USE NEXT JS
54:01
ThePrimeTime
Рет қаралды 311 М.
5 Things I Wish I Knew When I Started Using SvelteKit
7:27
Ben Davis - Tech
Рет қаралды 7 М.
Can You Draw The PERFECT Circle?
00:57
Stokes Twins
Рет қаралды 88 МЛН
小路飞姐姐居然让路飞小路飞都消失了#海贼王  #路飞
00:47
路飞与唐舞桐
Рет қаралды 92 МЛН
How I prepare to meet the brothers Mbappé.. 🙈 @KylianMbappe
00:17
Celine Dept
Рет қаралды 44 МЛН
DO NOT USE BUN (bun install is good dough)
17:54
strager
Рет қаралды 138 М.
How I would learn & master it if I were to start over again
29:47
I Stopped Using Express.js: Because Bun and Hono 🔥
10:23
Sam Meech-Ward
Рет қаралды 99 М.
Oh, Auth Doesn't Have to Suck?
7:16
Josh tried coding
Рет қаралды 50 М.
I earn $1,753/day with this SIMPLE tech stack
6:59
Marc Lou
Рет қаралды 314 М.
We need to talk about this benchmark
42:25
Theo - t3․gg
Рет қаралды 63 М.
40 APIs Every Developer Should Use (in 12 minutes)
12:23
Coding with Lewis
Рет қаралды 256 М.
10 common mistakes with the Next.js App Router
20:37
Vercel
Рет қаралды 172 М.
10 Design Patterns Explained in 10 Minutes
11:04
Fireship
Рет қаралды 2,1 МЛН
Как я сделал домашний кинотеатр
0:41
RICARDO
Рет қаралды 1,5 МЛН
Добавления ключа в домофон ДомРу
0:18
iPhone 15 Pro vs Samsung s24🤣 #shorts
0:10
Tech Tonics
Рет қаралды 7 МЛН
Power up all cell phones.
0:17
JL FUNNY SHORTS
Рет қаралды 47 МЛН
iPhone green Line Issue #iphone #greenlineissue #greenline #trending
0:10
Rk Electronics Servicing Center
Рет қаралды 4,9 МЛН