HACKER Q&A
📣 auraham

Course/Book for creating desktop apps in C#


I am interested in creating a desktop application in C#, maybe a simple point-of-sales system for a local store. I used C# back in 2012 for creating some GUI apps but the language has changed a lot since then. Given that, can you recommend a book or course for learning C# in 2022?

Relevant topics:

- Creating a Desktop app (forms, not Web app) for Windows (it does not need to be cross-platform)

- ADO.NET, I want to populate a data grid in a form. I think Entity Framework is the new cool stuff, so I would like to learn it.

- Packaging an app for distribution.

- Best practices for developing GUI applications (ie how to separate the business logic and the data layer)

So far I've found these resources:

- [1] Programming C#: Building .NET Applications with C# (English Edition). It seems to cover most of the topics I am interested in. However, it is a bit outdated. Not sure if the content is still relevant.

- [2] Murach's C# (7th Edition). This seems to be an interesting book. However, I am not familiar with Murach's books. Also, the book is a bit pricey.

- [3] Code Like a Pro in C#. This also seems interesting. The author teaches by refactoring a legacy .NET codebase instead of creating an app from scratch. He also focuses on creating a service instead of a desktop app.

- [4] C# in Depth. Jon Skeet's book. Maybe too specialized.

I am also open to video curses in the same tone as the Pragmatic Studio [5].

[1] https://www.amazon.com/Programming-Building-Applications-Jesse-Liberty-ebook/dp/B0028N4W7O/ref=sr_1_2

[2] https://www.amazon.com/Murachs-C-7th-Joel-Murach/dp/1943872538/ref=sr_1_1

[3] https://www.manning.com/books/code-like-a-pro-in-c-sharp

[4] https://www.manning.com/books/c-sharp-in-depth-fourth-edition

[5] https://pragmaticstudio.com/elixir


  👤 Shadowed_ Accepted Answer ✓
I will go against the grain and recommend learning WPF baceuse principles learned there (xaml and mvvm pattern) will be usable and transferrable to most other UI frameworks that came later. It's also stable and mature technology and works on older Windows versions as well.

👤 runjake
Just use Windows Forms. It’s easy, still supported and even still being improved.

Avoid MAUI, it’s not ready enough. WPF and UWP are pretty much dead and even if you disagree and think they’re not they’re far more cumbersome to become competent with than WinForms.


👤 brtkdotse
The problem with desktop apps is that Microsoft keeps changing the narrative of what the recommended way is every 2-3 years.

Windows Forms? WPF? Xamarin? UWP? Maui?

I have no clue.


👤 ninethirty
Looks like its MAUI now. There's a few MAUI courses on Udemy.