Fetching Stock Prices and Refactoring API Calls - FULL STACK WPF (.NET CORE) MVVM #7

Поділитися
Вставка

КОМЕНТАРІ • 28

  • @sivakumarr28
    @sivakumarr28 4 роки тому +2

    I used bindings a lot of times, but I am unaware of FallbackValue. I am learning new things every day from you. Thanks Sean.

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

      Hey Sivakumar, glad to hear you're learning!

  • @faraz-online
    @faraz-online 4 роки тому +1

    Bundle of Thanks Sean!!!
    This valuable series of yours has turned out to be a Great Treasure for sure!

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

    Thanks for explaining the reason why you've stored the interfaces in the Domain. This makes a lot of sense and agree it's a much better to move the dependency away from a concrete API implementation - will be changing my current project's structure to match.

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

      Definitely a good practice, glad you see the benefit in that Thomas!

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

    All this is new for me, I hope to be able to carry out my own project at the end of this course.
    Thanks for giving away such good material, my best wishes to the author.

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

    Sean, Thank you for these videos. I've been learning C# and just getting my feet wet with WPF. I am more versed in C++ Win32 and this is a huge lift for me to switch my approach. It is all still confusing since I'm still new to c#, OOP, WPF, Entity Framework, Dependency Injection, etcetera... I've spend a lot of hours going over your videos and following along as you develop this project. I've been trying to implement some of these concepts to refactor an old Win32 app that I have wanted to re-write for a while. I can't thank you enough this has been very helpful and my re-write is going surprisingly well so far. I'm beginning to really like the WPF UI now that I've been able to make a few things work which is just enough of a push to keep learning.

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

      That's wonderful to hear, wade ray! Best of luck on your learning journey. I also started my WPF journey by porting Win32 apps to WPF, and it's definitely a satisfying experience!

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

    Hi, I was wondering if setting Price in StockPriceResult to double? would be an ok alternative. I tried it out and the json deserialization seemed to work ok. that way an exception could be thrown on null instead of zero. Zero would most likely never be a realistic price, so it should reliably be used as an exception... but this idea might be usable in a different use case for a different type of API call where 0 is acceptable. Do you know of any pitfalls in using it? thx for another great episode. :-)

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

      Hey JC, I'm not aware of many pitfalls with using nullable properties. I think they are actually most appropriate when querying data, such as from an API or database, so this use case would definitely apply :)

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

    Thanks Sean. Update the API endpoint for real time stock prices can be access only by premium members

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

    Is there a way to make your API calls return a single Json object instead of an array? I'm only getting arrays returned and its causing errors with Newtonsoft.

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

    Minor question, and you might cover this later, but isn't it better to use decimal instead of double for monetary calculations?

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

      Correct Jack! I suppose I wasn't worried about precision too much for these tutorials. Additionally, I'm not sure if the API returns precise monetary values, so double might be sufficient. In the long run, it'd be smarter to use decimal though. Great suggestion!

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

    Very valuable instructions. But highly recommend move to UWP since Windows on ARM is the real future now

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

    I have been trying to figure this out for the last few weeks and you have made these videos just in time! If you could show how to get the financial statements like the balance sheet from the Json links into a table that would be fantastic! I've yet to find a solution... Great video!

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

      Hello James, I'm glad I was able to help. At the moment, I have other things planned before getting into company financial statements. I took a look at the endpoint for financial statements, and it should be straightforward to deserialize the JSON into a model that has a property for a list of "Financials". As for displaying the data, have you looked into the DataGrid control for WPF? I think that would be a good start for your use case. If you're looking for a more advanced control, I would suggest a GridView inside of a ListView.

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

    Thank you for this tutorial. Why you createing classes for every method , like Sellstock service, Buystock service, wt about to have Stock service. It might end up with enormous number of classes when making real application

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

    Hi Thanks for the video. Can you please continue videos on Custom control development?

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

      Of course Vinay! I still have a lot more planned for that series

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

    Hey!
    Great series so far... Is there more to come?? eagerly waiting.

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

      No worries tushar! Many more videos are planned and coming soon.

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

    Great series so far. My client requirement is Apply clean Architecure In wpf Application. Would you please make a video to clarify clean architecture - Interface Business Rule, Application Business Rule, Interface Adapter, Framework and Drivers?

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

      Hi Mohammad, thank you for watching. For clean architecture, are you referring to traditional design patterns?

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

      Not traditional but 4 Layered: Domain, Application, Presentation , and Infrastructure.
      Application Core Types includes Interfaces, Services, DTO (Data Transfer Objects) and Entities (Business Models).
      Infrastructure Types includes EF Core types (DbContext, Migration),
      Data access implementation types (Repositories),
      Infrastructure-specific services (for example, FileLogger or SmtpNotifier).
      User Interface Types includes Controllers, Filters, Views, ViewModels, Startup
      Tests Types includes Unit Tests, Integration Tests

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

    apparently even thou stock can be 0 is not 'tradable'.

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

    Hi, Your solution provided is clearly the best call for Providing a User-Friendly name display for the Index cards, since it's provided through the API return. Using the enum values at first however, reminded me of a C# trick where you can provide a string annotation to the enum, and call on that string as a value instead of the actual enum. I've used this solution before when I needed spaces and special characters. It boils down to basically adding an extension method to your project and calling it against the enum value. I found the solution here: www.codementor.io/@cerkit/giving-an-enum-a-string-value-using-the-description-attribute-6b4fwdle0 just food for thought. Thank you.

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

      Hey JC, I think I have actually used that extension in previous projects. It's a little bit funky in XAML since I think it needs to be tied to a WPF converter, if I recall correctly. But we're definitely lucky the API gives us user friendly names so that everything stays simple.