28.2 F
Detroit
Monday, December 23, 2024
HomeSoftware Development Best PracticesOrganizing Source Code Libraries for Deployment

Organizing Source Code Libraries for Deployment

Date:

Related stories

Coding with A.I.

For the last month or so I have been...

Don’t cover it up

My favorite marina in Michigan is an eclectic collection...

Bands by Me

BandsByMe.com was a website that allows music lovers to easily...

Introduction

This is my personal site, with a little information...
spot_imgspot_img

This article details what I believe is the best way to organize your source code libraries in a multi-developer organization.  I do not cover how you need to organize your code within the project, the scope of this is the libraries and environments themselves and the development/release processes that use them.  It is based on my own opinions, and what I have observed being done at many organizations.  Almost every place I have worked at does this slightly differently, but I do believe that what I am about to lay out is a best practice based on my 30+ years of Software Development.

 

This is the basic arrangement of the Code Library / Environment relationship:

Source Code Library   Usage
Production This is the final release version of the code.
Staging / Integration This is the environment that contains code that is considered a candidate for release.  It is sometimes run in a “Model Office” or “Demo” environment, but the goal is to verify the code works perfectly just as it should in production.  This is where Quality Assurance testing will occur.  This environment should be very stable.
Development This is the base production environment and may contain unstable code.  It is used by developers to verify that their new code works well with the codebase as a whole.

 

Basic Organization Principals

These are the rules that I recommend:

  • One library per environment, and pushes to that environment only originate from its associated library.
  • Each development team/individual developer is responsible for promoting their own changes into the Staging / Integration library, and ensuring that only their changes are migrated.
  • There should be a designated Release manager role that is responsible for managing the Staging / Integration and Production libraries. They give permission to migrate changes into these libraries, and are fully informed as to the contents of these changes.
  • Promotion from the Staging / Integration to Production is managed, if not performed by the designated Release Manager role. This is performed after all quality checks in that environment have been passed and is always a complete merge so that Production is an exact copy of what has been tested.
  • When the Staging/Integration library has been merged up into the Production library it should also be merged down into the development library. This insures that development is being performed against the production code.
  • All work should be done on an individual branches and merged into the appropriate library when complete. Every developer should be working on their own branch so that they may check in at any time without disrupting the work of others.  If multiple developers are working on a related feature and need to integrate with each other then there should be a feature level branch, and each developer branches off of that.

 

Summary

The primary goal should be to have one source code library for each deployment environment such that at any given moment that environment can be refreshed from its library.  Release to production always originate from the Production library.  Frequent downward merges through the libraries are encouraged in order to detect any merge issues early in the development process.

 

References

Traditional Development/Integration/Staging/Production Practice for Software Development

How To: Structure Your Source Control Folders in Team Foundation Server

Terry
Terryhttps://terrycallahan.com
Software developer, cancer survivor, and recently re-enthused lover of life.

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories

spot_img