#JulyOT 29: .NET nanoFramework Engineering Fundamentals
Tags: julyot, iot, nanoframework, embedded
Published: 2022-07-29 23:14:44

---
title: #JulyOT 29: .NET nanoFramework Engineering Fundamentals
published: true
date: 2022-07-29 00:00:00 UTC
tags: julyot,iot,nanoframework,embedded
canonical_url: https://JulyOT.dev/blog/29-nano-framework
series: JulyOT 2022
cover_image: https://JulyOT.dev/assets/images/JulyOT-banner-29-nanoframework-33ca06aca73d3446f4e8c88ed354064b.png
---

# Engineering fundamentals

Engineering fundamentals are defined with elements like proper code review, tests, documentation, CI/CD, design and execute with security and safety by default, developer experience and more! The great news is that .NET nanoFramework has all of this.

Here are some proof points.

## PR reviews and code quality[​](#pr-reviews-and-code-quality "Direct link to heading")

Everything goes thru PR, as it's a community effort, some key core contributors have merge rights and deeply review the PR but we also see PR reviewed by other community members. High quality PR are proposed by community developers and about 80 different contributors are raising PR every year.

3954 PR (see [Github statistics](https://github.com/pulls?q=is%3Apr+created%3A%3E%3D2021-06-03+user%3Ananoframework)) in total has been created in the last year period in the .NET nanoFramework repositories. Some has been created either by the bot (684) either are related to git actions (1907). **So 1363 created by real humans** every year. That's an average of **2.7 PR every single day of the year**!

On the code quality side, linters are used for our native C and C++ code. Linters are used for the documentation as well making sure our key Markdown files are properly formed.

.NET nanoFramework broadly uses SonarCloud as a static analyzer. Read more [here](https://www.nanoframework.net/sonarcloud-is-on-nanoframework-repos/). This increases the quality of the code by finding patterns that may not be the best, pointing out code that is repeated and should be reused, readability and more! All our .NET nanoFramework projects can be [found here](https://sonarcloud.io/organizations/nanoframework/projects).

[![Sonar](https://JulyOT.dev/assets/images/sonar-73f5278bcb941a50b1e15a97f937db67.png)](https://sonarcloud.io/organizations/nanoframework/projects)

## Developer Experience[​](#developer-experience "Direct link to heading")

This is the mantra of .NET nanoFramework: making the developer experience the best as possible. It does include a [Visual Studio extension](https://marketplace.visualstudio.com/items?itemName=nanoframework.nanoframework-vs2022-extension&ssr=false#review-details) allowing the create, build and debug the C# code in the same way as you'll do with any of your C# code! Tools to flash the device are available, they are always evolving to make it simpler to use.

[![VS Extension](https://JulyOT.dev/assets/images/vs2022-extension-cb8e008db515c9b611200110c0ac376e.png)](https://marketplace.visualstudio.com/items?itemName=nanoframework.nanoFramework-VS2022-Extension)

Recently, an experimental [VS Code extension](https://github.com/nanoframework/nf-VSCodeExtension) has been made available with support to flash, build and deploy .NET nanoFramework code on [Linux and MacOS](https://www.nanoframework.net/vs-code-extension-for-net-nanoframework) on top of the Windows platform.

[![VS Extension](https://JulyOT.dev/assets/images/vscode-extension-6889cb928848b0464c3565dcaa0c4e06.png)](https://github.com/nanoframework/nf-VSCodeExtension)

[Dev containers](https://code.visualstudio.com/docs/remote/create-dev-container) has been created to make it easy for anyone to rebuild the .NET nanoFramework native part. Making it easy to add your own native code.

## CI/CD: Azure DevOps and GitHub Actions[​](#cicd-azure-devops-and-github-actions "Direct link to heading")

The best duo ever: all our build pipelines and NuGet publishing are hosted in Azure DevOps. A [specific tool repository](https://github.com/nanoframework/nf-tools) contains yaml file to be reused. Fixing a bug in this repo will fix the bug everywhere! Still each repository have a yaml file for what is specific which does include what needs to be build, some specific dependencies as well.

[![Pipeline tools](https://JulyOT.dev/assets/images/pipelines-babd43e2f11c7b574c25d2c482bf6820.png)](https://github.com/nanoframework/nf-tools)

To update the NuGet references on dependent repositories, GitHub Actions are used. To give an idea, in the last rolling year, 1907 automatic updates has been done by Git Actions maintaining proper versions on all the NuGet packages for all the repositories thus saving a lot of complicated and (otherwise) manual work.

## Security and safety by default[​](#security-and-safety-by-default "Direct link to heading")

.NET nanoFramework supports TLS and SSL to connect over the network. Secrets can be stored on the device and for those offering a secure storage for Wi-Fi for example, .NET nanoFramework supports this. And while Over the Air update is not yet available, patterns to properly update your code using Azure IoT is available and detailed in [this article](https://www.nanoframework.net/over-the-air-net-nanoframework-code-update-using-azure-iot/).

## Unit Test Framework[​](#unit-test-framework "Direct link to heading")

A nice addition from 2021 allows to have Unit Tests for C# code. Those Unit Tests can be run in a pipeline as well as on a real device. A deep integration has been done with Visual Studio making the developer life as easy and smooth as possible. Some of the challenges that need to be solved are explained in this article published on the [Microsoft .NET blog](https://devblogs.microsoft.com/dotnet/show-dotnet-build-your-own-unit-test-platform-the-true-story-of-net-nanoframework/).

[![Test example](https://docs.nanoframework.net/images/test-integration-vs.jpg)](https://github.com/nanoframework/nanoFramework.TestFramework)

Adding those unit tests and implementing thousands of those for the Core Library and many other classes put a huge boost in terms of quality. While the Core Library had to be released almost every week 2 years ago, the actual rhythm is less than once a month as it has reach a great quality level.

Since it appeared, the test framework has been improved and recently added DataRow attribute allows writting even more tests in a more compact and efficient way.

## Documentation[​](#documentation "Direct link to heading")

.NET nanoFramework pays a huge attention to the documentation. The mechanism behind is described in this article: [.NET nanoFramework ❤️(automated) documentation – .NET nanoFramework](https://www.nanoframework.net/net-nanoframework-love-automated-documentation/). The [documentation website](https://docs.nanoframework.net/) is automatically build, gathering all the 80+ nanoFramework repository, build the Intellisense comments out of the code, gathering the IoT Device repository readme and putting all this together in a nice, digestible and easy to search way.

[![docs.nanoframework.net](https://JulyOT.dev/assets/images/docs-nano-98a4a09fe40b7957de26cf438e14705c.png)](https://docs.nanoframework.net/index.html)

A specific attention has been placed as well on repositories like the [Azure Library one](https://github.com/nanoframework/nanoFramework.Azure.Devices) with all the details on how to use the library and of course with [dedicated samples](https://github.com/nanoframework/samples#azure-specific) in the sample repository.

## Observability[​](#observability "Direct link to heading")

Being able to log information regarding your application is an important and fundamental feature. .NET nanoFramework provides multiple NuGet packages to adjust as best as possible with your needs. There is of course a regular debug one, outputting the details into the [debug console](https://www.nuget.org/packages/nanoFramework.Logging/). There are as well [Stream](https://www.nuget.org/packages/nanoFramework.Logging.Stream/), [Serial](https://www.nuget.org/packages/nanoFramework.Logging.Serial/) and [Syslog](https://www.nuget.org/packages/nanoFramework.Logging.Syslog/) available. This gives the opportunity to log any kind of information to the most common outputs. And if this is not enough for you, the base class can be extended and you can build the logging you need. And all this is based on the same set of API as the classical Microsoft.Extensions.Logging! So as a developer, one more time, you're covered and you can use the same way the tools you are use to use in .NET.

## Community engagement and support[​](#community-engagement-and-support "Direct link to heading")

.NET nanoFramework is built on Community and Community support. While there are possibility to get proper [paid technical support for enterprises using .NET nanoFramework](https://docs.nanoframework.net/content/support/professional-support.html), the build from Community nature of the project makes it a Community first project. There is a [very active Discord](https://discord.gg/NhDC3t8d) server with multiple channels dedicated to help anyone. It is notable to see that the average answer for any question is usually less than one hour. And the base of participants is growing at a rhythm of more than a 100 new joiners every month for the last few years. More than 30% of our members are actively participating in discussions every month! There are more than 2000 messages exchanged every month on the server as well. This also shows a very active and healthy Community engagement.

## Conclusion[​](#conclusion "Direct link to heading")

Over the last 4 weeks we've been trying to give you a tour of .NET nanoFramework and we hope you've enjoyed it! There is a lot more to say of course and we'll be happy to welcome you in our community.

[![Get started](https://JulyOT.dev/assets/images/nano-get-started-96515c92b9bb2c7a7d51797c72941317.png)](https://docs.nanoframework.net/content/getting-started-guides/getting-started-managed.html)