ZinderLabs @ Cronos .NET event 2024

Just like last year ZinderLabs participated in the Cronos .NET event (check out last year’s episode at ZinderLabs @ Cronos .NET event 2023). As expected, we enjoyed some great sessions about all things .NET and Azure. This year we also had a ZinderLabs speaker on stage: Felix! In this post, we will discuss some highlights from the sessions attended by our team.

1. Azure for .NET apps, the bigger picture

In the first talk we attended, Jan Vanuytrecht & Toon Van Deuren from Kapuani talked about architecture, governance, security, cost, velocity and optimization for .NET projects on Azure.

This session provided us with a clear and structured overview of features we can use to take our cloud apps to the next level. Some of the tips and considerations we take with us:

  • Security: Use Defender For Cloud
  • Cost: be aware of hidden costs, for example underestimating network costs. Prevent this by creating a cost budget with alerts.
  • Velocity: Use pipelines for code AND infra (e.g. with BICEP / TERRAFORM)
  • Optimization: using “Advisor”, which gives you suggestions about your Azure setup
  • K8s vs container apps. Where K8S gives more control and has a strong community, there can be a knowledge gap in teams. Container apps offer less control, but is fully managed and can be easier and quicker to use.

2. Software Architecture Showcase

Next, we attended the talk by Niels Stubbe & Angelo Dejaeghere from Noest. This presentation presented an approach for using architecture as an engine for change.

As we all know, application architecture often starts clean but can evolve into spaghetti code due to continuous feature additions and lack of refactoring. This can lead to issues like regressions and downtime, and eventually make the codebase undesirable for development, even posing HR challenges. Often, a full rewrite is proposed; however, this is not always feasible due to high costs and extensive time requirements.

The Strangler Fig pattern offers a solution by developing a new, clean pathway alongside the old codebase, allowing gradual migration. This process, which might take years, utilizes a reverse proxy (e.g., Nginx, IIS, Yarp) to manage routing between the legacy and modern applications.

The Strangler Fig Pattern
Strangler Fig Pattern – Source https://learn.microsoft.com/en-us/azure/architecture/patterns/strangler-fig

A pattern that can be used to structure applications is the Modular Monolith. This strategy borrows from microservices principles but without the associated overhead. It features a single solution with a central structure that supports modular projects, each containing their own API endpoints. We were presented with an overview and a demo of a .NET solution structured in this way.

At ZinderLabs, our developers and tech leads have implemented similar strategies numerous times in diverse projects. They indeed help to maintain and progressively improve software projects by enhancing maintainability and project momentum.

3. Testing: a pragmatic programmer’s perspective

And then last but not least, it was time for our own Felix to step on stage. We enjoyed his pragmatic perspective on testing strategies!

Felix presenting

As we all know, testing is crucial, and automated testing in CI/CD pipelines is standard practice. It validates scenarios, prevents bugs, and increases deployment confidence. Most of all, testing should facilitate development, not hinder it. Avoid Dogmatic Testing Approaches! Effective testing adapts to the context and needs of each project. Rigid adherence to a single testing strategy can be counterproductive.

In a nutshell, some of the important suggestions presented by Felix:

  • Reflect on the ease of writing tests, the accuracy of unit scopes, and the necessity of mocks.
  • Naming test files clearly can prevent confusion and redundancy. Consider structuring test files based on behavior rather than units for clarity.
  • Focus on unit tests for core functionalities with minimal dependencies.
  • Test code should follow the same clean code principles as production code for ease of navigation and maintenance. This reduces maintenance time and effort compared to production code.

For a full blog post series covering Felix’ testing wisdom in more detail, refer to https://www.zinderlabs.com/testing-smarter-part-1-foundations/