An interview with the author of the book "Building Blazor WebAssembly Applications with gRPC"
I am pleased to announce a new section of the newsletter: ten questions to authors of programming books—an attempt to bring authors writing in English closer to the Spanish software development community.
This time I will start with Václav Pekárek, an experienced C# programmer specializing in web application development. He is the author of the book: Building Blazor WebAssembly Applications with gRPC was recently published (November 2022) by Packt.
1) Hi Václav, before beginning this interview about your book, I'd like to ask about you. How did you get started in the world of programming?
Hi Camilo. I would like to thank you first for the opportunity of this interview. Now back to the question. When my parents got first computer (it is more than 20 years back), I like to do more stuff, than just playing games. I created my first website before I got to high school and since then the websites was something I like to do. In that time, it was not programming yet. Mostly coding with HTML and CSS. After the high school I was working with CMS systems on PHP, but I did not enjoy it much.
Later, it is now more than 10 years in the past, I got opportunity to work with C# and I immediately love it. Since then, I was working with C# and have the most focus on the website development.
2) Your book "Building Blazor WebAssembly Applications with gRPC" was recently published by Packt. Tell me a little about how the project came about.
I have interest in Blazor since version 0.8, when it was something new. In the beginning of the 2022, I read a book focused on the Blazor development with a note from the Packt, saying that “anybody can be an author”. In that time, I was developing project in Blazor using gRPC instead of REST services and I thought that it can be interesting topic. I contacted Packt with my idea of the book, thinking that it will take months to communicate, but after two weeks, there was a schedule for every chapter.
3) Blazor WebAssembly allows executing .NET code in the browser through WebAssembly technology (a binary format standard). What differentiates Blazor from other approaches to working with WebAssembly?
I must say, that I do not have experience with other languages, like Rust or Ruby and WebAssembly, so I can’t compare them. I think that mostly it will be the developer choice which language they know best.
4) How can someone who develops web applications with this technology benefit from it?
I think that we can’t expect somebody to learn C# just because of Blazor WebAssembly technology. Especially if they know JavaScript frameworks. But on the other hand, there are a lot of web developers in C#, who use JavaScript frameworks on the front-end just because there are no other options. And right now, there is. Using the language, we knew the best on the backend and frontend can speed up development. This also brings us reusable code and better validations during build time, than with JavaScript frameworks.
5) The book also explains the use of gRPC with Blazor WebAssembly. What is gRPC, and how is it different from a traditional approach such as a REST API?
gRPC is a shortcut for remote procedure calls. It uses binary serialization instead of JSON and uses HTTP/2 protocol. This leads to better performance during serialization and deserialization and lower amount of data transferred over the network. It was created for server-to-server communication, but we can use it also in the Blazor WebAssembly application. Other advantage is that we can share models of data and that the gRPC in the C# will generate typed client for us. It leads to zero mistakes when deserializing data on the client, and prevent typos in the URL call for the REST API.
6) How is the book organized? Is it a technical or theoretical book?
The book is more technical then theoretical. Reading the book from the start to the end, and following all the steps should lead to understanding the topic and to having functional application. We can almost say that this is a cookbook for the Blazor WebAssembly with gRPC.
7) Who is the target audience?
The ideal reader has knowledge about web development. Knowing basics of HTML is crucial for this book as well as basic knowledge of C# and dotnet.
8) What was your experience writing this book?
I enjoyed it much more, than I expected. It was great to have a team of people looking over you in the whole process of the writing.
9) For those interested in the book, where can they get it?
The book is available on the Amazon Store as well as on the Packt websites.
10) And if someone wants to contact you, where can they find you?
You can find me on the LinkedIn, Twitter (@vaclavpekarek) or via email v.pekarek@gmail.com
Many thanks to Václav for taking the time to answer my questions. And thanks to Anamika Singh for the coordination; without her help, this interview would not have been possible.