Getting set up
You can create your backend, API, and frontend on any operating system you like. For this book, we’ll be creating all three on Windows, using Visual Studio 2022, the latest Postman, and Dapper as a simple Object Relational Mapper (ORM) to make our lives easier. There are a few other simple tools we’ll be using, so let’s get you set up.
Downloading the free software you need
To get started, if you don’t have Visual Studio installed, go to https://visualstudio.com and click on Downloads (this site changes frequently but the basic steps remain the same). You have three choices of which version to download: Community, Professional, and Enterprise. The Community version is free and will provide all you need to follow along in this book.
When you click on your choice, Visual Studio Setup will download to your downloads
directory. Double-click on it and click on Yes at the security prompt. The installer will update itself and then will begin the installation. This can take a little while, but don’t go away as you have some selections to make.
Note
If you have Visual Studio installed but for some reason want to install the Community Edition as well, that is no problem as they can run side by side.
A menu will appear similar to Figure 1.1 (if it does not, click Modify).
Figure 1.1 – Setting up Visual Studio: please note that this screenshot intends to show the layout, so text readability is not essential
Be sure that ASP.NET and web development is checked. Scroll down and check Data storage and processing (if you are short on disk space, skip this one). Once you are satisfied, click on Install while downloading and then click on Modify.
SQL Server will be installed for you, as will SQL Server Management Studio (SSMS). You will typically interact with SQL Server through SSMS. We will look at how to work with this tool, and all the others, as we go.
Your next tool is Dapper. This is a small, lightweight ORM (often called a micro-ORM) that does one important part of the work of the much bigger SQL platform, Entity Framework, but with much less overhead. Specifically, Dapper will map queries to objects.
Since our needs will be minimal, Dapper will be more than enough. You can read more about Dapper here: https://www.learndapper.com/.
We will mimic our user interface with Postman, which we will also use for end-to-end testing. You can get the latest version of Postman at https://postman.com/downloads. You can also access Postman through your browser, but we’ll be using the downloaded version.
Postman is surprisingly powerful, and we will review how we will use it as we go along. That said, we will only scratch the surface of what you can do with this tool, so at some point, you may want to read the documentation.
We will be using Swagger for documentation (see Chapter 4), and the built-in logger functionality for (surprise!) logging errors and issues that will not be surfaced to the user, but which will be useful for you as the programmer.