Blazor API Client using REST & GraphQL APIs - Full Course

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024
  • In this step-by-step tutorial I take you through how build a Blazor WebAssembly (WASM) app that will allow you to call both REST & GraphQL APIs.
    This video includes:
    Application architecture overview
    Blazor theory and core concepts including WebAssembly, SignalR and websockets
    Building Blazor Components
    HttpClient & HttpClientFactory
    Building Data Service to call REST & GraphQL APIs
    Level: Intermediate
    📕 My Book: www.apress.com...
    🤩 Patreon Site (Exclusive Member Benefits!): / binarythistle
    📕 Webhooks Course on Udemy: www.udemy.com/...
    💻 GitHub Repo: github.com/bin...
    🔗 DTO Class Construction: app.quicktype.io/
    🔗 Open Iconic: useiconic.com/...
    🔗 Blazor Event Handling: docs.microsoft...
    🔗 Bootstrap Course: www.udemy.com/...
    🔗 Insomnia Client download: insomnia.rest
    🔗 JSON Editor Online: jsoneditoronli...
    🔗 Newtonsoft Vs Microsoft: docs.microsoft...
    ⏲️ Time Codes ⏲️
    PART 1 - INTRODUCTION
    1:20 Welcome
    2:29 Demo
    7:00 Course Overview
    9:30 Solution Architecture
    12:13 Ingredients
    PART 2 - THEORY
    13:13 What is Blazor?
    17:58 Why use Blazor?
    19:10 Size by Size - the 2 flavours of Blazor
    23:33 Blazor Server Closer Look
    26:28 Blazor WASM (Client) Closer Look
    PART 3 - CODING PART 1 - OUR FIST COMPONENT
    29:46 dotnet new... (Start the prject build)
    32:25 Project anatomy
    47:55 A look at our first Component
    49:21 Our Component UI
    1:00:47 Adding UI Events
    1:05:46 @Code - Adding our methods and properties
    1:13:37 Error handling
    PART 4 - CODING PART 2 - STARTING API CALLS
    1:15:29 A look at our APIs
    1:18:10 Exercising our APIs with Insomnia
    1:29:47 A look at the "Fetch Data" Component
    1:33:47 Working with JSON & DTOs
    1:46:58 Calling our REST API
    1:54:02 Separating Concerns
    2:00:26 Adding an appsettings.json file
    2:05:14 HttpClient & HttpCLientFactory
    PART 5 - CODING PART 3 - DATA SERVICES
    2:08:32 Creating our "Launches" Component
    2:13:04 Introducing Data Services with HttpClientFactory
    2:24:57 Our REST Data Service
    2:28:54 Using out Data Service
    2:32:46 Revisiting the GraphQL Payload
    2:35:00 A new DTO
    2:40:35 GraphQL Data Service
    PART 6 - WRAP UP
    2:56:33 Wrap up and Final thoughts
    3:58:06 Patreon Supporter Credits

Комментарии • 122

  • @joaofranco6779
    @joaofranco6779 3 года назад +13

    Hey, this video is looking real good! Because you have already timestamped the video, if you put 00:00 in the description, RUclips will automatically create chapters in the progress bar

    • @joaofranco6779
      @joaofranco6779 3 года назад

      Also, small note, the last timestamp should be 2:58:xx and not 3:58:xx

  • @argeelearner3978
    @argeelearner3978 3 года назад +11

    Always an exiting day when Les Jackson releases a new course/video. Thank you so much!

  • @zealtypedcode3119
    @zealtypedcode3119 3 года назад +9

    Best intro ever JavaScript is an abomination

  • @jamesallen74
    @jamesallen74 3 года назад +12

    Found your channel probably a few months ago. Really good videos dude. I like your style how you make them.
    I subscribed to probably 100 channels of different things and you're probably one of the three channels that I actually clicked the bell on. Keep up the great work.

    • @binarythistle
      @binarythistle  3 года назад +2

      Hey James thanks for the sub man! Glad you like the content, cheers, Les

    • @xinloung
      @xinloung 3 года назад

      @@binarythistle The content you make is always appreciated.

    • @BrunSwick33
      @BrunSwick33 3 года назад +1

      @@binarythistle I also stumbled across a few months ago. Made sure to share with my team at work. I think everyone has watched and learned a ton. Thanks and keep up the great work!

  • @rizaanjappie
    @rizaanjappie 2 года назад +1

    Dude, your videos are amazing. You cover real world scenarios.

  • @mbkvec
    @mbkvec 3 года назад

    Though the industry does not accept Blazor WASM like React or Angular, this course helped me on gaining knowledge on GraphQL, HttpClientFactory and quicktype tool. Hats Off!!!

  • @mementomori8856
    @mementomori8856 3 года назад +6

    What a timing! I needed this for what I'm building, just finished the MVC REST API video as well, I've learned a lot, thank you!!!

  • @joshvaughan3403
    @joshvaughan3403 3 года назад +4

    This is perfect timing! I was just giving up on Javascript!

    • @Grandhoy
      @Grandhoy 3 года назад +4

      Same here - JS is a mess of a language IMO.

    • @binarythistle
      @binarythistle  3 года назад +2

      Nice! Glad i could help!

    • @ukcryptolondonbased2953
      @ukcryptolondonbased2953 3 года назад +1

      Persevere! Spend a bit of time *properly* understanding Promises and Observables and life gets easier. It opens up so many opportunities. I learned a bit of Angular and suddenly I was able to write production quality mobile apps using Ionic.
      TypeScript makes writing cleaner code much easier for C# devs too.

  • @mohamedfared9659
    @mohamedfared9659 3 года назад +1

    man thats amazing i just commented to ask for blazor and in the same day i get the full course
    i canot believe it

  • @AlThePal78
    @AlThePal78 2 года назад

    I am so happy that Tyson Fury knows a lot about blazor LOL love your content man :)

  • @sgguitarfan7
    @sgguitarfan7 3 года назад

    Still working on the previous video, I made my first graphql server thanks to you, Love from Puerto Rico my brother.

  • @csilipo
    @csilipo 3 года назад +1

    I want to say "great work" on your blazor tutorials. I am really enjoying it. Carlo

  • @caloyness
    @caloyness 3 года назад +2

    thanks for this, your channel is underrated. i've taken a lot of udemy course but i can say you're lessons are equally or much better than those. keep it up. My only additional input is that I feel like I'm listening to my strict professor.

  • @kandycan
    @kandycan 5 месяцев назад

    @ 2:44:00 I am happy u made that choice. as viewers get to know what's underneath without thinking that it's some sorta magic.

  • @doctorrusty6494
    @doctorrusty6494 3 года назад

    Blazor stuff! Yes! Thanks Les - you're a STAR!!!

  • @csilipo
    @csilipo 3 года назад

    It much better that you are standing. You are far more animated. This is a good thing. Carlo

  • @stevenbey
    @stevenbey 3 года назад +1

    I've been using Blazor for a while but I enjoy watching these videos as there's always new things to learn: i.e. I didn't know about the appsettings on the client.
    However, the GraphQL service could have been simplified by using PostToJsonAsync and then the ReadAsJsonAsync extension method on the reponse.Content property.

  • @alexeisichov
    @alexeisichov 3 года назад +1

    It would be amazing to see a video about blazor server from you. Your vids are great btw

  • @lushman
    @lushman 3 года назад +1

    A very good presentation, keep up the good work, learnt heaps about Blazor and GraphQL.

  • @rmclean101
    @rmclean101 8 месяцев назад

    This is so awesome and I so appreciate you!!

  • @teach4355
    @teach4355 2 года назад

    Thanks for this very useful tutorial! GraphQL is new to me, was great to learn, and also your useful tools.

  • @h.verheijen7872
    @h.verheijen7872 2 года назад

    This is really wonderful to follow (just my sort of liking in the way and order you explain things in sufficient and enough detail) and learn along the way. So a great THANKS from someone hugely interested in making a professional career switch as a code-developer towards Blazor in the broadest sense. So once again thanks! Pls. continue teaching this way. Have a great day.

  • @princeprince164
    @princeprince164 Год назад

    Excellent learning tutorial!!

  • @matthewlevis4436
    @matthewlevis4436 3 года назад +1

    In Visual Studio you can create your classes from JSON using - Edit > Paste Special - creates much less noise and much simpler

  • @chidieberelevi3344
    @chidieberelevi3344 2 года назад

    Thank you for the work you put in your videos, they are very in-depth as well as conceptualized. I learnt how to write API from watching your .NET 5 Api tutorial

  • @FnaticMedamri
    @FnaticMedamri 3 года назад +2

    This dude saves lives

    • @binarythistle
      @binarythistle  3 года назад

      Always happy to help my fellow devs!

  • @prubenheeren707
    @prubenheeren707 3 года назад +1

    Very high quality, thank you.

  • @rodelruiz4713
    @rodelruiz4713 3 года назад

    Thanks for your efforts in sharing us what you know ...very generous indeed ...love to see more videos from you ...thanks again

  • @DougNelson
    @DougNelson 3 года назад

    Wow.. Thank you for this video. I am a big fan and can not wait for more..

  • @НатальяСидорова-д2ь

    Every your lessons are amazing . Thanks you very much.

  • @Gojam12
    @Gojam12 2 года назад

    At 1:13:20 and I am thinking rock on my brother, thank you for this video, and again thanks for not being Tim "All about me me me" Correy.

  • @johnpelitidis6297
    @johnpelitidis6297 3 года назад

    Thanks Les... exactly what I needed to learn. (ps. I'm in Bentleigh VIC with real insomnia)

  • @nicolass8941
    @nicolass8941 2 года назад

    Another great training course !!

  • @Moorer85
    @Moorer85 3 года назад

    one of your best video's. nice job!!

  • @matteobarbieri2989
    @matteobarbieri2989 3 года назад

    great video. thanks

  • @onurozguzel8747
    @onurozguzel8747 2 года назад

    Thanks a lot for this quality content!

  • @dhananjays
    @dhananjays 3 года назад

    Thank you sir, great tutorial.

  • @whatizzydoin
    @whatizzydoin 3 года назад

    Awesome video. Very useful for getting the newbie grads at work up-to-date with actual knowledge they can use. Would be good if you could cover OData as another option. Provides the filtering, sorting capability over a REST API. So a potential comparison for GraphQL. Would also advise using the UTC time from spacex api. In a real world app you want a specific locale to ensure back-end consistency. Also wold be good to have a deep-dive for system.text.json (maybe with use of Dahomey.Json library for the extra supported functionality)?

  •  2 года назад

    LOL! Amazing intro!

  • @Sad-Lemon
    @Sad-Lemon 2 года назад

    I see JavaScript books thrown into the trash can - I give like.

  • @twistedfcuk
    @twistedfcuk 3 года назад

    Les deserves more subs

  • @ThisIsSimonK
    @ThisIsSimonK Год назад +2

    Just a note that the spacex api seems to be dead, and the creator said (in github issues) that hes going to shut it down. I recommend trying other rest+graphQL apis for this course, there are plenty available :)

    • @W5AKC
      @W5AKC Год назад

      how the hell do you get past the CORS issue with blazor wasm? I cannot find anything about this...everything refers to app which is not in blazor wasm. saw one thing builder.Services.AddCors() but that is not recognized.

  • @spuriustadius5034
    @spuriustadius5034 3 года назад

    Thanks for providing some clarity on this topic!
    Two things are confusing me about Blazor wasm applications-- not your presentation, but really about Microsoft's intention:
    1) I notice that the default template project brings in bootstrap CSS. Does that mean we are "required" to use bootstrap? Are there any implicit hooks into bootstrap itself within a blazor wasm application? Would I be setting myself up for a world of pain if I strip out the bootstrap and instead just use the more modern CSS grid for layout?
    2) The blazor/wasm template brings in the CSS part of bootstrap, but not its usual js dependencies of Jquery and Popper. These are used for things like collapsing navbar menus, dropdowns, etc. If I am going to use bootstrap, I would very much like to use it like in the bootstrap docs and handle all low-level UI with bootstrap's facilities that depend on jquery. I notice that the template uses a method in an @Code block to handle collapsing the navbar menu. Does that mean it is not possible to add jquery js to HTML template and then just use bootstrap's data-target attributes to collapse the navbar menu (like in the bootstrap docs)?

  • @twistedfcuk
    @twistedfcuk 3 года назад

    If everyone had a teacher like Les Jackson, 2021 would have been COVID Free

  • @jay-xi6xj
    @jay-xi6xj 3 года назад

    #100 comment, your course are really great,

  • @raouftoumi6669
    @raouftoumi6669 3 года назад

    As always, a great video. Toooooop

  • @ui-code-tv8302
    @ui-code-tv8302 3 года назад

    I am a front end javascript developer, always looking out for new stacks. You haven't convinced me, But good Video. Thanks

  • @zohaibqadir5245
    @zohaibqadir5245 3 года назад

    very very good learning content. can you please make a course about GRPC

  • @kallebysantos5167
    @kallebysantos5167 2 года назад

    Les Jackson you should minimize that windows search field to have more space on taskbar.
    Go right click on taskbar and than you'll find some option to display only the search icon!!
    I hope that you see it, cause is so annoying to watch you change between taskbar levels 🤣🤣

  • @Radhakrishna-pq3yj
    @Radhakrishna-pq3yj 3 года назад

    #My mentor. Whereever I am whenever I am.. you will always be my mentor. 😍🤘🤘🤘🤑

    • @binarythistle
      @binarythistle  3 года назад +1

      Thanks Radha! What a privilege that is! Les

  • @yacine101
    @yacine101 3 года назад

    ... Fantastic 🔥

  • @sagarchandrapradhan8769
    @sagarchandrapradhan8769 3 года назад

    you are really inspiration for us. eagerly waiting your videos to watch and learn some new concepts in dot net. while watching your videos one man comes to my mind The Braun Strowman WWE. you are like him strongest superstar. and one request could you please make a video on Kafka with dot net .

  • @invictuz4803
    @invictuz4803 2 года назад

    Woah, first person I've seen coding C# in VS Code, does he have a VS Code setup tutorial?

  • @scottmulder9279
    @scottmulder9279 2 года назад

    Thanks for the awesome video! What program did you use for the UI mock up? Cheers

  • @nainglinnaung6518
    @nainglinnaung6518 3 года назад

    Thank you sir

  • @isaacbebawy603
    @isaacbebawy603 2 года назад

    Is this tutorial available as book? thank you for your great video

  • @blackpilledbuddha4944
    @blackpilledbuddha4944 3 года назад

    I wanna make a career as a c# web dev.. please advice what to avoid and what to follow

  • @wilpaulk6303
    @wilpaulk6303 3 года назад +1

    You had me at, no Javascript. 😄

  • @damilola_adegunwa
    @damilola_adegunwa 3 года назад

    Which day will the ".NET Community Standup" feature you! should .NET have an Academy, you should be in the team. thanks again

  • @prem.sagar.m
    @prem.sagar.m 3 года назад +1

    I like long videos

  • @troymitchel4790
    @troymitchel4790 3 года назад

    I keep looking for jobs in Blazor on Indeed, but there are hardly any available. Is learning Blazor worth it if no one is hiring for it?

  • @bloopers2967
    @bloopers2967 3 года назад

    Love your videos man, can you please make videos on azure functions

    • @binarythistle
      @binarythistle  3 года назад

      Try this? ruclips.net/video/Ft34VWPpiA4/видео.html

    • @bloopers2967
      @bloopers2967 3 года назад +2

      @@binarythistle Yes already watched it, I just want more detailed with some business logic as an example.

  • @pc2753
    @pc2753 3 года назад

    Oh you hero! I thought it was just me that thought javascript and it's attendant bloat was an enormous bad code smell!

  • @tanmayfuse1747
    @tanmayfuse1747 3 года назад

    Can you please explain how we can integrate above project with Kubernetes?

  • @khalilsayhi4958
    @khalilsayhi4958 3 года назад

    what are you using as extension to be able to auto implement interface methods etc

  • @syedqasim936
    @syedqasim936 3 года назад

    What are your thoughts on the latency issues in wasm project.

  • @mwardell18290
    @mwardell18290 3 года назад +1

    He is Baaaahhhck!

  • @kresnofatihimani8402
    @kresnofatihimani8402 3 года назад

    hey jackson, when is the dotnet redis tutorial coming up? i need it T _ T

  • @allthecommonsense
    @allthecommonsense 2 года назад

    This sounds promising….

  • @tisurmaster
    @tisurmaster 3 года назад +1

    how do you store tokens securely on the blazor client? or is it even possible?

  • @AbrahamLaria
    @AbrahamLaria 3 года назад +3

    You deserve a million subs. It is so sad that there are so many stupid channels and those are the ones people cares about 🤦🏻‍♂️

  • @ramkumar12344321
    @ramkumar12344321 3 года назад

    How to implement ADFS SAML Assertion Consumer with Redirct binding in .net core razor pages application? Please help

  • @lardosian
    @lardosian 3 года назад

    Thanks Les, just subbed, I'm a React user but interested in C# world. Is it perfectly fine to use vs code as opposed to visual studio, thanks!

    • @barryblack8332
      @barryblack8332 3 года назад

      It's perfectly fine.
      Am lazy so I use visual studio.

    • @lardosian
      @lardosian 3 года назад

      @@barryblack8332 Thanks Barry!

  • @ameeradel4835
    @ameeradel4835 3 года назад

    clicked for blazor, stayed for the GraphQL

  • @ameeradel4835
    @ameeradel4835 3 года назад

    hot reload for the annoying ctrl+c dotnet run
    tl;dr
    dotnet watch -p "directory name" run

  • @LossL3ss
    @LossL3ss 3 года назад

    Anyone can help me with Data Validators to use in GraphQL projects? I Have seen only FluentValidation, but I don't know if exists another good validator

  • @josbexerr5166
    @josbexerr5166 3 года назад +1

    No esta activado el subtítulos en ingles :), saludos de los andes peruanos

  • @h.jpouya4715
    @h.jpouya4715 3 года назад

    your movie has lots of associate producer but no director? did I miss something?

    • @binarythistle
      @binarythistle  3 года назад

      Hi H.J.! The Associate Producer credit is a benefit of supporting me on Patreon: www.patreon.com/binarythistle so it's important to me they go in at the start. In the past I have put the other credits, (Director, Editor etc.) at the end of the video, but as they're all me I've stopped doing that!

  • @AdrianTether
    @AdrianTether 3 года назад

    i code blazer and still find i need js interopt and js lol , at the moment anyways, hopefully they will remove the need for jsinteropt altogether, i never wanted to go any where near js but sadly my boss made us do it for 2 years :/

  • @Vasko10100
    @Vasko10100 3 года назад

    What kind of keyboard are you using?

    • @binarythistle
      @binarythistle  3 года назад

      Hey Vasko, Logitech Pro with Romer G switches: ruclips.net/video/BW5-Ve-yiBI/видео.html

  • @afroz1198
    @afroz1198 3 года назад

    Hey, what's the deal with heavy vocabulary in code?

    • @afroz1198
      @afroz1198 3 года назад

      Basically,you don't see that kind of vocabulary in js channnels for basic api fetch tutorial like this🙄

  • @jaderickerts
    @jaderickerts 3 года назад

    Does anyone else get error messages from the App.razor file? The type or namespace name 'MainLayout' could not be found (are you missing a using directive or an assembly reference?) [BlazorAPIClient].

    • @crozierntwe6740
      @crozierntwe6740 2 года назад

      Hi there, I am getting this error when I try to split my components. Were you able to resolve this issue?

  • @demi9672
    @demi9672 3 года назад

    Js should go back to being only a frontend tool for web designers. Aka, not for programmers.

  • @veshvesh2157
    @veshvesh2157 3 года назад

    fuckin legend

  • @muscleheadzzzz
    @muscleheadzzzz 3 года назад

    First :-)

  • @AljRest
    @AljRest 3 года назад

    In most cases we treat javascript as if it was not a programming language, just something that is there for support

  • @HaoNguyen-km9xj
    @HaoNguyen-km9xj 3 года назад

    Hi.....

  • @RickTheClipper
    @RickTheClipper 3 года назад

    Hey Les, I like Your classes but I suggest You find a way to split it in more clips. 3 hours is too long. Shorter clips are easier to handle in my opinion

  • @enetstudio4176
    @enetstudio4176 3 года назад

    Are you interested in getting help and private lessons via email in exchange for a small donation to a charitable organization ? You may find my email address in the stackoverflow site under the profile for the "enet" user.

  • @tony007newcastkeNE4
    @tony007newcastkeNE4 2 года назад

    HATE js also

  • @steliosvasiliadis3480
    @steliosvasiliadis3480 3 года назад

    Please not so big videos!!!!! You are making great videos but you loose it because it is 3 hours and more. PLEASE DONT DO IT!!!!!!"! You can split it to smaller ones max 1 hour each. It is a shame to make so good videos but because they are toooooooooooooo big someone cannot watch them after the first hour.
    PLEASE DONT MAKE SO BIG VIDEOS PELASE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    • @lammetjeslam2791
      @lammetjeslam2791 3 года назад +1

      My advice : Make use of the handy added 'Time codes' which distinguish and separate the video-parts which make this full video complete.