Development Staging Explained

Development staging is where code is tested before it goes live to users. Learn the difference between development, staging and production environments.

Written by Milecia McGregor
Published on Aug. 05, 2024
Developer staging code
Image: Shutterstock / Built In
Brand Studio Logo

There are three different environments that you’ll work in at some point as a software engineer: development, stage and production. 

What’s the Difference Between Development, Staging and Production Environments?

  1. Development environment: The development environment is where code is written and tested without making changes to the main codebase. It’s typically connected to a local or dummy database. 
  2. Staging environment: This is where code is connected to the main database for testing and demos. It’s the step before the code is put into production.
  3. Production environment: This is where users access the final code after all of the updates and testing.     

Each environment has its own properties and uses, and it’s important to use them accordingly. Once you know what the environments are used for, it’ll make sense why we have so many of them.

 

What Is the Development Environment?

The development environment is the one that’s on your computer. Here is where you’ll do all of your code updates. It’s where all of your commits and branches live along with those of your co-workers. The development environment is usually configured differently from the environment that users work in.

It’ll be connected to some local database or a dummy database so that you can write your code without messing up the real data. Since there will be multiple people working in the development environment, you’ll also handle any branch merging.

Nothing you do in the development environment affects what users currently see when they pull up the website. This is just for you and the other web devs to see how new features will work and to try out improvements.

A lot of preliminary testing will happen in this environment. You don’t want to release your code before you make sure it works locally at least. Go through your code as thoroughly as you can so that you limit the bugs that squeak through to the next environment.

More on Software DevelopmentWhat Is Duck Typing in Python?

 

What Is Development Staging?

The development staging environment is where you test the code before you deploy it in the production environment. You’ll have all of the code on a server this time instead of a local machine. It’ll connect to as many services as it can without touching the production environment.

All of the hard core testing happens here. Any database migrations will be tested here and so will any configuration changes. When you have to do major version updates, the stage environment helps you find and fix any issues that come up, too.

If you have a client, this is when you would be able to give them a demo of how things work and look. They will be able to see how things will work when they make it live and they will be able to give you any feedback you need. Think of the stage environment as the place you do the last checks and you polish things up.

An explainer on development staging environments. | Video: Mehul — Codedamn

More on Software EngineeringWhat Is an Integrated Development Environment (IDE)?

 

What Is the Production Environment?

Every time you talk about making your project live, this is the environment you’re talking about. The production environment is where users access the final code after all of the updates and testing. Of all the environments, this one is the most important.

This is where companies make their money so you can’t have any crippling mistakes here. That's why you have to go through the other two environments with all of the testing first. Once you’re in production, any bugs or errors that remain will be found by a user and you can only hope it's something minor.

Some people like to do roll-outs to the production environment. That means they release changes to a few users and gradually roll them out to everyone. Not all of your updates have to be released into the production environment at the same time.

In some cases, you might roll out your changes on a schedule to handle load issues or to make sure that there aren’t any major issues sneaking through. You can release changes to the production environment without going through the stage environment if there’s an emergency, although it’s not something you want to do regularly.

Different organizations will deal with these environments in their own ways. Some of them have different names or there may be more environments than these. Regardless, you know what you need to in order to make the best use of each of them.

The stage environment can be a pain sometimes. It takes so much work to set up this fake production environment and write all of the tests for it. But it’s worth the time. It’s better to get this step over with because it’ll save your butt more than you’ll ever know.

Frequently Asked Questions

The development staging environment is a fake production environment where developers can write tests to find bugs and polish the code before it goes live. Once the code is cleared of any bugs, it is put into deployment, which is where the code goes live and users can engage with the application.

Developers work in three main environments:

  1. Development: This is where they work on a local machine to write and test code
  2. Staging: This is where the code is integrated into the database to run tests before it goes live.
  3. Production: This is where the code is pushed into deployment and users engage with the live application.  
Explore Job Matches.