I'll be back here in a few months after I've taken a deeper dive into vanilla JS, I bet. Sub'd. ;)
@bugbytes39233 жыл бұрын
Awesome, good luck with vanilla JS ;) and thank you!
@keenwire81663 жыл бұрын
Thanks for exploring an API use case (and for building up to it in the previous video). I am wondering, however, at which point do you feel a need to make fetch requests as opposed to going over 'the wire' with HTMX? Btw. nice genre selection, the more punk the merrier 😜
@bugbytes39233 жыл бұрын
Thank you for commenting! And glad to find some other punk fans :) It's a good question. This will depend on a few factors, such as: 1. How many users are using your application? The more that are using it, the more you might want to shift things client-side 2. How good is your server? The better the specs, the more requests/processing it can handle 3. How big is your database? (Optimizing your queries and using indexes can help here) For small apps, HTMX on its own should be fine almost always, I think. But Alpine offers some nice benefits on top of moving work to the client, so it really depends on the use case I think. Hopefully, I will explore this further in future videos.
@qvistyboy Жыл бұрын
Great video series. Thanks :). One question though. If django-ninja serializes the data and returns a json-object - do you still need the double await and the .json() ?
@esma3el55513 жыл бұрын
is ninja similar to flask marshmallow? , and the video is great btw👍
@bugbytes39233 жыл бұрын
Thanks! And yeah, the schema concept in django-ninja is very similar to Marshmallow schemas - with both, you can specify the fields you want to return in your response. django-ninja is more fully-featured though, as you can define API routes - it is very similar to FastAPI, but build on top of Django!