What is an API and how do you design it? 🗒️✅

Поділитися
Вставка
  • Опубліковано 5 січ 2025

КОМЕНТАРІ • 413

  • @TungHoangLaSourisAgile
    @TungHoangLaSourisAgile 2 роки тому +13

    There are only 2 types of explanation for complex Computer Science concepts in this world:
    - The one you had in universities which you don't understand sh*t.
    - The one provided by an Indian engineer on UA-cam that would enlighten you in 15 min.
    Thanks a lot man !

  • @nirupam89
    @nirupam89 5 років тому +534

    @Gaurav, we should not return list as a response to an API, and should return an object instead. that helps when we need to add a new variable in the response. In that case clients won't break.
    Say in your example, in the future, if I wanted to add a new variable like "String resonseStatus" along with List, I can't really do that without making change in clients. But if I already returned an object, I could add any number of new variables to accommodate in the future.

    • @gkcs
      @gkcs  5 років тому +96

      That's a great point, thanks!

    • @KeremSahin1
      @KeremSahin1 5 років тому +51

      I don't totally agree with this approach. Yes, as an API definer, things will get easy for you. However, your consumer should still migrate to the new API version. By returning object as a response, you are saving yourself from changing the contract every time, however you are reducing the clarity of your contract and need to tell a lot in the documentation. I would prefer changing the API contract every time I make a backward incompatible change.

    • @vyshnavramesh9305
      @vyshnavramesh9305 5 років тому

      gud one, but I see Swagger is using list instead.....?

    • @adipratapsinghaps
      @adipratapsinghaps 5 років тому

      You make so much sense

    • @marvelindian1200
      @marvelindian1200 5 років тому +2

      I think there should not be any problem if we are returning JSON object or using GRPC

  • @smithmarta
    @smithmarta 3 роки тому +164

    Atomicity means that operations must complete or fail as a whole unit. In case anyone was wondering.

  • @haciendadad
    @haciendadad 4 роки тому +41

    So happy I found this channel!!!!! This is the next level interview prep material. I was focusing on the main, most important topics to study, more language based questions then I started getting System Level questions and didn't have a good explanation until I started watching these videos. The funny part is that I knew most this stuff, but I just drew a blank when asked. I hope to get through the playlist before my next interview!

    • @gkcs
      @gkcs  4 роки тому +4

      Welcome aboard!

  • @radhikagadve
    @radhikagadve Рік тому +4

    the kind of clarity you have while explaining clears up the mess in my brain.. thanks gs

    • @gkcs
      @gkcs  Рік тому +2

      Happy to help!

  • @harisridhar1668
    @harisridhar1668 3 роки тому +17

    Hi Gaurav - just to clarify the following
    1. APIs can expose only "public" methods ( not protected or private methods )
    2. it is a good idea to minimize payloads sent in request objects via POST ( use GET instead ), and sending the routing information or action information in the JSON request payloads makes for dirty APIs.

  • @nunosantos3621
    @nunosantos3621 10 місяців тому

    The best way to design an API for designers is to start with the foundation. The foundation is where most developers get it wrong, from my experience. Everything starts with the why. A simple yet crucial question that one should ask. The why for doing something, triggers multiple conversations that span the user journey, business objective, data contract, data governance, compatibilities, and lastly the use case. Another really good thing I have noticed with a well-defined API is that it also makes you understand if the procurement of data is truly vital or not, thus, helping in prioritizing API A over B. If this API is only relevant to a very low amount of stakeholders, do I really want to design it? The rest are just bells and whistles.

  • @gerryramosftw
    @gerryramosftw Рік тому +2

    thank you so much!! 4 years later this is still so helpful! im glad i found your videos!

    • @gkcs
      @gkcs  Рік тому

      Thank you!

  • @nasimkaiser8394
    @nasimkaiser8394 5 років тому +8

    Good to see a বাঙালী teaching code 😊👍 subscribed 🤟🏻

  • @budmonk2819
    @budmonk2819 Рік тому

    As a Database Developer, I see similar principles and terminology applies to API design as well. As they say, the more you know, the more things seem the same. Cool video bro.

  • @kaustubhnegi1838
    @kaustubhnegi1838 Рік тому +3

    🎯 Key Takeaways for quick navigation:
    00:28 📝 An API is a documented way for external consumers to interact with your code, specifying parameters, return types, and possible errors.
    01:26 🚫 Misnaming APIs or adding unnecessary parameters can lead to confusion and poor API design.
    03:26 ⚡ Additional parameters in API calls can be acceptable for optimization purposes, especially when performance is a critical concern.
    05:31 🛡️ Design API errors based on common expectations and the responsibilities of your service. Avoid returning generic errors for all cases.
    07:01 🌐 Plan the routing and actions of your API carefully to ensure clarity and prevent ambiguity in the API calls.
    08:30 🔄 Avoid side effects in API calls; keep the actions focused on a single responsibility and ensure atomicity when necessary.
    09:57 📦 Break down large responses using pagination or fragmentation to maintain efficiency and prevent overwhelming the network.
    13:58 ⚙️ Consider data consistency needs; decide if perfect consistency is crucial or if slight delays or cached responses are acceptable for certain use cases.

  • @danielazulay4936
    @danielazulay4936 2 роки тому

    Some of the ideas are covered in "Clean Code" & "Clean Architecture", nice vid!

  • @rohanpandey267
    @rohanpandey267 5 років тому +11

    Wow wow wow, your way of speech delivery is too fluent, I just love that

  • @highmountdigital
    @highmountdigital 4 роки тому +4

    Thanks for explaining the application programmable interface. This content is helpful for understanding the structure of an API. Insightful and thought provoking😊

  • @vs4vijay
    @vs4vijay 5 років тому +159

    I think RESTful APIs should work on Resource (in this case Group). We use certain HTTP verbs (e.g. GET, POST, PUT) to manipulate that resource.
    So the URL of API should be like this:
    GET /api/v1/groups//admins
    Notice the resources are in pluralize form (groups, admins, employees). So if we want to get a details for specific admin, we can just append the adminId as well. (GET /api/v1/groups//admins/)
    Optionally API could expect pagination, limit from URL GET parameters as well... like (?page_no=2&limit=20)
    PS: Also most people use version in the beginning of URL. e.g. /api/v1/.

    • @grunze
      @grunze 5 років тому +10

      Exactly what i was thinking. Use nouns instead of verbs while designing Rest APIs. The actions are already defined by the types.

    • @jakol4u
      @jakol4u 5 років тому +2

      Also field filter reduces the payload in response, that way caller can decide what he needs.

    • @Khangress
      @Khangress 4 роки тому +1

      Saved me from commenting. 2nd that absolutely.

    • @gautamtyagi8846
      @gautamtyagi8846 4 роки тому +1

      ABSOLUTELY WELL SAID! THAT'S WHAT I NOTICED, IT SHOULD HAVE BEEN USED NOUN INSTEAD.

  • @nehascorpion
    @nehascorpion 2 роки тому +3

    Hi Gaurav, you are brilliant at explaining tech stuff. Absolutely love your videos. Really appreciate it! Thanks a ton.

  • @sidharthk.burnwal2044
    @sidharthk.burnwal2044 4 роки тому +3

    Loved the video... I really felt like i was talking to u and u were reading my thoughts as u were clearing all the doubts. Great One 👋👋

  • @bookbanshee
    @bookbanshee 2 роки тому +1

    Thank you for this video, Guarav. Extremely helpful and I love your explanations. This has been a great resource as I prepare for an upcoming systems design interview.

  • @arpita9364
    @arpita9364 Рік тому

    I instantly subscribed you because how confident your voice is

    • @gkcs
      @gkcs  Рік тому +1

      Thank you!

  • @sonalkumar3887
    @sonalkumar3887 5 років тому +10

    Hey gaurav, great seeing your videos, Wish someone taught me during my interview days, I remember some design questions I was asked - URL shortener, Web crawler and proximity servers(Yelp). You should definitely do these, I personally ask a few when I interview :P

    • @gkcs
      @gkcs  5 років тому

      Thank you!

  • @clayman1325
    @clayman1325 2 роки тому +1

    Awesome, I like it very much I appreciated. Wow the hint on fragmentation.

  • @mohanrajsenthilnathan856
    @mohanrajsenthilnathan856 5 років тому +42

    Thanks Gaurav. 6:44 shouldn't it be called as "controller" rather "model" ?

    • @gkcs
      @gkcs  5 років тому +11

      Yeah I might have messed up the terms a bit :/

  • @itsmainakmukherjee
    @itsmainakmukherjee 4 роки тому +1

    Hi Gaurav,
    First of all a big thanks to you sharing these neat and clean, content rich videos.
    It helped me a lot to clear some of the key concepts which I use on day to day basis.
    Finally I wish you all the best and I would say "YOU GOT A NEW SUBSCRIBER"!!!😊👍

  • @HemantKumar-hc4vv
    @HemantKumar-hc4vv 4 роки тому +21

    Great video again. Good to see discussion on consistency here. Couple of comments. If the data is huge and if we are going to use IP fragmentation, then typically it is transparent to the application developer. Also it might have been interesting to get your perspective on handling partial success in the API, say for setAdmins, it set admins for the first 3, the 4 user id does not exist/not member of the group, how does it signal error. Thanks

    • @HemanthHemu
      @HemanthHemu 2 роки тому

      Hi Hemanth, the response can be a complex object, in which there is a list of objects. Each object carrying information about each user. Using this way, we can give information on processing status of d admin.
      {
      AdminsProcessingStatus:
      [
      { ISetASAdmin : true, ActionTaken : ExistingGroupMemberSetAsAdmin/AddedToGroupSndSetAsAdmin
      }
      ]
      }

  • @dhruvesingal9890
    @dhruvesingal9890 2 роки тому +2

    Just a small technical clarification.. the whole URL has components called URI - first part is the server address (mapped to a server somewhere using the IP address and port number), after that comes the individual context resources. Instead of model (the URI that comes after server address), let's say context for the actual resource. The next part(s) are the actual requested resources, which consist the name of the api method, and any parameters if present.

  • @mrsbootsworkouts
    @mrsbootsworkouts Рік тому

    This is what I was looking for! Thank you!

  • @sandeepsampath1985
    @sandeepsampath1985 2 роки тому

    In 39 seconds this boy explains "what is an api" in a way i wish my mentors had done.
    KISS..

  • @arun53413
    @arun53413 3 роки тому

    Nice video, with excellent communication. Keep up the good work. Appreciated !!

  • @sdfg204
    @sdfg204 5 років тому +3

    Hey Gaurav,
    Nice explanation of good practices for API design and I totally agree with the thing nirupam pointed out . I see that many people down in comments of your videos often ask for content that you have previously completed. It is just a suggestion to start adding related videos' links to the description and calling them out through the video. You can also use overlay popups of youtube that other youtubers use extensively. Will just save you some redundancy in questions.
    Thanks

    • @gkcs
      @gkcs  5 років тому +3

      Thanks Avneesh! You are right, I can put them up better.
      They also need to make an effort though. If they can't Google search or read the video description before posting a comment, it's a hopeless cause of them :P

    • @sdfg204
      @sdfg204 5 років тому

      @@gkcs I am with you on that, just a little effort goes a long way for in depth understanding. Also depends a lot on one's curiosity and interest in said topic. But its mainly for your own convenience to reduce your effort of giving them a link everytime such a question arises.

    • @gkcs
      @gkcs  5 років тому +3

      @@sdfg204 True, thanks!

  • @virendrachavan9201
    @virendrachavan9201 5 років тому +1

    Bro you are too good...!!! Keep it up.. Will be waiting for you further videos..

  • @rushikeshdhok8249
    @rushikeshdhok8249 3 роки тому

    Great video. Please keep posting such videos.

  • @anaybaid
    @anaybaid Рік тому

    Really helpful Gaurav! Thanks

  • @sonugupta147
    @sonugupta147 Рік тому

    an API is just a function...wow such a beautiful straightforward definition. I was confused since a week and everywhere they were just saying the things like "it is an interface to connect two software systems", "it is a set of rules and protocols" etc. but no was saying actually explaining it in terms of programming.
    But Gaurav sir, you just helped me to get through its heart as what it actually is at its core. Thank you so much for relieving my week's pain and confusion.
    Since it is a function that only care about "what" that is, it hides the abstractions so I'm assuming that it is an higher level function which calls the specific part/module of the system to get the work done and once the tasks is done, it compose the response (generally as an object) and return it.

    • @adarshxd6274
      @adarshxd6274 9 місяців тому

      api isn't a function but an interface (at least not in java). They're like contracts written for achieving abstraction similar to abstract classes but their purpose is generally for abstracting functions. Read about interfaces to understand.

  • @EduAnmoldeep
    @EduAnmoldeep 4 роки тому +3

    For breaking the record, starting to watch you again, full fledge! :D

    • @gkcs
      @gkcs  4 роки тому

      Welcome back!

  • @WittyGeek
    @WittyGeek 5 років тому +2

    If only there was a button for 100 likes!! I could relate to so many bad APIs written in the past. Now I know. I have been enlightened master! Thank You.

    • @gkcs
      @gkcs  5 років тому

      Cheers!

  • @Justin-dy2sm
    @Justin-dy2sm 4 роки тому +78

    Even the design of this video is excellent -- like it's already at 1.5x Playback speed.

    • @IanRichardArko
      @IanRichardArko 3 роки тому +1

      I went to speed it up, but then I realized that it was already perfect!

  • @sidbhardwaj6605
    @sidbhardwaj6605 3 роки тому

    good stuff gaurav, it was very well explained. the only thing is the speed. I had to bring it down to 0.75x and listen it. If you can adjust the tone fast and slow at times, it will go a long way

  • @ticos.thepsourinthone9150
    @ticos.thepsourinthone9150 4 роки тому

    @Gaurav, I really enjoyed this video and I feel like I learned a lot in short amount of time! Thank you for taking the time to create this valuable content!

    • @gkcs
      @gkcs  4 роки тому

      Thank you 😁

  • @tacowilco7515
    @tacowilco7515 4 роки тому

    Regarding how to solve the 'number of admins' changed, you can subscribe to group chat changes.
    You can subscribe to 'participants changed' event same as 'new message' event and etc. You must not query admins if you have them up-to date all the time.

  • @hanishjadala
    @hanishjadala 5 років тому

    @ 0:55 the possibilities of getting error is only one. You pass group ID and the group does not exist gives 404 record not found error. Group might be deleted and group does not exit is one and the same.

    • @gkcs
      @gkcs  5 років тому

      And 401, you don't have group details access.
      You are making assumptions here. Deleted and does not exist are different unless specified.

  • @igorburilo3937
    @igorburilo3937 2 роки тому

    As always, good explanation!

  • @savvyshah
    @savvyshah 5 років тому +2

    Totally understood the thing with one sentence in the beginning

    • @gkcs
      @gkcs  5 років тому +1

      😁👍

  • @tareqmonwer6494
    @tareqmonwer6494 4 роки тому

    A very effective one.
    Thanks Mr. Gaurav.

  • @ameyapatil1139
    @ameyapatil1139 4 роки тому

    Real value education ! Thanks bro !

  • @EdwinHappy
    @EdwinHappy 5 років тому +5

    This guy is the real MVP!

  • @ianimate121
    @ianimate121 2 роки тому

    12:38, I do not think pagination break the statelessness in any sense. Anyone agree or have other opinions ??

  • @ragnorock5096
    @ragnorock5096 Рік тому +1

    Hi Gaurav, thank you so much for this explanation! I have a question regarding setAdmins, what should the API response return if the one of the members of the group (admins parameter sent as a request) are already Admin or all the entire list of members of members are already Admins. Should we return 200 response? 10:08

  • @kahizer
    @kahizer 4 роки тому +1

    Great video man. Is there more product design (API Design) videos out there? I wasn't able to find much.

  • @willwalsh630
    @willwalsh630 5 років тому +1

    Thanks Gaurav, you’re the real deal 👍

    • @gkcs
      @gkcs  5 років тому

      😁

  • @CivilSalt
    @CivilSalt 5 років тому

    Well done Gaurav... Your almost there

    • @gkcs
      @gkcs  5 років тому

      Where am I? 😛

    • @CivilSalt
      @CivilSalt 5 років тому

      Still breaking through the barriers

    • @CivilSalt
      @CivilSalt 5 років тому

      Still breaking through complications

  • @Vithal_Nivargi
    @Vithal_Nivargi 2 роки тому

    Nicely explained helpful video ❤️

  • @TheStringBreaker
    @TheStringBreaker 2 роки тому

    *Phenomenal video!*

  • @rahulprajapati8052
    @rahulprajapati8052 5 років тому +3

    Your video is very helpful. Keep posting good content.

  • @indrjitkumar964
    @indrjitkumar964 5 років тому

    Gaurav, First of all, thanks for the wonderful videos you have put up for the show..... I request you to make a video on bulk action like adding million people to a group or sending mail to all existing users in one shot.... this is the feature we want to add to our product but not able to find an apt approach or sol for it......

  • @pranayamr
    @pranayamr 2 роки тому

    Cann''t we do streaming for big response , if client need all data ? I am doing such thing where i have to sent big list , adv i get is very less memory consumption and streaming help with i need to invent chunking of data

  • @raghavchawla1101
    @raghavchawla1101 5 років тому +1

    Great video Sir as always! Thank you so much.

  • @adityapushkar
    @adityapushkar Рік тому

    This is pure gem ❤

  • @crahul9033
    @crahul9033 4 роки тому

    @Gaurav, it was a nice & Brief Explanation

  • @mandavasairaghavendradines6582
    @mandavasairaghavendradines6582 5 років тому +1

    Thanks.. searching a lot for a similar thing from a long time

  • @carltonmcfarlane_64
    @carltonmcfarlane_64 4 роки тому +1

    Really clear explanation - thank you! :)

  • @vyshnavramesh9305
    @vyshnavramesh9305 5 років тому +13

    Hi Gaurav, can you make a video on Security: Oauth2, Jwt, OpenId, Saml, Basic, Digest, SSO, Social sign in. There are plenty on youtube individually but none has all these as a whole describing use cases and differentiating each other

    • @gkcs
      @gkcs  5 років тому +4

      Sometime in future :)

  • @_rajenderjoshi
    @_rajenderjoshi 4 роки тому

    6:15
    Do you mean we should return 200 for non-existent identifiers? It will be a development nightmare on frontend applications. What are your thoughts on this?

    • @gkcs
      @gkcs  4 роки тому

      "It is an expected *error*".
      What made you think we should return 200 for expected errors?

    • @_rajenderjoshi
      @_rajenderjoshi 4 роки тому

      You said we shouldn't return 404 in this case. So what error code would you recommend for such expected errors?

  • @nallorumoment
    @nallorumoment 4 роки тому

    If it's possible to add subtitles... then its good bro, It's very helpful

  • @madhusudhansubedi7105
    @madhusudhansubedi7105 5 років тому +1

    Nice explanation mate

  • @rajnishjha5817
    @rajnishjha5817 5 років тому

    As per my understanding about API is: API is something which simply pulls out the data from the data source so that various applications can consume those APIs. Since our data source may or may not interact with other applications that's why we need to create an API. Here data source can be any databases or legacy systems like SAP.

    • @gkcs
      @gkcs  5 років тому

      I don't think that is very accurate. I could provide an API which returns a random number, or does a complex calculation using the input variables.

  • @sankalparora9374
    @sankalparora9374 Рік тому

    Thanks for the great vid!

  • @zaidyousaf4449
    @zaidyousaf4449 5 років тому

    You are very motivating. Best of luck for more challenges

  • @saumyasharma5090
    @saumyasharma5090 5 років тому +1

    Wonderful in details API design !! Would have been great to include Bulk APIs on large dataset as well.

    • @gkcs
      @gkcs  5 років тому

      Thanks!
      I'll try and talk about this in a future video 😁

  • @kirtisoni6076
    @kirtisoni6076 4 роки тому

    How can we not show the details in the url? Like the Id of a user.How to make it secure?

  • @CodeSingh1
    @CodeSingh1 2 роки тому

    Love your videos. Just an idea, Would Secure REST API be a good Idea for a video ?

  • @protyaybanerjee5051
    @protyaybanerjee5051 Рік тому +1

    I remember reading about HATEOS as a way to return just the requested data with IDs of the
    child attributes. That would significantly reduce the response size, right ?

    • @gkcs
      @gkcs  Рік тому +1

      It would, but you have to query for the data later anyway. It's likely to increase the overall network bandwidth utilization with all the back and forth.

    • @protyaybanerjee5051
      @protyaybanerjee5051 Рік тому

      @@gkcs yep yep. Trade-offs! Makes sense

  • @HardikGhoshal
    @HardikGhoshal 5 років тому

    Naming is important.
    So is competitive programming 👍🏻👍🏻👍🏻👍🏻

  • @uditsharma2536
    @uditsharma2536 4 роки тому

    In the case of large responses, I got the idea about the pagination. but how we can do the fragmentation for large responses. I wanted to know more about this point.

    • @gkcs
      @gkcs  4 роки тому

      This might help set the general idea: en.wikipedia.org/wiki/IP_fragmentation

  • @tiwariishan1606
    @tiwariishan1606 5 років тому +3

    @Gaurav, when you described the handling of Large Responses, you talked about 2 things [i] Pagination, [ii] Fragmentation. Shouldn't we consider HATEOAS also as a viable option? It would make API more connected and take off the burden of a large response.
    Also, in case if an API is designed to perform any Bulk Operation lets say import, then what should be the correct way to design it?

    • @mohammedmuzzammil5960
      @mohammedmuzzammil5960 2 роки тому

      Correct me if i am wrong but pagination is the thing that comes with hateoas right?

  • @hunggarchristian
    @hunggarchristian 5 років тому +3

    The one we've been waiting for

  • @rezamonang
    @rezamonang 5 років тому +1

    excellent as always

  • @ChitranshuVashishth
    @ChitranshuVashishth 5 років тому +30

    I'm sure Gaurav can easily transition into a formal teaching career if he wants oneday

  • @georgethetechboy3034
    @georgethetechboy3034 5 років тому

    You are a great teacher... I don't know where you work, but if ever Interested in Amazon, let me know and I'll see what I can do for you

    • @gkcs
      @gkcs  5 років тому +1

      Thank you! I currently work at Uber :)

  • @vaddiparthivenkatamuralikr8334
    @vaddiparthivenkatamuralikr8334 5 років тому

    great video. very useful information.

  • @manishavyas1846
    @manishavyas1846 3 роки тому

    I usually speed up the video speed on UA-cam, but this is the first video where I had to slow it down.

    • @gkcs
      @gkcs  3 роки тому +1

      I'll take that as a compliment :p

    • @manishavyas1846
      @manishavyas1846 3 роки тому

      @@gkcs yes i meant in a positive way , so many, so good info here.

  • @pupunjena1862
    @pupunjena1862 5 років тому +1

    great explanation even though i know all of it...great going .....learnt some too

  • @sajalmakharia1269
    @sajalmakharia1269 2 роки тому

    @Gaurav, In case we have huge number of query params or just filter params for a get Api how would the api design in that case look like?

    • @gkcs
      @gkcs  2 роки тому

      Have a look at GraphQL

  • @pallav29
    @pallav29 3 роки тому +2

    Hi @Gaurav,, Can you tell how it is different to make APIs for Web and for Mobile apps? Should we use mobile approach and assume "one size fits all " theory or should there be different API design approach for Web or Mobile ?

  • @aravindh1989
    @aravindh1989 3 роки тому

    Is there a need to differentiate 'groupDoesNotExist' and 'groupIsDeleted' ?

  • @nitinp7918
    @nitinp7918 2 роки тому

    Versioning is a must. So it conforming to HTTP methods.

  • @SameerUnt
    @SameerUnt 5 років тому +2

    Api design always starts from defining the resource url. Then you move towards defining the api spec and so forth... its called model first or api first approach.

  • @pavankumar-xi1ju
    @pavankumar-xi1ju 4 роки тому

    Onwe thing i want to say gaurav we have certain functions to mitigate the large length of api id in php,how can we say that it is a bad attempt of calling parameters

  • @myusuf8160
    @myusuf8160 5 років тому +4

    Wish you 100K Soon #GKCS
    Keep up the good work

  • @adeshshendge6031
    @adeshshendge6031 5 років тому

    You are awesome mate!!!!Love your videos

    • @gkcs
      @gkcs  5 років тому

      Thanks!

  • @tibordigana2551
    @tibordigana2551 5 років тому

    POST means that you published a new form on the webcontent instead of making any query with data -> data. The REST is not SOAP! The REST is well done HTTP protocol.

  • @parameshsingtel5973
    @parameshsingtel5973 2 роки тому

    why you prefer to use POST instead of GET for read call

  • @thegodfatheram
    @thegodfatheram Рік тому

    Thank you my friend a student from iraq

    • @gkcs
      @gkcs  Рік тому +1

      Thank you!

  • @hadronelite
    @hadronelite 4 роки тому

    Another great lesson 🙏

    • @gkcs
      @gkcs  4 роки тому

      Thanks 😊

  • @aadarshjajodia4719
    @aadarshjajodia4719 5 років тому +1

    @Gaurav one suggestion I have is and maybe it's a very important part of API design is that the objects which the API returns should be different from the actual backend objects. The reason this is very important is because if you decouple these 2 things, its easy to change something in the returned object without actually modifying the underlying business object. Also can you please add a video on how pagination is done?

    • @gkcs
      @gkcs  5 років тому

      That's a good idea, something I have seen in my experience :)
      And I'll get to pagination in future videos :)

    • @mptreviews7035
      @mptreviews7035 2 роки тому

      Can data transfer objects (DTOs) be used for this decoupling of objects. In C# context

  • @lunadeluna69
    @lunadeluna69 5 років тому

    Just FYI, adding pagination to an API endpoint does not violate the "stateless" principle. The query is self-contained, and can be ran on any instance of the same service with the same results (assuming the data has not changed between requests).

    • @gkcs
      @gkcs  5 років тому

      That's true, and I did know this when mentioning it. I wanted people to think over it :P

  • @azadalishah2966
    @azadalishah2966 5 років тому +1

    Nice video but you haven’t mentioned few things like - speed/fast algorithm for the API, tactics to avoid frequent changes of the api signatures due to enhanced features, steps to be taken to avoid recompilation from client side when enhancement happens.

    • @gkcs
      @gkcs  5 років тому

      Let me mention them all now then:
      Don't make breaking changes 😛

  • @KangJangkrik
    @KangJangkrik 4 роки тому

    What if we keep response processing on API gateway side and the rest on microservice? Any pros + cons? Thanks!

  • @charanpreetsingh8866
    @charanpreetsingh8866 2 роки тому

    swaaad he aa gya video dekh k

  • @Karmihir
    @Karmihir 5 років тому +6

    Explained well....Also It would be great if you share some real time test case using any Rabbit MQ kind or Messaging platform!

    • @gkcs
      @gkcs  5 років тому +1

      Maybe next time 😁

    • @Karmihir
      @Karmihir 5 років тому

      @@gkcs Thnak You 😊