Backend development process. What does it look like and how to plan it effectively?

--

Backend development process. What does it look like and how to plan it effectively?

The backend plays a crucial role in the functionality and performance of an app. It involves designing and building the server-side of an application, which powers the app’s logic, database, and integrations with other systems. Choosing the right team, tools and approach is crucial and it will have an impact on the whole lifecycle of the project.

How to effectively plan backend development?

Define your needs

When you want to build your awesome mobile app, you probably know what it should look like. You also have some idea of how it should work and what core functionalities it should have. With near to 100% certainty you will need a registration/login feature and other personalized settings for users. In most cases, all data the user provides will be stored somewhere and then read by the app. It is worth researching the market and estimating how many users may use your application and what new features will be implemented in the future.

Make sure you answered the following questions:

  • What functionalities will your app have in the first version?
  • What functionalities will you implement in the future?
  • How many users will use your app?

Answering them will help you make the right decisions when choosing a tech stack.

Choose the right tools

Choosing mobile technology is relatively easy because we have two main platforms — iOS and Android. On the backend side, it’s a little bit more complicated.

Programming language

First, the right language must be chosen: JavaScript, PHP, Python, Java, Go etc. This decision will have an effect on all future possibilities and limitations.

API

Next, it is time to specify the type of API (Public, Private, Partner, Composite) and its architecture (REST, SOAP, RPC, GraphQL).

Now: the runtime environment, framework, and basic libraries that can speed up the process of creating an API. For each language, there is usually one runtime environment, at least two frameworks and countless numbers for libraries.

Operating system

Then it is good to find the best operating system. Here it is a simple choice: Linux or Windows. In the case of Linux, we need to specify the distribution (RedHat, Fedora, Debian, Ubuntu, etc.) and its version. To avoid being locked into a single operating system, developers often use Docker — a tool that allows them to create a small virtual system just for development purposes.

The API will probably need a database, so in front of us we have another important decision to make: how data will be stored and what engine we can use for it? We can use one of these: MongoDB, SQLite, MySQL, PostgreSQL, Microsoft SQL Server, Oracle, etc.

All these decisions form what is known as a tech stack.

Coding

Before writing the very first line of code it is good to think about how to organize a project. A developer has to think about the folder structure, which paradigm to choose (functional or object-oriented programming), and which design patterns will be appropriate.

Another thing is the methodology. There are at least three: TDD (Test-Driven Development), BDD (Behavior-Driven Development), and DDD (Domain-Driven Development). Each of these has its pros and cons.

It is also good to follow a few principles like SOLID (five code design principles), KISS (Keep It Simple Stupid), and DRY (Don’t Repeat Yourself).

Saving the working results

You may think the hard drive or a pendrive is a good place to save your working results. It’s not so bad but think about a situation where you have to share files with other developers. Ok, you could use shared folders, samba, or an FTP server. What if you want to undo the last changes? You couldn’t. Here the versioning system comes to play.

There are two main version control systems: SVN and Git. SVN is a little bit older than Git, but Git gained popularity in the last decade. Git allows you to create code repositories and save working progress, merge changes with others, undo them or even create separate parallel copies as branches.

Deployment

It is time to deploy the code into the world. Nowadays we have many cloud platforms like AWS (Amazon Web Services), Google Cloud, Firebase, DigitalOcean, Heroku, etc. All have their entry-level complexity and need proper skills to manage them.

DevOps have to configure all services you need for the project, eg. compute cloud/engine, storage and database. In this step, we usually set up two environments: prod (what all can use) and stage (to show changes to the client and for testing purposes). Then we should solve how all changes from the code repository will be delivered to the public server. This process describes CI/CD.

CI/CD

The CI/CD term stands for Continuous Integration / Continues Delivery. While CI is responsible for building code and testing it (with automatic tests), CD takes care of the build delivery to the server. Again, we have plenty of tools that can help us like eg. Jenkins, GitLab, CircleCI, TeamCity, Bamboo, etc.

Monitoring

To minimize the risk of sudden interruption on the backend, DevOps uses monitoring systems to analyze the utility of resources. Many cloud platforms have built-in solutions but if there is a need to use custom tools we can choose one of these: Sematex Monitoring, Prometheus and Grafana, Dynatrace, Datadog, etc.

Conclusion

As you can see, the process of creating an effective backend for a mobile app isn’t an easy task. It requires a wide knowledge before the first line of code will go public. To be successful make sure that all steps were carefully planned and the right decisions were made.

Originally published at https://fivedottwelve.com on March 3, 2023.

--

--