Django and Alpine.js - Serializing data with django-ninja

  Рет қаралды 2,724

BugBytes

BugBytes

Күн бұрын

Пікірлер: 9
@nicenaija9952
@nicenaija9952 3 жыл бұрын
Banner changed, I see. Loving the contents.
@bugbytes3923
@bugbytes3923 3 жыл бұрын
Yeah, changin' it up! And thank you!
@SuperBilroi
@SuperBilroi 3 жыл бұрын
I'll be back here in a few months after I've taken a deeper dive into vanilla JS, I bet. Sub'd. ;)
@bugbytes3923
@bugbytes3923 3 жыл бұрын
Awesome, good luck with vanilla JS ;) and thank you!
@keenwire8166
@keenwire8166 3 жыл бұрын
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 😜
@bugbytes3923
@bugbytes3923 3 жыл бұрын
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
@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() ?
@esma3el5551
@esma3el5551 3 жыл бұрын
is ninja similar to flask marshmallow? , and the video is great btw👍
@bugbytes3923
@bugbytes3923 3 жыл бұрын
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!
Django, HTMX and Alpine.js - Building an Accordion component
20:19
DjangoCon 2022 | Introducing Django Ninja
20:47
DjangoCon Europe
Рет қаралды 3,7 М.
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
Hilarious FAKE TONGUE Prank by WEDNESDAY😏🖤
0:39
La La Life Shorts
Рет қаралды 44 МЛН
Django, HTMX and Alpine.js - Modals and Forms
23:07
BugBytes
Рет қаралды 14 М.
Caching with Redis and Django!
20:05
BugBytes
Рет қаралды 3 М.
The State of HTMX (2024)
15:36
HAMY LABS
Рет қаралды 10 М.
Django & Redis - Vary Headers to Control Caching Behavior
12:37
Django-Ninja APIs - Modern API Development in Django
43:40
BugBytes
Рет қаралды 24 М.
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН