C# 9 and .NET 5: Modern Cross-Platform Development: Build intelligent apps, websites, and services with Blazor, ASP.NET Core, and Entity Framework Core using Visual Studio Code
Publisher's Microsoft stopped supporting .NET 5 in May 2022. The newer 7th edition of this book is available that covers .NET 7 (end-of-life May 2024) or .NET 6 (end-of-life November 2024), with C# 11 and EF Core 7. In C# 9 and .NET 5 – Modern Cross-Platform Development, Fifth Edition, expert teacher Mark J. Price gives you everything you need to start programming C# applications. This latest edition uses the popular Visual Studio Code editor to work across all major operating systems. It is fully updated and expanded with a new chapter on the Microsoft Blazor framework. The book's first part teaches the fundamentals of C#, including object-oriented programming and new C# 9 features such as top-level programs, target-typed new object instantiation, and immutable types using the record keyword. Part 2 covers the .NET APIs, for performing tasks like managing and querying data, monitoring and improving performance, and working with the file system, async streams, serialization, and encryption. Part 3 provides examples of cross-platform apps you can build and deploy, such as websites and services using ASP.NET Core or mobile apps using Xamarin.Forms. The best type of application for learning the C# language constructs and many of the .NET libraries is one that does not distract with unnecessary application code. For that reason, the C# and .NET topics covered in Chapters 1 to 13 feature console applications. In Chapters 14 to 20, having mastered the basics of the language and libraries, you will build practical applications using ASP.NET Core, Model-View-Controller (MVC), and Blazor. By the end of the book, you will have acquired the understanding and skills you need to use C# 9 and .NET 5 to create websites, services, and mobile apps. This book is best for C# and .NET beginners, or programmers who have worked with C# in the past but feel left behind by the changes in the past few years. This book doesn't expect you to have any C# or .NET experience; however, you should have a general understanding of programming. Students and professionals with a science, technology, engineering, or mathematics (STEM) background can certainly benefit from this book. (N.B. Please use the Look Inside option to see further chapters)
Mark J Price is a former Microsoft Certified Trainer (MCT) and current Microsoft Specialist: Programming in C# and Architecting Microsoft Azure Solutions, with more than 20 years' of educational and programming experience.
Since 1993 Mark has passed more than 80 Microsoft programming exams and specializes in preparing others to pass them too. His students range from professionals with decades of experience to 16-year-old apprentices with none. Mark successfully guides all of them by combining educational skills with real-world experience consulting and developing systems for enterprises worldwide.
Between 2001 and 2003 Mark was employed full-time to write official courseware for Microsoft in Redmond, USA. Mark's team wrote the first training courses for C# while it was still an early alpha version. While with Microsoft he taught "train-the-trainer" classes to get other MCTs up-to-speed on C# and .NET.
Currently, Mark creates and delivers training courses for Episerver's Digital Experience Platform, the best .NET CMS for Digital Marketing and E-commerce.
In 2010 Mark studied for a Post-Graduate Certificate in Education (PGCE). He taught GCSE and A-Level mathematics in two London secondary schools. Mark holds a Computer Science BSc. Hons. Degree from the University of Bristol, UK.
It's different from most programming books that I've read. This book doesn't spoon-feed the readers, it will force you to Google stuff whilst making you think. It does things step-by-step, and adds lines of code as the author tries to explain stuff. Compared to other books, they'll give you the complete code, and try to explain it by referring to lines, e.g., "Line 6 of Display 1.1, tells the program to..." Hence, this book's readability is way better than others for me. Also, kudos to the author for always immediately releasing a new edition as soon the language version was updated as well. However, I think it could have been written better if the author didn't introduce intermediate concepts immediately before having a solid foundation of those concepts. For instance, in Chapter 3: Controlling Flow and Converting Types, I think it was quite inappropriate to give examples that includes file handling given that it hasn't been discussed yet.
I already know Java when I read this, hence, this book worked out just fine for me. However, I would not recommend this book for beginners who have absolutely no idea with object-oriented programming.
I've really been enjoying exploring the latest trends in app design for 2023 that were outlined in the book "Mobile And Web App Design: Best Ten Trends To Explore in 2023". Two trends that particularly interested me were conversational interfaces and augmented reality. When I came across the book "C# 9 and .NET 5: Modern Cross-Platform Development", I was excited to see that it covered these important topics. The book walked me through building conversational chatbots and integrating speech recognition using ASP.NET Core and Blazor. It also demonstrated creating augmented reality experiences for mobile apps with Xamarin.Forms and the Mixed Reality Toolkit. As someone who works on a lot of cross-platform solutions, I found the detailed tutorials on core .NET 5 concepts like Minimal APIs and Initialize methods extremely valuable. Being able to create modular, reusable code is so important for efficient development. I also really appreciated the sections on C# 9 features like records, ranges and patterns. The updated syntax makes the language even more powerful and clearer to write in.
As the title suggests, the book provides an excellent overview of latest C# and .net versions. Using the dotnet cli, the book walks us through many of the dotnet cli features; other books usually cover this through VS itself.
Beginning with Console apps and covering web, web services, Blazor, SignalR and Xamarin, the book is filled with plenty of examples (agreed, I didn't try most of them). It has even more links to articles if you want to dig deeper. I started with one such link regarding the "proper implementation of HTTPClient" from the book and found a few other MSDN docs and other articles that provided a great deal of information on that topic.
Being a C# developer for a quite a few years now, I did scan through the initial few chapters, but had to read all the pages of the later ones. I found these chapters to be very informative and detailed.
A chapter on deployment practices like CICD would have added more value to this book.
This book's target audience is probably beginners who are new C# and .NET. Once in a while I was able to find some neat tidbit about C# that I didn't know, but most of the book I skimmed.
Later in the book it goes through different frameworks/libraries that you may want to use when starting to develop an application. However, some of that content is quite shallow and might not interest you. E.g. there's one chapter about content management systems, that spends a lot of pages just walking through the UI of Piranha CMS. Not really something I was interested to learn about, so I skipped most of that. Another example is a chapter about machine learning; it felt like the author had lost a bit of interest by that point, and just wanted to write something quick to fill some sort of page or topic quota.
I have been C# .NET developer for about 8 years and this book was fun. Sure some chapters I did not read very carefully, as they were veeery basic, specially at the beginning. But even at the start of the book I sometimes found things I haven't seen or had very vague understanding. So this is a good book to fill in the gaps of your knowledge. Also for those who are migrating from different languages to C# this book would be beneficial.
Another interesting thing was that [almost]all examples were written in Visual Studio Code. Gives you a different perspective, as you are forced to manually add code for project dependencies, use dotnet cli functions extensively etc.
There were some unexpected topics like CMS and Machine learning. But I guess it was good to have a brief overview about these topics.
Another good thing is that this book is full of references where to get more information on each topic.