REST API Pros and Cons (Explained by Example)

  Рет қаралды 46,517

Hussein Nasser

Hussein Nasser

Күн бұрын

Пікірлер: 64
@talzO9
@talzO9 2 жыл бұрын
That DMV analogy to explain the difference between stateful and stateless was genuinely brilliant. I will carry that one with me throughout my whole career i can tell already... amazing.
@hnasr
@hnasr 4 жыл бұрын
Representations and State transfer 3:00 Rest constraints 12:14 Example: REST API github api 18:18
@ashuterasoft
@ashuterasoft 4 жыл бұрын
Best explanation of rest on the whole web
@ManontheBroadcast
@ManontheBroadcast 5 жыл бұрын
At last, a clear, beginner friendly explanation about REST ... Looking forward for the GraphQL video ...
@hnasr
@hnasr 5 жыл бұрын
Thanks! GraphQL video up! kzbin.info/www/bejne/nIfQgnakhsR4htU
@maanasvohra8133
@maanasvohra8133 3 жыл бұрын
I came across your channel while brushing up on my fundamentals about APIs for my interview. You're amazing!
@engmohamedamin
@engmohamedamin 4 жыл бұрын
Great example to illustrate representational and state transfer I think no one could forget it
@hnasr
@hnasr 4 жыл бұрын
Thanks Mohd! Glad the REST video was helpful 🙏
@engmohamedamin
@engmohamedamin 4 жыл бұрын
Could you share with me yr Twitter account?
@hnasr
@hnasr 4 жыл бұрын
Sure @hnasr its on my website
@jeno427
@jeno427 5 жыл бұрын
I have watched several Udemy courses and none of them made it so clear what REST is than this video. You deserve more views !!
@hnasr
@hnasr 5 жыл бұрын
Jeno thank you so much, glad I could help thats my goal 🥅 as long as you guys benefit that makes me really happy. Funny that I wasn’t sure that I should make this video since there are ton of REST videos out there. Stay awesome!
@talzO9
@talzO9 2 жыл бұрын
@@hnasr you should make videos on EVERYTHIING no matter how many videos there are out there because you have a unique way of teaching which is amazing. keep doing what you do!
@11maxed11
@11maxed11 4 жыл бұрын
Only proper thorough explanation out there. All other explanations are very shallow and cover nothing but the syntax. Awesome!
@aatifnazar8203
@aatifnazar8203 3 жыл бұрын
THE MOST AUTHENTIC VIDEO ABOUT REST I HAVE FOUND SO FAR!!!
@poke_champ
@poke_champ 5 жыл бұрын
Very knowledgeable. Thinking like an engineer in life
@stunning-computer-99
@stunning-computer-99 2 жыл бұрын
Nasser never say sorry when you speak absolute gold
@devashishrana1637
@devashishrana1637 3 жыл бұрын
I am really happy to find your channel. Telling all my friends and colleagues about your channel and telling them "I found a guru", follow him. Thanks for the awesome videos. You are doing an awesome job
@Joshy110
@Joshy110 4 жыл бұрын
So simple explanation of about REST. I have been learning a lot because of your videos.
@hnasr
@hnasr 4 жыл бұрын
Glad you like them Joshy!
@jonasjason
@jonasjason 3 жыл бұрын
That was a really good analogy for the difference between stateful and stateless!
@raffayhussain6717
@raffayhussain6717 2 жыл бұрын
I almost never comment on any video but you really deserve a lot of views, not just for your sake but for people who want to learn in a clear and concise way, it's better for them to find this video than some random convoluted mess.
@rshaikh05
@rshaikh05 3 жыл бұрын
brilliant hussein. keep up the good work. i just started watching your video and i already know that im going to be here for a long time watching many other videos to clear my concepts.
@hnasr
@hnasr 3 жыл бұрын
Thanks Riyaz!
@shikharpathak7667
@shikharpathak7667 3 жыл бұрын
Thanks a lot for such an amazing video. After watching countless videos, I was still not clear what Rest API actually is. Thanks a lot man
@SuperOnlyP
@SuperOnlyP 2 жыл бұрын
- Traditional way ( old way) : to load a website, the client app will download the whole thing. Try to build a website in old way with SQL database ( SQL database is really old - it is really painful to build one ) - kzbin.info/www/bejne/r3LQiZp6gNplndE - REST API : using JSON format file to exchange the data ( when NoSQL appears such as MongoDB, the web developer uses it to build web for prototype quicker than using SQL ) . As he mentions 2 things about REST API : "Representation and State transfer -Representational The resource is a representation or metadata, but the actual backend could be something else and stored differently. An Example, could be a user resource could be represented as a JSON object but it is stored on the backend as relation DBMS tables such as postgres. -State transfer The application server is stateless, and when we want communicate we transfer the current state of with each request. Thus the state transfer. ====================== I think the most confused part is about Stateless : www.interviewbit.com/blog/stateful-vs-stateless/#:~:text=Q.,the%20server%20to%20understand%20it.
@yakob-g
@yakob-g 3 жыл бұрын
this is the quality content I looked for, great video
@nitingupta1591
@nitingupta1591 3 жыл бұрын
Amazing explanation. Some years back all bureaucratic offices everywhere where stateful :-)
@dogigiri
@dogigiri Жыл бұрын
Great explanation with great examples👌 Thanks
@youee1234
@youee1234 5 жыл бұрын
You are a living legend!
@richardwang3438
@richardwang3438 5 жыл бұрын
cannot wait to watch the graphQL video!
@sheikhmuhammedtadeeb5677
@sheikhmuhammedtadeeb5677 2 жыл бұрын
@Hussein I am posting my understanding of API. Is this correct? please confirm API :- Any piece of intermediate code which allows communication(exchange of data) of other two codes without compromising the security of the two codes.
@TeacherKaile
@TeacherKaile 5 жыл бұрын
Can’t wait till the graph QL tutorial
@hnasr
@hnasr 5 жыл бұрын
Thaanks GraphQL video up! kzbin.info/www/bejne/nIfQgnakhsR4htU
@Davieu101
@Davieu101 5 жыл бұрын
Great vid! Hire meeeeeeeeeeeeeeeee! I would love to learn from such an awesome and knowledgeable person!
@tlong900
@tlong900 4 жыл бұрын
Thank you!!! Your videos have helped me so much
@hnasr
@hnasr 4 жыл бұрын
@section9999
@section9999 4 жыл бұрын
Dude another souls fan, awesome! I love those games. Thats why we study back end i think. Something about the challenge or the reward of the hunt or something lile that. Haha
@hnasr
@hnasr 4 жыл бұрын
DataSurgeon 369 fear the old blood 🩸! Great to see a souls fan!
@section9999
@section9999 4 жыл бұрын
@@hnasr We are born of the code, made men by the code, undone by the code. Praise the Solaris!
@justcurious1349
@justcurious1349 3 жыл бұрын
Hey Hussein, thanks a lot for this great video. But I was just wondering if we use session ids instead of jwt for authorization then will it violate the restful constraint?
@hnasr
@hnasr 3 жыл бұрын
Not really, because you will still require to send the session id with every request and your REST application remains stateless because you are querying the DB to check the state of the session
@justcurious1349
@justcurious1349 3 жыл бұрын
@@hnasr thanks Hussein, just watched your jwt authentication video, that cleared everything. You are doing a great job man. Thanks for the help.
@potomskazhu
@potomskazhu 3 жыл бұрын
my man, as good as always
@muhammadawaisalamkhan9265
@muhammadawaisalamkhan9265 4 жыл бұрын
Excellent work !!!
@Oswee
@Oswee 4 жыл бұрын
Would like to know your opinion about single wss endpint. Take an Redux. Basically event sourcing. You can metatag actions, intercept them in the wss middleware and send to the server. Same for incomming messages. Look up for the type and call the reducers. You could even sync message signature with protobufs and TS .ds.ts type declarations. You probably know about grpc-web, its downsides and upsides. With all this http/2 and http/3 udp thing i have a feeling that we eventually will get native RPC in the browsers. Whole world is moving into real-time communication. I'm not talking about chats. Im talking even about blog articles and ERPs, CRMs and what not updating UI/data in realtime incrementally. And so... if i don't care/want to deal with REST API maintanance overhead... wouldnt it be neat to have single wss endpoint? Sure... you need to deal with sticky sessions and what not to keep connection live or all that reconnection thing... but... lowering bandwith and reactive UI/UX outweights those challenges. What do you think?
@hnasr
@hnasr 4 жыл бұрын
Dzintars Klavins a very interesting take I liked the way you are thinking of having secure web sockets as ingress essentially. Not a conventional way for sure. You are right the world is moving in real time bidirectional communication, IETF figured that out a while ago that is why HTTP/2 supports PUSH and streams (for more throughput) and now HTTP/3 natively in QUIC. So I do share your vision that the web will be more “realtime” and we have the technology to enable it. I have to ask though what are your clients that are consuming the wss? If they are just browsers your solution is clean. If they are more than just a browser than you are in a world of hurt, because you need to teach those clients websockets and you are responsible of these client libraries. That is the problem that gRPC trying to solve they solved it elegantly, unfortunately they didn’t bring it to the web. I don’t personally like gRPC-web and waiting for a more native support. Thats my two cents
@Oswee
@Oswee 4 жыл бұрын
@@hnasr Tnx. In my case i have only two kinds of clients. Browsers and native apps. So... im good with browsers, but for native clients i already have a gRPC stubs. So... native clients is the smallest pain. When i started to make some REST API... it's quite easy to do with few grpc plugins... but.. still i somewhat disliked all that implementation, swagger and all that jazz overhead. Writing Sagas for every fetch... nah... Because i had some minimal kafka, ddd, cqrs knowledge... i thought about this idea. I already somewhat implemented it in minimal setup. Still researching, but so far it looks really good to me. Like it a lot. Still its not yet clear how to make something like Swagger to document message signatures for other potential developers or probably external users. Current options is protobufs and TS declarations, but i would like to have something more user friendly.
@songcrazzzy
@songcrazzzy 2 жыл бұрын
Do you have a course or book to recommend on REST?
@Finn-jp6pn
@Finn-jp6pn 4 жыл бұрын
Can some one please explain what Hussein means by 'Cache Invalidation' at 8:42? If we don't store any thing in application memory at the backend, why would we need to invalidate cache? As far as I know, Cache Invalidation means clearing or replacing your cache entries. I'm sorry if this is something really obvious. I'm just starting out on my journey as an engineer. Thank you.
@hnasr
@hnasr 4 жыл бұрын
fen1x_ it means if you did store a temporary cache on the server to avoid hitting the database, you need to invalidate it if the state sent from the client changes, caches are great for fast access but cache invalidation is tricky and causes lots bugs.. Hope that helps 😊
@Finn-jp6pn
@Finn-jp6pn 4 жыл бұрын
@@hnasr Oh...this clears things up. I love your channel. You're an inspiration! Thanks for the quick reply 👍
@axygh
@axygh 5 жыл бұрын
very informative.
@hnasr
@hnasr 5 жыл бұрын
akshay gh thanks! I was hesitant to post this video since there are so many REST videos out there .
@nirvana10111
@nirvana10111 4 жыл бұрын
What do you think about the JSON API Specification jsonapi.org which added ideas of sparse fields and relationships?
@TheOrangePeeler
@TheOrangePeeler 5 жыл бұрын
Awesome Possum
@hnasr
@hnasr 5 жыл бұрын
David Ross someone made it to the end ! Stay awesome 👏
@hamsalekhavenkatesh9664
@hamsalekhavenkatesh9664 3 жыл бұрын
Sorry, I'm digressing...how did u get a GC if u came to USA in 2015 ! :D
@firmanjamal2871
@firmanjamal2871 4 жыл бұрын
Can you make a video about couchbase database?
@hnasr
@hnasr 4 жыл бұрын
Yes! Its on my list 🙏
@firmanjamal2871
@firmanjamal2871 4 жыл бұрын
@@hnasr Thank you!! 🤲🙏
@Ty1er
@Ty1er 2 жыл бұрын
🙏🙏🙏🙏🙏
@sujeetagrahari2292
@sujeetagrahari2292 4 жыл бұрын
I like your tutorials but I have a suggestion you voice goes high, sometimes very high and suddenly drop it to very low. It's really irritating.
@sharukhrahman7925
@sharukhrahman7925 4 жыл бұрын
im sorry but i find difficult to listening to your accent. please change it back to indian.. no offense or pun intended..
Что такое REST на самом деле?
11:32
Merion Academy
Рет қаралды 89 М.
Can You Find Hulk's True Love? Real vs Fake Girlfriend Challenge | Roblox 3D
00:24
Understanding State Transfer in REST (Explained by Example)
13:14
Hussein Nasser
Рет қаралды 21 М.
GraphQL Crash Course
57:24
Hussein Nasser
Рет қаралды 31 М.
Stop Calling Your API a "REST API"
17:42
Amichai Mantinband
Рет қаралды 18 М.
Hypermedia APIs and HATEOAS - Volodymyr Tsukur
54:33
Wix Engineering Tech Talks
Рет қаралды 7 М.
Rest API - Best Practices - Design
15:50
High-Performance Programming
Рет қаралды 113 М.
Proxy vs. Reverse Proxy (Explained by Example)
11:06
Hussein Nasser
Рет қаралды 683 М.
Stateful vs Stateless Applications (Explained by Example)
14:44
Hussein Nasser
Рет қаралды 201 М.
REST API Interview Questions (Advanced Level)
6:19
Exponent
Рет қаралды 73 М.
Load balancing in Layer 4 vs Layer 7 with HAPROXY Examples
37:33
Hussein Nasser
Рет қаралды 165 М.
Microservices Explained and their Pros & Cons
16:40
Hussein Nasser
Рет қаралды 56 М.