Vanilla Node.js REST API | No Framework

แชร์
ฝัง
  • เผยแพร่เมื่อ 23 ส.ค. 2024

ความคิดเห็น • 320

  • @TraversyMedia
    @TraversyMedia  3 ปีที่แล้ว +191

    I realized I have never done this. In an actual project, you would most likely use Express or some other framework, but I wanted to do this for learning purposes so you can see a bit of what goes on under the hood. This API can be improved (eg. creating a better router), so feel free to work on it and make a PR :) Hope you enjoy!

    • @ammarrazzak5302
      @ammarrazzak5302 3 ปีที่แล้ว +10

      I agree, creators like you will ensure that people learn the basics before moving on to the top layer and forgetting what was underneath all of it. I always schedule a coding session for myself of creating a mini express type clone with 'http" module, but never got to it. Thanks for the incredible content! Take care!

    • @codingman313
      @codingman313 3 ปีที่แล้ว +9

      How is ur health now sir. In last few years i learnt a lot about web programming from ur channel. Thanks a lot for your sincere efforts for all these years helping numerous newcomers and students. I really felt bad when i found that your health was in bad condition. Seeing you active again really made me happy. Once again thank u so much from the bottom of my heart.

    • @cwinter90
      @cwinter90 3 ปีที่แล้ว +3

      I actually was contacted by a company yesterday that was looking for someone with Node.js server experience. Told them I've used Express and NestJS figuring they were being generic. Nope... they legitimately use raw Node.js for their backend. Not interested in making things more difficult for myself lol.

    • @tomhames6884
      @tomhames6884 3 ปีที่แล้ว +3

      Completely agree. Frameworks purposely abstract a lot of the details, but for beginners, and in general, it's really important to understand what's going on under the hood. Hope you're well, Brad.

    • @TraversyMedia
      @TraversyMedia  3 ปีที่แล้ว +19

      @@codingman313 It is better. Still having the same issues, but I am on a new med that is helping. I will do an update on that soon :)

  • @codewithgedo3067
    @codewithgedo3067 3 ปีที่แล้ว +110

    Your voice make me comfortable, and motivate me to listen to you even if I wouldn't 😂😂

    • @TraversyMedia
      @TraversyMedia  3 ปีที่แล้ว +15

      Thanks :)

    • @rranga99
      @rranga99 3 ปีที่แล้ว +3

      Actually you make me feel that there is still more I can do. Thanks for all your contributions and support.

    • @kevalkaria
      @kevalkaria 3 ปีที่แล้ว +2

      Yes really

    • @consoledoterror971
      @consoledoterror971 3 ปีที่แล้ว

      Yeah, You are right.

    • @abdullahalakus9700
      @abdullahalakus9700 3 ปีที่แล้ว +1

      yeah me to

  • @AbhaySharma-lf1cv
    @AbhaySharma-lf1cv 3 ปีที่แล้ว +76

    Finally, The OG BRAD himself

    • @eleah2665
      @eleah2665 3 ปีที่แล้ว +3

      the KING is here today.

  • @arkhamian7586
    @arkhamian7586 3 ปีที่แล้ว +19

    You undoubtedly know how to push your audience towards developing real coding skills. Thank you in advance for all the hard work.

  • @jordansumitomo2357
    @jordansumitomo2357 3 ปีที่แล้ว +31

    Purchased your MERN ecommerce course learned a lot from you thank you keep making courses.

  • @Pareshbpatel
    @Pareshbpatel 3 ปีที่แล้ว +5

    Some serious learning that most newbies would not have bothered to learn. Thank you very much, Brad.
    [PBP 2021-05-25 20:48]

  • @LongBoy.0
    @LongBoy.0 3 ปีที่แล้ว +1

    Brad, the MVP of software engineering out here doing on youtube what most $20,000 bootcamps claim to do, but fail at. Thanks so much Brad.

  • @nishantkumar6960
    @nishantkumar6960 3 ปีที่แล้ว +2

    I work listening to Brad's voice and I sleep listening to Brad's voice 😁
    It keeps me calm.
    It's Brad 24*7✌️

  • @abdullahalakus9700
    @abdullahalakus9700 3 ปีที่แล้ว +7

    brad, you are the person who made me love the code, I can't thank you enough

  • @biswayannandi6136
    @biswayannandi6136 2 ปีที่แล้ว +1

    There are many videos and blogs with titles 'REST API using NODE' and each one them are using Express. I wanted to learn how can I do it using Node only and I got this...Great work💕❤

  • @peterluke9392
    @peterluke9392 3 ปีที่แล้ว +1

    After watching your channel for a year or so, I decided to buy your js course. Worth every penny of it you helped me a ton.

  • @mysterOrel7924
    @mysterOrel7924 3 ปีที่แล้ว

    Already know all this but it's a good habit of mine to come back and watch tutos of things that i already know... sometimes you find yourself lreaning new things that you missed or forgot ! Thx Brad and happy to have you again !!!!

  • @KostasOreopoulos
    @KostasOreopoulos 3 ปีที่แล้ว +1

    First of all, great video as always.
    A "quick" remark
    The View in MVC in the backend is not the "View - Presentation" of the results in your browser. View in MVC is the presentation of the Data to the outside world.
    In this case, the View is a Data-Mapper. You get data from the Database and create a "view" to send back. For example, you could create another View for a normal user (less data) and an admin (all data), or an authorized user (some data depending on authorization).
    Technically, not in this example, of course, The Model, should consist of a Service and a DAO (data access object).
    The controller gets the incoming data from the body and does validation of data and then "asks" the corresponding Service to do the task.
    The Service will reach out to different services (if needed, for example checking authorization, cache, external APIs, etc), prepare all the information, and then asks the DAO to get the data
    DAO is the data abstraction. For example, products could read data from JSON, XML, mongo, Postgres. DAO should be unified access. Let's say getProduct(id,'json'), if you want to define the source, but you could omit that. Just do getProduct(id), but hide which DB you are using. If you later want to change DB, you would just change the implementation of that function.
    A nice library doing that, which seems promising is prisma.io (currently only supporting SQL databases)

  • @vinubox
    @vinubox 3 ปีที่แล้ว +2

    Ah! That soothing sound of information is a back, welcome back with all my heart...

  • @eyuelbegashaw8609
    @eyuelbegashaw8609 3 ปีที่แล้ว +6

    please do more projects with pure NodeJS , no framework. there is literally nothing online except express. frameworks will change from time to time.
    we

    • @danilx6239
      @danilx6239 5 หลายเดือนก่อน

      true

  • @tblancog
    @tblancog 3 ปีที่แล้ว +1

    The most difficult part was to set the post data but certainly, all this makes you understand what's under the hood of a framework. Great tutorial, I enjoyed every minute.

  • @tobiasjennerjahn8659
    @tobiasjennerjahn8659 3 ปีที่แล้ว +9

    Hopefully this video means you‘re doing well. Or at least a little better than before. Thanks for all the amazing content you put out.

  • @denissanchezleyva8954
    @denissanchezleyva8954 3 ปีที่แล้ว +2

    Hey Brad, you are like the Ave Fenix , after 30 days of break. Now, the contents is very high level. I am still in the last sections of your Mer-Ecommerce course after 3 weeks studying 2 hours per days. It is awesome. I recommend it 100%. And now this one. Man, you have a special skill to write code. It is like poetry for those who love coding. No doubt. God Bless you.

  • @icaras12x87
    @icaras12x87 3 ปีที่แล้ว

    Is it Brad? omg that's an honor. We subscribed because of you, Brad, never forget this

  • @latinrev3822
    @latinrev3822 3 ปีที่แล้ว +3

    Really interesting seeing how the req.body works under the hood, really cool Brad!

  • @dw.beastma9182
    @dw.beastma9182 3 ปีที่แล้ว +1

    I just learned about fetching API today and now you posted about REST API using Node.js only!!!! Thanks for always sharing Brad, I bought your new course the day it's started being sold though haven't started learning it yet since I believe I should focus more on my foundation before tackling all the trending framework.

  • @tarunkishore4574
    @tarunkishore4574 3 ปีที่แล้ว +1

    Man ! U always come to the rescue when i need something so badly !!

    • @tarunkishore4574
      @tarunkishore4574 3 ปีที่แล้ว

      @Jack Saat I needed it to understand node completely. And currently facing some issues with express

  • @shaunr9088
    @shaunr9088 3 ปีที่แล้ว

    List not only helped me understand REST better but Node JS in general. Thank you.

  • @hsvt12
    @hsvt12 3 ปีที่แล้ว

    this is amaing I love when people do videos which don't use libaries
    really shows the inner working of how the libary works

  • @rustatum2382
    @rustatum2382 3 ปีที่แล้ว +5

    I found that uuid() would occasionally create an id number that begins with a letter instead of a number.
    It helps to replace the '[0-9]' with '[a-z0-9]' in the three url.match conditionals in the server component

    • @BigBaddaBoom
      @BigBaddaBoom 2 ปีที่แล้ว +2

      Not all heroes wear capes, @RusTatum. Thank you. Unless, of course, maybe you are wearing a cape? I was troubleshooting why some uuids were breaking the getById function. If I could pin your comment to the top to help others, I would.
      I was receiving the response from the server of "Route Not Found" for UUIDs like: c69c7182-4a6d-4b78-aa03-e0db92cfe371
      Since this UUID started with a letter, everything broke.

  • @austinwheelo
    @austinwheelo 3 ปีที่แล้ว

    With all due respect and props to your contributors, they did an excellent job, it is great to see you back! I hope you are doing well and feeling good! Pace yourself, we've all been there.

  • @victorlima4801
    @victorlima4801 3 ปีที่แล้ว

    A few days ago I decided to start making a mini express clone for self challenge and learning purposes, and now I found this. Your tutorial is extremely helpful, thanks a lot!

  • @Judas_Is_Fish
    @Judas_Is_Fish 3 ปีที่แล้ว

    You can't even imagine, how long I was waiting for this kind of video with vanilla Node.js. Thanks a lot, you make world a bit better :)

    • @Tim12x
      @Tim12x 3 ปีที่แล้ว

      только вот для чего ты это ждал?

    • @Judas_Is_Fish
      @Judas_Is_Fish 3 ปีที่แล้ว

      @@Tim12x Потому что мне грусто от того, что такие элементарные вещи, как обработка POST запроса, объясняют только на нагроможденном Express, а про ванильную ноду дальше запуска сервера почти никто ничего не объясняет

  • @Mescudi94
    @Mescudi94 ปีที่แล้ว

    One of the best tutorial I have seen, thank you for this. Plus, you have a way to speak which is very comprehensible for non-english people like me, I'm quite amazed to understand very well each word !

  • @FatherOfTheParty
    @FatherOfTheParty 3 ปีที่แล้ว +1

    This was very instructive and well done. Thank you for taking the time to put this together! Going in I knew no NodeJS at all. Still far from fluent but I am now comfortable with the basics and can easily build on what you've taught me. Thanks again!

  • @sirojxujamuminkhodjaev1369
    @sirojxujamuminkhodjaev1369 3 ปีที่แล้ว

    I entered the web development world with your help Brad. Nice to hear you again bro.

  • @cervantes01
    @cervantes01 3 ปีที่แล้ว

    hi Brad, I've really been enjoying your guest contributors, but it is great that you can still post the occasional video. Well done:)

  • @Saiphes
    @Saiphes 3 ปีที่แล้ว

    YAY, I was your 3000th like for this video! :P

  • @thesteppino45
    @thesteppino45 3 ปีที่แล้ว

    Welcome back, Brad. You sealed the choice for me when I was trying to choose between starting web development and app development.
    Thanks.

  • @Chandasouk
    @Chandasouk 3 ปีที่แล้ว +1

    Brad is back!

  • @jfbiswajit
    @jfbiswajit 3 ปีที่แล้ว

    love to hear your voice after the intro. ah, peace!
    honestly, I can't tolerate anyone else voice after the intro. love you Brad! ❤

  • @user-dx6we1pn6q
    @user-dx6we1pn6q 3 ปีที่แล้ว

    I am a simple man. I hear Brad, I hit like

  • @fluntimes
    @fluntimes 3 ปีที่แล้ว +1

    I have wanted to see this for a while just to be "in the know". I am doing your API Masterclass on Udemy and this tutorial outlines how cool Express is for handling all the moving parts of an API. Awesome!

  • @CreativeJE
    @CreativeJE 3 ปีที่แล้ว +1

    its so good to hear your voice brad I was really missing it :(

  • @jlambert12013
    @jlambert12013 2 ปีที่แล้ว

    When Brad said “ it’s a pain in the ass (but) I like doing this kind of stuff” .. I felt that. @12:40

  • @jamjam3448
    @jamjam3448 2 ปีที่แล้ว +1

    Thanks so much! I learned how the matching of the params work without expressjs

  • @sebastiancastillo3560
    @sebastiancastillo3560 3 ปีที่แล้ว +1

    Yes !,
    finally our savior is back.
    Thank you Brad !, I hope you're great.

  • @erikshumkov4848
    @erikshumkov4848 3 ปีที่แล้ว

    Good to have you back again, hope you are doing well. :)

  • @88noname88
    @88noname88 3 ปีที่แล้ว

    I'm so happy that we have frameworks like Express. It is makes our life easier

  • @ThePurpleMaestro
    @ThePurpleMaestro 3 ปีที่แล้ว

    i see video i hear brad's video i press like

  • @pratikxavier8176
    @pratikxavier8176 3 ปีที่แล้ว +1

    After working with express for a while now I was still confused what's really happening under the hood. God bless you Brad🙂👍 #respect
    Love from India🙏

  • @jaleotech5918
    @jaleotech5918 3 ปีที่แล้ว

    Nice to have you back....thanks for the video

  • @vishnujr1130
    @vishnujr1130 3 ปีที่แล้ว +1

    Finished your MERN Ecommerce udemy course..it was a wonderful experience..learned a lot

    • @TraversyMedia
      @TraversyMedia  3 ปีที่แล้ว +5

      Wow, that's impressive that you already finished it. It takes me a month to finish a 15 hour course lol

    • @ammarrazzak5302
      @ammarrazzak5302 3 ปีที่แล้ว

      @@TraversyMedia Lol! Still working on the Modern JS course, has been over 1 year. Now it acts as a recipe book. But it helped me alot when I was struggling with JS.

    • @vishnujr1130
      @vishnujr1130 3 ปีที่แล้ว

      @@TraversyMedia Thanks Brad. You did all the hardwork to get things easy for us. That's why I could finish the course much quicker. Your way of implementing redux in that course was impressive to me as a beginner. Thank you for all the hardwork and support.

  • @emanueltejadacoste2250
    @emanueltejadacoste2250 3 ปีที่แล้ว

    Amazing video, now i can move on to the node js complete course. you are a TITAN

  • @maxd7228
    @maxd7228 3 ปีที่แล้ว

    Ahhhh. The soothing sound of Brad’s keyboard.

  • @stuartmarsh5574
    @stuartmarsh5574 2 ปีที่แล้ว

    Thank you, great video. It took me forever to realize that my delete response body wasn't showing up because I used a 204 response code. I like the idea of using a 200 and being able to confirm the deletion.

  • @excalibur885
    @excalibur885 3 ปีที่แล้ว

    Best content on the internet xo happy that this channel exists. Ty Brad

  • @_rachid
    @_rachid 3 ปีที่แล้ว +1

    I loved this course, thank you Brad!

  • @regal_7877
    @regal_7877 3 ปีที่แล้ว

    I've just got into backend web development (I'm an extreme newbie) and I've been searching to hell and back for this specific topic to no avail. I did a lot of reading and didn't want to learn a new language like Ruby and then Rails so this is such a blessing I can't even begin to describe. Thank you.

    • @BillClinton228
      @BillClinton228 3 ปีที่แล้ว

      There are many ways to do backend work, Node is not the be all and end all just because all the "cool kids" are using it these days, 8 years ago Ruby was the in thing and all the hipster programmers couldnt shut up about it. Don't follow fads, try out different languages and use which ever language you feel most comfortable with, and if you think this tech will get you the most money remember this is the tech industry and fads change very quickly.

    • @regal_7877
      @regal_7877 3 ปีที่แล้ว +1

      @@BillClinton228 Yeah definitely. I'm not one to get sucked into trends and stuff. I actually started off with C/C++ believe it or not, and I'm not even from a Computer Software background, I do Electronics. I'm still extremely inferior in those languages too but since then I've already tried python, java, html/css (not programming but close enough) and javascript. I just thought it would be easier to use Node.js since I've done some work with Node before. Although I do have a hard time wrapping my head around the "async-await-sync" stuff. I was actually already starting to learn Ruby but....time

  • @Muaddibkhan
    @Muaddibkhan 3 ปีที่แล้ว

    Great to see you brad back to your routine

  • @jaychandran24
    @jaychandran24 3 ปีที่แล้ว

    The MERN course is dope! Thanks, Brad!

  • @amarjitkumarsingh25
    @amarjitkumarsingh25 3 ปีที่แล้ว

    Thanks Brad, it was a good learning curve. Enjoyed! Thanks for your time.

  • @user-ky7hv2mr7h
    @user-ky7hv2mr7h ปีที่แล้ว

    Incredible quality video! Good voice record and nice material!
    Thank you very much!

  • @tenminutetokyo2643
    @tenminutetokyo2643 3 ปีที่แล้ว

    Welcome back dood!

  • @AkkayHT228
    @AkkayHT228 3 ปีที่แล้ว

    Legend returns

  • @music-unleashed
    @music-unleashed 3 ปีที่แล้ว +1

    I made API-s with PHP since the beginning of times but man... this was soo sweet.
    I have to mastering this stuff and search a new job :)

  • @mystique6773
    @mystique6773 3 ปีที่แล้ว +4

    Clicked faster than Brad getting on his purpose after he wakes up in the morning.

  • @chukwumaobi7770
    @chukwumaobi7770 3 ปีที่แล้ว

    Welcome back. we missed you!

  • @Pareshbpatel
    @Pareshbpatel 2 ปีที่แล้ว

    Completed excellent tutorial on CRUD API in Vanilla JS. Thanks, again, Brad
    {2021-12-16}

  • @sakamoto399
    @sakamoto399 3 ปีที่แล้ว

    glad to see you back.

  • @AslamD
    @AslamD 3 ปีที่แล้ว +67

    This is how people are supposed to learn node instead of directly jumping on express.

    • @softwarelivre2389
      @softwarelivre2389 3 ปีที่แล้ว

      That's more or less what I've attemped in Deno. Never tried it on Node, though.

    • @maxprofitonemilliongoal2184
      @maxprofitonemilliongoal2184 3 ปีที่แล้ว

      6:10 BIG WIN 2020 th-cam.com/video/MNNd2DZSdKs/w-d-xo.html

    • @MrAfusensi
      @MrAfusensi 3 ปีที่แล้ว +3

      It does not really matter. Once you get to the point of knowing express pretty well, the jump to the node js http API would not be very hard.

    • @_nom_
      @_nom_ 3 ปีที่แล้ว

      No, I don't agree. What if you need to make it cors capable? Etc. Node is still providing a layer for you.

    • @MrAfusensi
      @MrAfusensi 3 ปีที่แล้ว

      @@_nom_ When you learn either one you also learn development skills, which includes learning how to read and understand documentation.

  • @chinmayghule8272
    @chinmayghule8272 ปีที่แล้ว

    I followed through the entire course except for one thing. I used a regular array instead of a json file since I was using an old file from a previous tutorial. Because of this every time the server restarts all the changes made in the server got overridden and I had to start over again. Nice course, this really makes me appreciate Express.js.

  • @arunarkamukhopadhyay6443
    @arunarkamukhopadhyay6443 3 ปีที่แล้ว

    Finally Brad is back.

  • @cookiesndata211
    @cookiesndata211 2 ปีที่แล้ว

    I enjoyed it ,thanks . Keep up great work. Have a Happy New year .

  • @justkitob
    @justkitob 3 ปีที่แล้ว

    Yeah I hope come back Brad . the best tutor

  • @mackynikat8833
    @mackynikat8833 3 ปีที่แล้ว

    . done with this . im only stuck with rest client but everything seems fine now . good luck adopting new era sir ( not on new normal )

  • @nested9301
    @nested9301 2 ปีที่แล้ว

    i just complete all of this and i"m proud of my self xD thank you!

  • @prateekmitra9702
    @prateekmitra9702 3 ปีที่แล้ว

    So that's what happens BTS Express.js. Really good explanation, given I am a newbie in backend.

  • @jemjem8902
    @jemjem8902 3 ปีที่แล้ว

    How are you doin Brad? So happy seeing you again!

  • @primatondyaryakurniawan267
    @primatondyaryakurniawan267 3 ปีที่แล้ว

    Wow, i realize we should respect a framework for making it lot easier

  • @the_full_stack_junkie
    @the_full_stack_junkie 3 ปีที่แล้ว

    Thanks Brad always a winner ! 🤓

  • @mrjeter
    @mrjeter 3 ปีที่แล้ว

    What a wonderful class, thanks Brad!

  • @FabioGiacomini
    @FabioGiacomini 9 หลายเดือนก่อน

    Awesome video, very well explained. Thank you

  • @user-ru2jb4yo3s
    @user-ru2jb4yo3s 11 หลายเดือนก่อน

    thank u sooooo much really worth and i made it with u step by step , it's fully functional at me

  • @CodestarTechnologies
    @CodestarTechnologies 3 ปีที่แล้ว

    This is what I was waiting for thanks brad

  • @darint07
    @darint07 3 ปีที่แล้ว

    I was looking exactly for this. Thank you!

  • @jakegerard1870
    @jakegerard1870 3 ปีที่แล้ว

    Awesome stuff Brad!

  • @akramnarejo6221
    @akramnarejo6221 ปีที่แล้ว

    thanks for creating a beautiful content. and I happy to let you know that I completed it.

  • @hamzaazr8181
    @hamzaazr8181 3 ปีที่แล้ว

    listening to this voice made my day

  • @KaranveerSingh97
    @KaranveerSingh97 3 ปีที่แล้ว

    Nice video. To get params from urls, an easier way is to use the in-built url package in node.js

  • @abdullahalakus9700
    @abdullahalakus9700 3 ปีที่แล้ว

    The sound of rain came from behind, obviously it was nice

  • @Martin-jq8th
    @Martin-jq8th 3 ปีที่แล้ว

    13:13 Brad You are Golden

  • @eajajulratan2004
    @eajajulratan2004 3 ปีที่แล้ว

    Thanks man!
    Good to see you!

  • @imaxle3663
    @imaxle3663 3 ปีที่แล้ว

    Liked before watching!

  • @stevenwinsir6229
    @stevenwinsir6229 3 ปีที่แล้ว

    very helpful video, i always use koa framework and almost forget these basic node js. it seems like I need to review again

  • @maciekjedlinski1832
    @maciekjedlinski1832 3 ปีที่แล้ว

    Just when I needed such video!

  • @SteveCarroll2011
    @SteveCarroll2011 3 ปีที่แล้ว

    As someone that prefers minimal code when possible, this is most appreciated! The pacing is excellent, the sequence of how you put this together is, as well. No wasted time. It looks like you just turned on screencast recording and ‘winged’ it, is that the case?

  • @honglytech
    @honglytech 3 ปีที่แล้ว

    Good one Brad! 👍

  • @Jet1323
    @Jet1323 3 ปีที่แล้ว

    daim i love this video :O was about to look it up and there you were haha!!

  • @samirsamir7779
    @samirsamir7779 3 ปีที่แล้ว

    Brad please , is there any chance to teach us really "how to master the shopify theme's building and customization" , really there is definitly no good video with this topic at all , your way to explain new things is just perfect , especially when you code directly live ! your udemy courses also helped me a lot ! thank you for your phenomenal channel Brad !

  • @NeverCodeAlone
    @NeverCodeAlone 3 ปีที่แล้ว

    Thx for this nice video. It brings me a lot because it is real know how and not only a framework configuration ;)

  • @laikesagores3258
    @laikesagores3258 2 ปีที่แล้ว

    Great video, very helpfull, understanding. Thank you!!!

  • @mladjo2505
    @mladjo2505 3 ปีที่แล้ว

    One minor note: The url.match part should match the id as the uuid v4 generates it (as /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/ or maybe /[0-9a-f]+(-[0-9a-f]+)*/ for simplicity). You got lucky that the uuid v4 didn't generate any uuids starting with a-f as first character.
    Other than that really great stuff.

  • @somprogrammer9599
    @somprogrammer9599 3 ปีที่แล้ว

    this makes more sense then express api!!

  • @JohnEdwards-yo8vl
    @JohnEdwards-yo8vl 3 ปีที่แล้ว

    Instead of using uuidv4 you can find the highest id in the products array, and then you can increment it by one to get the new product id:
    const newProductId = parseInt(products.reduce((a, b) => a.id > b.id ? a : b).id) + 1