Part 1 of Mastering Backend Development
Hi there!?? . I am Oleksii, and here you can find articles about backend development and software architecture. I am trying to provide helpful content not only for people who have recently started their journey into backend development but also for experienced engineers. If you're new to my content and want more articles like this, click the "subscribe" button above or at Substack...
What is the backend development?
I want to start this series of articles about how to become a backend engineer or improve if you are already one by setting some foundation and describing the basic concepts. And first, explain how I understand what the backend development is.
The backend is everything behind the scenes on the server when you visit your favourite website or mobile application. It is responsible for storing and managing the data you see and use on the website. Let's take LinkedIn as an example; the backend stores information about your account and profile information, your job history search and preferences, connections and followers for your account and much more. The backend engineer's job is to ensure that information is stored correctly, secure, and accessible to the user. So this is what this series of articles will explain how to do. Let's get started!
IslandX: The Ultimate Pacific Escape Platform
I think the best way to learn something is by doing it, so I want to make it interactive and hands-on.
Disclaimer: The concepts I will cover are language agnostic, but in articles, I will use Java/Kotlin or pseud-code examples, as well as Spring Boot Framework, to illustrate an example of implementation. Articles will not cover learning Java/Kotlin or Spring Boot framework, but I will try to explain and provide links to the documentation where you can learn more about the language and framework along the way, and you can always ask me questions if something is unclear.
In this course, you will work with imaginary developer Max, who recently started his journey as a backend engineer and has an exciting project. The name of the project is IslandX: The Ultimate Pacific Escape Platform. The description of the project that he received is the following:
Last month, an underwater volcano formed a new island in the Pacific Ocean. All the conditions on the island seemed perfect, and it was decided to open it up for the general public to experience the pristine, uncharted territory. The island is big enough to host a campsite, so everybody is excited to visit, and there is already an extensive waiting list of people from all over the world. To regulate the number of people on the island, it was decided to develop an online web application to manage the reservations. You are responsible for designing and developing a backend system to manage the campsite reservations that will be able to handle the load of all the people who want to make a reservation. To streamline the reservations, a few constraints need to be in place:
Max can not wait to start working on the project and draws his first diagram to understand better what the system may look like. He decided to start with the simple architecture, which you can find in Image 1, with three components: a client represents a web interface to the reservation system, the server where all logic will happen, and the database where reservations and visitor information will be stored. This kind of architecture is called 3-tier architecture.
You can read more about 3-tier and N-tier architecture in the AWS Whitepaper: "AWS Serverless Multi-Tier Architectures with Amazon API Gateway and AWS Lambda" [1] or in the Azure Architecture Center: "N-tier architecture style" [2].
Max is responsible for developing the Logical And Data layer of the system, so let's talk a bit more about them.
The server is the brain of the application that will handle information about reservations, allow new ones to be made, and store visitors' information. Some different languages and frameworks can be used to implement this business logic; examples of some highly used pairs of languages and frameworks:
Max knows some Java and has Spring Boot experience, so he decided to use them.
For the Reservation web application to communicate with the server, Max needs to write an application programming interface(API), which can be described as a set of definitions and protocols for building and integrating application software. [3]. There are different API writing protocols:
领英推荐
To choose which to use, Max decided to read a good article from Alex Xu that gives an overview of them: "What are the API architectural styles?". After checking out the requirements and options, Max chose to start with the REST since it is commonly used for this type of system he needs to develop.
A database represents the data layer, and choosing the database for the backend system is as essential as selecting the language and framework. There are different types of databases with varying areas of application:
Then, it can be divided by structure types: Columnar, Graph, Key-Value, geo-spatial, document-based and more. The database topic has lots of information, and the choice depends on the developed system, requirements, constraints and dependencies that existing systems and infrastructure can cause, as well as the expertise present in the team. I will not focus on details about every database type, but you can check the article "A nice cheat sheet of different databases in cloud services" by Alex Xu , which can be a starting point for reading more about a particular database.
IslandX system needs to store different data, such as reservation information or visitor information, which can be structured very well, so Max decided to use a relational database and chose Postgres because it is open-sourced, has a huge community, and offers many features.
Now, when the components are decided, Max decided to go over the requirements again and identify what functionality the backend system should provide before jumping into the coding. He wrote it as a set of statements with details on what he should consider during development:
Max knows that he may have missed something, but for now, he has an idea of what he needs to develop and what the expectations are from the system. The next step is creating a project, and Max will use Spring Initializr to make things easier.
Max is leaving to create a project and prepare to write the first lines of code for this project, and next time, Max will start building his first APIs using Spring Boot and understand the different HTTP methods and statuses.
If you are unfamiliar with Spring Boot and creating services using it and want to read more before the next part, you can check out a great tutorial from Spring about Building REST services with Spring!
Subscribe if you want to follow Max's journey to becoming a great backend engineer and learn something new while creating the IslandX project!
Feel free to let me know if this interests you or if there are any suggestions or additional topics you would like me to cover as part of this series of articles.
References
[1]: AWS Serverless Multi-Tier Architectures with Amazon API Gateway and AWS Lambda, AWS Whitepapers, accessed on January 27 2023, https://docs.aws.amazon.com/whitepapers/latest/serverless-multi-tier-architectures-api-gateway-lambda/introduction.html
[2]: N-tier architecture style, Azure Architecture Learning Center, accessed on January 27 2023, https://learn.microsoft.com/en-us/azure/architecture/guide/architecture-styles/n-tier
[3]: June 2, 2022, What is an API?, Red Hat, accessed on January 27 2023, https://www.redhat.com/en/topics/api/what-are-application-programming-interfaces