Book Image

A Developer's Guide to .NET in Azure

By : Anuraj Parameswaran, Tamir Al Balkhi
Book Image

A Developer's Guide to .NET in Azure

By: Anuraj Parameswaran, Tamir Al Balkhi

Overview of this book

A Developer’s Guide to .NET in Azure helps you embark on a transformative journey through Microsoft Azure that is tailored to .NET developers. This book is a curated compendium that’ll enable you to master the creation of resilient, scalable, and highly available applications. The book is divided into four parts, with Part 1 demystifying Azure for you and emphasizing the portal's utility and seamless integration. The chapters in this section help you configure your workspace for optimal Azure synergy. You’ll then move on to Part 2, where you’ll explore serverless computing, microservices, containerization, Dapr, and Azure Kubernetes Service for scalability, and build pragmatic, cost-effective applications using Azure Functions and Container apps. Part 3 delves into data and storage, showing you how to utilize Azure Blob Storage for unstructured data, Azure SQL Database for structured data, and Azure Cosmos DB for document-oriented data. The final part teaches you about messaging and security, utilizing Azure App Configuration, Event Hubs, Service Bus, Key Vault, and Azure AD B2C for robust, secure applications. By the end of this book, you’ll have mastered Azure's responsive infrastructure for exceptional applications.
Table of Contents (20 chapters)
1
Part 1: An Introduction to Your Environment
3
Part 2: Serverless and Microservices
8
Part 3: Data and Storage
12
Part 4: Messaging Mechanisms and Security

Configuring your development environment

Setting up your development environment is essential for success because it provides you with the necessary tools and resources to efficiently and effectively develop, test, and deploy your software. A properly configured development environment allows you to streamline your workflow, automate tasks, and catch errors early on in the development process. If you’re new to coding, I’m sure you’re wondering how to set up the right environment for you so that you can get coding quickly and easily. You want to be able to focus on what matters most: creating great code!

There are many different ways to do this, but here is a simple guide that will show you how to set up an IDE for .NET programming on Azure. This guide will give you a solid foundation upon which you can build your knowledge of Python and other programming languages.

If you already have an environment setup, please note we will be working through examples utilizing .NET 6.0 in this book and that needs to be installed on your machine. If you are starting from scratch, follow the instructions below to get started.

Installing .NET 6.0

Follow these steps to install .NET 6.0:

  1. Open your browser and go to this web page: https://dotnet.microsoft.com/en-us/download/dotnet. We will primarily be working in .NET 6.0 so make sure to choose the option related to the system you are using.
Figure 1.31 – .NET Download page

Figure 1.31 – .NET Download page

  1. You need to download the .NET 6.0 SDK. Once the Software Development Kit (SDK) has been downloaded, execute the downloaded executable, which will bring up the following setup screen.

In a Windows operating system, the executable will show a welcome screen as follows (see Figure 1.32) from where you can install the .NET SDK. In Windows, it will prompt for administrator access.

Figure 1.32 – .NET SDK – Windows installation

Figure 1.32 – .NET SDK – Windows installation

On Mac machines, it will show a welcome screen like this.

Figure 1.33 – .NET SDK – Mac installation

Figure 1.33 – .NET SDK – Mac installation

In Linux distributions, .NET SDK supports two types of installation – manual installation and script installation. With manual installation, we need to download the .NET SDK, execute the files, and configure paths. In script installation, we can download a .NET installation script from here: https://dot.net/v1/dotnet-install.sh. For developers or normal users, scripted installation is recommended. Once we have downloaded the script, we need to make it executable using the chmod command, and then execute the script.

Here are the bash commands to do this:

> wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
> chmod +x ./dotnet-install.sh
> ./dotnet-install.sh

This will install the .NET 6.0 SDK in most of the Linux distributions. You can find more details about the installation here: https://learn.microsoft.com/dotnet/core/install/linux?WT.mc_id=DT-MVP-5002040.

Now that we’ve successfully installed .NET 6.0, we can continue setting up our IDEs.