TUTORIAL C# WPF Design UI - #2 (2/2) - REST API Access

Поделиться
HTML-код
  • Опубликовано: 16 фев 2019
  • Hi, in this tutorial we will continue creating our user and start to create the persistence for RIOT API.
    Buy me a coffee
    www.buymeacoffee.com/abeldutraui
    Github
    github.com/Abel13/LoLGoal/tre...

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

  • @jonestako4721
    @jonestako4721 5 лет назад +3

    I would like to thank you for the great work.

  • @informaticasms9244
    @informaticasms9244 5 лет назад +1

    I've never seen anyone do it better. Great job !!

  • @juanveras1145
    @juanveras1145 5 лет назад +1

    Olá, ando vendo seus videos sobre WPF e XAML, me amarrei mais ainda quando vi usando o lol como tema... porém eu to com problemas mesmo tendo feito tudo identicamente igual a ti, pretende fazer videos comentados?

    • @AbelDutraUI
      @AbelDutraUI  5 лет назад

      Olá, fico feliz em saber que gostou :D
      E sim, esse tipo de vídeo precisa ser comentado... Tentei fazer assim pra ver se ficava bom mas não gostei muito, estou pensando em alguns formatos de vídeo, e em breve devo fazer vídeos comentados

    • @juanveras1145
      @juanveras1145 5 лет назад +1

      @@AbelDutraUI ta sendo de grande ajuda pro meu desenvolvimento em programação, tu é fera

  • @Hyper1025
    @Hyper1025 5 лет назад +1

    Não sei como você sobrevive sem o ReSharper

    • @AbelDutraUI
      @AbelDutraUI  5 лет назад

      kkkkk eu odeio ReSharper, acho que já acostumei hueheueh

    • @Hyper1025
      @Hyper1025 5 лет назад +1

      Design com WPF eu não vivo sem

    • @AbelDutraUI
      @AbelDutraUI  5 лет назад

      Realmente ajuda bastante, mas n consegui me acostumar rsrs

  • @Hyper1025
    @Hyper1025 5 лет назад

    Só pra avisar, você deixou sua APIKey lá no seu gith, melhor apagar

  • @leviethoang934
    @leviethoang934 4 года назад

    How to get API key

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

      You need to sign up here: developer.riotgames.com/

  • @kirillf.8053
    @kirillf.8053 5 лет назад +2

    I'm sorry, but it's a complete garbage.
    - First.
    In HttpClient which you're using, there's a method called 'EnsureSuccessStatusCode' which is a good practice to use, instead of checking status codes in if/else statements. It removes diplication and its easier to read.
    try {
    // your stuff
    response.EnsureSuccessStatusCode() // it throws httpException with additional information & status code
    // deserialize if not thrown & do other stuff
    }
    catch (Exception ex)
    {
    return null;
    }
    - Second.
    You complitely fucked up MVVM, by implementing your logic within Events, instead of Commands.
    Also, you store Views & 'Controllers'-like entities in Windows, which is another bad practice. And oh boy...try to use less MessageBox'es.
    - Third.
    Dont store your stuff(api URLs/Keys/endpoints) in plain text files. You have 'App.config' for that. I suggest you to store main URL there & endpoints in static class.
    Also, you are integrating with a external third party service & you have complitely NONE error handling, which means any exception will kill your app.
    - Forth.
    Do not, I repeat, DO NOT EVER USE HTTPCLIENT within 'using' statement. Make it static, use the static instance & dispose it when your app is closing. Disposing HttpClient in the middle of the running app with make your software unstable, since it wont close the socket you're using.
    Things that you're teaching are either code smell or bad practice. Sometimes both. But the UI is great, though.
    P.s. Not trying to be offensive here, only constructive.

    • @AbelDutraUI
      @AbelDutraUI  5 лет назад

      Thank you! I appreciate your feedback and I'll improve it!

    • @AbelDutraUI
      @AbelDutraUI  5 лет назад

      Oh, and if you like the layout please watch the next videos in this serie. Probably there are more code smells but I'm here to learn too. Thank you for watch :)

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

    lol is cringe