ZinderLabs @ Cronos .NET event 2023
May 5, 2023 — Zinderlabs
As part of the Cronos group, we at ZinderLabs had the opportunity to attend the 2023 edition of the Cronos dotnet event. The main idea was to have an afternoon with talks about various topics related to the dotnet ecosystem.
We could pick 1 hour long talks from two parallel tracks with topics related to C#, dotnet, Azure, etc. In this post, we will discuss some highlights from the sessions attended by our team.
What is New in .NET and C#
One of the two talks to choose from in round 1 were the newest features in dotnet 7 and C# 11 and some in the latest preview of dotnet 8 and C# 12, presented by Johnny Hooyberghs from Involved. Out of the many goodies he showcased, we will highlight two that struck a chord with us.
First up are the changes to the already robust string interpolation implementation. We can now designate the number of double quotes necessary to start and end the interpolated string and tell the compiler how many curly braces are needed to be an interpolated expression. For example, this enables us to write more readable JSON strings with fewer escaped characters.
We also liked the part about the new Regex and Json (de)serialization source generators. The implementations themselves are excellent, but most interesting was why Microsoft needed these to be present in dotnet (hint: it has to do with AOT compilation and the inability to have reflection when compiling code in this way!).
Overall, we got a nice highlight reel of the many new features, with a good tempo, many code examples, and some interesting compiler-specific explanations for why specific changes are needed.
For more info, refer to the slides and code samples at Johnny’s GitHub.
GraphQL at Scale with .NET and Azure
We also attended a talk by Toon Vanhoutte from Noest, which focused on pitfalls to avoid when implementing a GraphQL API in .NET. He and his team had had to learn the hard way what some of those pitfalls were and wished to showcase some of their solutions.
The first top was about setting up telemetry for Application Insights with GraphQL. In a RESTful API, we can rely on the self-describing URIs to interpret the intention of a call when just logging the endpoint names (e.g., GET …/books, or POST …/books). In contrast, GraphQL only sends numerous POST requests to the same URI. Toon showed us how to transmit specific data and subsequently achieve successful monitoring.
Another one was query complexity. With three different GraphQL APIs and an orchestrator for the queries weaved between them, it would be easy for a client to request a lot of data and shatter our frail backend. One of the things Toon and the team utilized to try to circumvent those situations was to have a BatchDataLoader for specific queries.
With these tools in our toolkit, we now feel confident to tackle more GraphQL implementations in the future.
For more info, refer to Toon’s GitHub.
We had a fun afternoon intermingling with Cronos-colleagues at an excellent event hall with good catering and learned interesting things along the way.
We look forward to the next edition and might even step onto the stage ourselves to present something!