fbpx

CYBRNODE

Semantic Software Versioning: A Guide

Every software has a version. And this version should be updated whenever the software is introduced with a new feature or a bug fix. There are two types of versioning:

  1. Stable Version: The version used by the end-users.
  2. Working Version: The version which developers work on.

To set the version number of software many companies use different versioning schemes. The most famous and commonly used is the Semantic Versioning Scheme (x.y.z). There are others like Major Minor (x.y)Naming Versioning Scheme (Nougat) and Basic Versioning Scheme (1,2..). We will be discussing Semantic Versioning in this blog today.

Semantic Versioning Scheme or Major.Minor.Patch (x.y.z) versioning scheme is the method of giving the version number to the software where x denotes the Major, y denotes the Minor and z denotes the Patch.

In the example: Version (2.4.1) we see 2 is the Major, 4 is the Minor and 1 is the Patch.

What does it all mean?

Now we know how to read the version and what each number represents. Let’s take a look at what they mean.

Major:

The major number in this scheme should update when your system comes up with a very big change.

Example: when we are adding or removing a big feature to the backend application.

Minor:

The minor number updates when there is a new feature or endpoint declared deprecated.

Example: If the application does not have the login endpoint earlier and in the published application. Later on, the developers implement the login system then the developer should update the minor version number.

Patch:

The patch version number updates when the software’s bug is fixed or the performance issue is fixed.

Example: The button in the app is not working, the developer did not test it and publish the application. Later, he tested it and fixed the issue then the patch version number should be incremented.

Backward Compatibility:

Backward compatibility or Backwards compatibility is the term used when the technological product or system allows for interoperability with an older legacy system or compatible with the older or previous version of the software.

If the version number of the client/server-side application is according to the Semantic Versioning scheme (Major.Minor.Patch) and there is not any difference in major version number then both client and server-side applications are backwards compatible with each other.

If there is a difference in patch version number that occurs due to a bug fix or internal content fix or performance issue fixed then both client and server-side applications should be compatible with each other. If the developer updates the application then the end-user should be able to update the application without hesitation.

Minor updates happen when a new feature or endpoint is added to the existing software. If the minor version number is different in both the client and server applications then this means the client-side application is still compatible with the server-side and end-users or consumers can upgrade the application freely (in their own time). The developers should show a “dismissible dialogue box” to the end-users so that they remember to update the application.

Incompatibility and Solution:

An application (client-side application) becomes incompatible when the backend or server-side application comes up with a major feature or the whole application’s schema is changed.

According to the version system, the client application version is 1.2.0 and the server’s version is 2.1.0 then we can say that our client application is incompatible because its major version number is 1 and the server’s major version is 2. So, consumers should not be able to use the client-side application because it does not have those features that are on the server. This is not good for end-users because they cannot use the application anymore.

So, what is the solution to this problem? To deal with this kind of problem developers should implement a function that checks the client and server application’s major version number. If the client application number is less than the server major version number then a “not dismissable alert” dialogue should be created to alert the end-users to update the application to the new version to keep using this application or system.

Conclusion:

Developers should keep their versioning up-to-date and they should have their software products or applications check for backwards compatibility using the version numbers of the client and server-side apps to avoid any issues on the client-side. In case a version is not compatible the end-user app should prompt an update message to the user.