Welcome to the ninth episode of my course “Becoming a software developer”, which is the beginning of creating HTTP RESTful backend application based on ASP.NET Core framework.
We’ll be creating the web application which acts as an HTTP RESTful API that can be understood as a gateway to our whole system. We won’t focus on the front-end part at all, instead, we’ll build a web service API that can be consumed literally by and end user able to perform HTTP request (web application, mobile or desktop application and so on).
Application will be based on the latest version of ASP.NET Core framework, that is great choice either for creating HTTP API (like we will) or also the web applications that can return HTML views (by using Razor engine). During the course, we will explore both features and possibilities that are baked into this powerful framework.
Application is named Passenger, and it will allow e.g. to register a new driver, that goes from point A to B (for example to his workplace) and there will be passengers, who can ask a particular driver to pick them up at the specific location, and if he accepts their requests, all of them will share the same vehicle in order to reduce the costs related to travelling.
Source code will be available at our GitHub repository, thus you need to have a very basic knowledge of using Git in order to get the latest version of source code. Alternatively, you can click on the “Download ZIP” button in order to get the latest changes without using Git at all.
We will use a built-in issues and the extension named ZenHub in order to have a board that will help to organize the list of tasks and we will also use the so-called smart commits containing messages referencing to the particular tasks by their identifiers (e.g. “Fixed user service #15”).
We will make use of the Onion Architecture which may look difficult at the first sight, yet it’s actually simple and still sophisticated enough in terms of layering, maintainability, extensibility, loose coupling and high cohesion. We will apply some of the core concepts of Domain Driven Design (DDD) and other good patterns and practices, that can be successfully used whether you’re building the small or large-scale applications.
- Passenger.Api – actual HTTP API based on ASP.NET Core. References Infrastructure.
- Passenger.Core – core which is the actual domain of our application. Does not reference any other project.
- Passenger.Infrastructure – application services, implementation of domain models, repositories and so on. References Core.
- Passenger.Tests – unit tests.
- Passenger.Tests.EndToEnd – integration tests.
In the next episode, we’ll create our first domain models, repository, application service and a simple controller returning the user account.