OpenInsight 10 Alpha – Version Control with Git
At the conference Bob Carten gave us an introduction into how Git and OpenInsight 10 will work together hand in hand. For those that don’t know, Git is an open source version control software that is widely used in many languages and environments. The user base ranges from students to companies like Google, Microsoft, and many others. In this article we will be summarizing what is Git, what is new in OpenInsight 10 in regard to Git, why OpenInsight developers should be excited for this feature, and why this feature isn’t only for team development. We highly recommend that all Revelation WORKS subscribers check out Bob’s PowerPoint presentation as he provided a fantastic overview of Git, a tutorial on how to configure Git for use with OpenInsight 10, and he made the case for daily use.
What might be unknown to much of the Revelation community is that this is not the first time that Git is being introduced to OpenInsight. David Goddard created the first OpenInsight Git module back in 2013 and while there were a few issues with integration into 9.4, it proved that OI and Git could be used together to do something great. Now with OpenInsight 10, Git is no longer a module but rather integrated into the heart of the product. But let’s review what Git is before we talk about changes in OpenInsight 10.
What is Git?
The Git website gives the following definition: “Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.” This idea of a version control system should not be too foreign for OpenInsight developers as we have had similar features going all the way back to OpenInsight 2 with the Check In / Check Out system. One could even make an argument that back when OpenInsight had the name “OpenInsight for Workgroups” we were using a distributed version control system in that Workgroups would manage their groups’ code and make “push” or “pull” calls against the master repository as needed.
What does Git do and not do?
Git is a very powerful tool but it requires an understanding of exactly what Git does. Git synchronizes files in a specified set of folders and it tracks changes and holds onto previous versions of the files. This makes it invaluable tool for tracking changes done in a product and being able to quickly review or restore previous versions. In most cases this is used in team environments where multiple programmers are working on a product.
|OpenInsight 10's Role||Git's Role|
|Create, edit, and compile source||Supply version control of source|
|Understand dependencies and inheritance||Enable pre-developer repository|
|Build the application||Allow building modules in isolation
but keep pulling other updates
|Deploy compiled components||Distribute development around the world|
Git is NOT an editor nor compiler. It also does NOT do what the OI repository does. Git’s main job is to tell you what items have changed and gives you the tools to control development.
What is new in OpenInsight 10?
Git in OpenInsight 10 is integrated into the product rather than being an add-on module like it was for 9.4. This means Git is now a main drop down menu in the IDE and now provides support for more than just stored procedures. This is a huge advantage over the previous version of Git for OpenInsight 9.4.
Why should OpenInsight Developers be excited?
We are often dealing with situations where developers are working from satellite offices, home offices, or remote locations. With the ever increasing amount of people working from various locations, it makes managing who is working on what code that much harder. This is where Git comes in. It not only contains the master repository but also manages code check in/outs, documentation, and version history in a single location.
A perfect example of this in practice is what Bob Carten shared with us at the conference. Revelation developers are currently using Git in the process of developing OpenInsight 10. Since the OpenInsight 10 team is located in various locations and time zones, they needed a centralized service to connect into and keep things updated. Bob explained that each morning the developers connect into the Revelation Git server, review the most recent changes, and pull the updates they need from the Git server. This allows any team member to instantly be on the same version of the development project as everyone else in the team. When a team member is done for the day, they simply commit their changes to their work and push it up to the Git server.
Not just for teams!
Not a part of a team? Git is still a major asset to you. Have you ever made a copy of a stored procedure and added the current date as an emergency backup just in case whatever code changes you make breaks the program? Or better yet, have you ever made code changes and forgotten to make a backup copy only to be scrambling to try and remember what you changed in code that brought the system to its knees? Git solves this problem for you. Git allows you to keep version history of all changes made and makes it easy to reference past changes, thus allowing you to not only find the recent changes but easily restore them back into the system to recover from a mistake.
How to prepare for OpenInsight 10 and Git?
You can start brushing up on Git by using various tutorials online. Bob recommended Ry’s Git Tutorial as a good starting point. This guide not only explains Git terminology, but also the methodology and tips on integrating Git into your daily programming routine. Also, if you are a WORKS subscriber you are able to test out Git in the OpenInsight 10 Alpha build. As previously stated, Revelation is currently using Git to manage their OpenInsight 10 development so in turn you can start experimenting in OpenInsight 10 Alpha and give Git a test drive.
If Git sounds like a valuable addition to OpenInsight, you will want to watch our blog for further articles regarding Git install tutorials and the tools we use at SRP to manage our Git repositories and keep the whole team on the same page.