What Does a Back-End Developer Do?
Topic: Team Roles
October 10, 2023
The work of a back-end developer isn't visible to the user, but it's essential for the success of a web application. I can easily prove it with the example of an ordinary car.
Figuratively speaking, everything the user sees and uses: the settings of the on-board systems, 2-3 pedals, the steering wheel, the beautiful interior - that's the front-end developer's work. Meanwhile, the back-end is all the components of the car that are invisible to the user: fuel and cooling systems, engine, transmission, ventilation and air conditioning.
As you can see from this example, without the back-end developer's work, the engine won't start and the car simply won't budge.
In the world of IT, back-end developers are invisible heroes responsible for processing user requests, working with databases, business logic and much more. Our duty is to make sure that the web resource is functional, reliable and secure.
Back-End Developer's Workflow
If the project starts from scratch, the steps for the developer are the following:
Choosing a Programming Language
Python, Java, Ruby - these are the main languages in which the back-end is written. For example, the most commonly used programming language by banks is Java because it is secure and portable. Java has many security features that are crucial for banks.
Choosing Tools
Modern developers no longer need to write code from scratch. This is how programmers worked 10-15 years ago. Today, there are many tools that simplify the solution of typical tasks. One of them provides ready-made components or solutions that are customized to speed up development. This tool is called a framework.
A framework is a structure on the basis of which a programmer can create software. It serves as a foundation, so I don't have to start my work completely from scratch. Using frameworks saves my time and reduces the risk of mistakes because they are already tested.
Developers frequently use the terms "framework" and "library" interchangeably. This is because both are just collections of reusable code created by others. Their ultimate purpose is to simplify the resolution of common problems. But there is a difference.
Libraries assist me in resolving difficult tasks that are more specific in nature. For example, recently I had to blur an image. In order to achieve this, I simply integrated a library that efficiently applies a blur effect to an image within a matter of seconds. Why did I use a library instead of writing the code myself? Because it's faster, the library is available, it's tested. The advantages, in my opinion, are clearly apparent.
Frameworks, on the other hand, carry out a broader spectrum of complex tasks. In this example, a framework is like Photoshop, which offers a wide range of tools for editing and retouching images. It helps me edit the image: change its color, size, adjust contrast… In other words, it is lots of different things in one place available at the click of a button.
Another technology that my colleagues and I cannot do without is databases, where all the information is stored and retrieved. It is a kind of Excel spreadsheet with columns (field names) and rows (e.g. user names). All back-end developers need to know how to design and query databases according to their project requirements. The acronym CRUD refers to the main operations performed by databases. These are "create, read, update, and delete" operations.
Writing Code
At this stage, I write code that communicates with the frontend and database. If code is easy to read, understand, and maintain, we call it "clean".
In addition to coding, the back-end involves creating the architecture of the application. The architecture in development defines the structure of the code. Code is usually divided into layers, each of which performs a narrowly focused task.
It is important that the database interacts correctly with the application code and is continuously delivered to the server - this is the responsibility of the back-end developer.
The interaction between the frontend and back-end occurs in a circular manner:
- The client part of the application (frontend) sends user information to the server (back-end).
- The program on the server processes the information.
- The information is returned to the client side in a format that is easy to understand.
When describing the interaction between frontend and back-end, I can't help but mention API that stands for Application Programming Interface. I know it sounds very complicated and technical, but it simply means a method or way for two pieces of software to interact. API helps the frontend and back-end communicate and exchange data with each other.
When a Back-Ender Enters an Existing Project
When the developer enters the ongoing project, whether augmenting or even replacing the existing team, the language and tools have already been chosen at this stage. Therefore, the back-end developer works according to this algorithm:
- They analyze the context of the task. If it is necessary to fix a bug, they find out its causes; if it is necessary to add a function, they look at the required code fragment.
- They propose a solution. In large projects, this stage involves a meeting with the technical lead and other team members responsible for a particular fragment of the service. In a small team, back-end developers can make a decision by themselves.
Optimizing Application to Improve its Performance
When the application is ready, and its user base grows, ensuring its performance becomes increasingly important. As a back-end developer, this task is one of my top priorities. Let me give you an example.
Some time ago, my colleagues and I developed an application for sports. The main functionality of this application was that the user could open it, see the list of upcoming games, register for any of them and then come to the game.
At some point, when the app had about 10,000 users on Android and almost ten times that number on iOS, we faced the problem of long server response times. When numerous users opened the app at the same time, the server was flooded with requests. Many requests were of the same type. We encountered a big problem: the server was slow to respond to all incoming requests.
When so many people were using the application at the same time and so many requests were coming in, the back-end did not have time to respond to them. As a result, a person saw a loading wheel on the screen and nothing else happened. Of course, this annoyed the users and caused anxiety for the application owner. At this point, we started thinking about back-end optimization. What did we do?
We chose to optimize a query that was received by the server. In addition, the server was equipped with optimizers that played a crucial role in preparing the responses. How did this work? Instead of sending each query individually, we collected a whole "set" of queries and sent them to the server. In return, we received a whole "set" of responses. The result was that the back-end optimized and sped up the application: users now only had to wait a second to receive a response.
When we have a lot of one-type queries, the smart database stores the answers from the queries and does not search for them itself. It gives the answer from the cache, which is a hardware or software component that stores data so that future requests for that data can be served faster.
Testing Application Components
With complex databases and large amounts of data, back-end testing is an important step on the path to a high-quality application or website. Testing ensures that my code works as expected.
The most common development process looks like this: write code → test it → see what did not work and fix the code. And so it is repeated until all the tests work. However, there is also a reverse approach called test-driven development (TDD). This is a software development practice that focuses on writing tests before writing the actual code.
When I have a task, I write a test first, and only then I write the code. If the test passes, it means I have already written the right functionality, the right code. For example, I want a button to change its color to green when clicked. I write a test that presses the button and sees what color it is. At first, I have no code, I run the test, it clicks the button, nothing happens, it writes "I failed this test".
Then I write in the code "change color when button is pressed". I run the test, the button is pressed, the color changes, but it's not green, it's yellow. Then I write another code "change color to green". I run the test, the test is successful, that means I've completed the task. When I press the button, it turns green.
Challenges and Struggles
Working as a back-end developer can be quite challenging, as each project comes with its own unique set of obstacles and hurdles. Some of the biggest challenges include:
- Crashing servers. A server can fail at any point in time. Not only the server, but also unhandled errors, network problems and many other things can crash the application.
- Complex business logic. Back-end developers play a critical role in implementing complex business rules and logic that drive application behavior. Striking a balance between flexibility and maintainability while ensuring code readability can be quite a difficult task.
- Scalability. Developing a back-end that can handle a large amount of traffic and data is a big challenge. My colleagues and I need to ensure that the system can scale up or down quickly and efficiently.
- Security. It is critical for back-end developers to ensure the security and protection of the system from malicious attacks. This includes implementing security protocols such as encryption and authentication, and regularly updating the system to counter new threats.
- Integration. We need to integrate multiple systems and technologies, which can also be a challenge. They need to ensure that the various components can communicate seamlessly with each other.
Conclusion
At first glance, the back-end developer's job seems very demanding. There is some truth to that, but it is also very interesting. In my opinion, it can be compared to playing Lego. Although there are various blocks available, they are unable to perform any function on their own. A back-end developer is a person who uses blocks of a certain color and shape to create a stable construction. These blocks are the elements of frameworks and languages.
Lego blocks are versatile and reusable. You can disassemble a structure and use the same blocks to build something entirely different. Similarly, programming allows you to reuse code components across different projects, saving time and effort.
If you have ever played Lego, you probably remember how addictive and challenging it is. It's impossible to tear yourself away from the game until you see the assembled object, with each piece in place and performing its function. Programming is also a very challenging and rewarding experience. When you finally write code that works as intended, it is such a satisfying feeling.