Git-ing your Power Platform solutions under control
What Is Source Control
Source control is a practice used to track and manage and changes within a solutions source code during a solutions lifecycle. With the ability to have multiple developers working on the same project, it makes development collaboration much simpler ensuring that each developer’s code does not conflict and streamlines the merging process later on.
And This Links To Power Platform How?
When developing solutions within Power Platform, including a source-control strategy is incredibly beneficial to a solutions application lifecycle. Imagine it like this… You are building an inventory solution that not only manages your stock and warehousing, but incorporates PCF components, and a Power Page portal to receive incoming goods with barcode scanners. Now that we’ve introduced some products and components that use pro-code, you can start to see why it would be ideal to have a single secure place to store your solutions code. Now expand on that and picture you have other developers on the project, each working on a separate part of the solution, hence you now have collaboration. See where I’m going with this?
DevOps is a great tool to use for your source control. Removing source-control from the picture for just a sec, Azure DevOps also includes features such as Boards, User Stories, Wikis, Pipelines, Releases, Test Plans and so much more. If you do go down the Azure DevOps route, definitely make use of all it has to offer. But going back to source-control, within DevOps, developers can also set up repositories for where they can store their code. More importantly, a location for where you can manage collaborated code, changed code and the source of truth, production code. There are other DevOps tools out there such as the very popular GitHub and Atlassian. Similar to Azure DevOps, developers can also setup collaborative repositories and pipelines. But let’s stick with Azure DevOps for now and chat about the importance of source-control:
Single Source Of Truth
When developing scalable solutions with plans to apply enhancements and featured releases, you always need to separate your production code and the code you actively working on. Putting side your ninja coding skills, we’ve all made mistakes. That’s why you store your successfully tested code in a separate repository, knowing that should anything ever happen, you’ll always have the latest and most viable code to rollback to.
As mentioned before, collaborating with other developers on the same project occurs very often and helps delegate tasks across a functional team. With this in mind, having a designated repository branch for each developer to store their development code without interfering without other developers is a great idea. This also makes it easier to merge code changes later on. With further abilities to review and approve pull requests, streamlining your development process becomes much more efficient.
In addition to having a structured repository to house your code, Azure DevOps also offers the incredible ability for users to track changes made to your code over time. This not only includes the changes made, but also details as to when the change was made and by whom. This becomes incredibly useful with larger complex projects when you have multiple developer working on the same code.
Touching on collaboration, project admins can also assign code reviews to various developers before completing a pull request. This ensures that when a pull request is approved, the code can be merged without conflict ensuring your code is clean, optimized and has followed a structured ALM process. When your code has been merged with another branch, be it test or production, you can continue development knowing that your tested code still sits in an approved location should you need to rollback.
Not really source control, but with Power Platform Build Tools, you can also apply integration and deployment strategies into your project. This opens the door to automation offering the ability to pack and unpack your solution into appropriate branches, as well as creating and assigning pull requests to merge code. Using Azure DevOps integration tools can also help streamline your deployment processes and save you time with predefined automated testing.
Source-controls partner in crime, version control. These two go hand in hand. Should mistakes be made, or bugs appear, you can rest assure that with your implemented source-control, you will always have the latest, best working version to roll back on. Once you’ve rolled-back, you can also review the changes/differences to identify why an error occurred.
Whether you go the Azure DevOps route, or the other popular GitHub route, understanding the importance of source-control and how it plays a major role within Power Platform solution development can help you manage your projects and streamline your code. Yes, source-control is a more pro-code orientated framework, however, it can, and should be applied to your low-code solutions thus creating a more structured and managed ALM Governance Framework.