Magento has always been an open source platform. If you ask me, this fundamental tenant of the software is likely the biggest contributor to the platform’s success.
With Magento 2, however, this open source ethos has been taken to the next level. Now, the source code for the software is hosted on GitHub, where a dedicated “Community Engineering” team is responsible for triaging issues and pull requests contributed by the Magento community.
In this post, I’ll discuss how being available on GitHub has changed the Magento development experience at Something Digital, for the better.
A New Approach To Implementing New Features / Platform Improvements
In the Magento 1 days, if you wanted to add a new feature to the Magento platform, the approach was simple. Build a module to implement the desired functionality and install it on the code base in question. At Something Digital, we’ve done that countless times. In fact, we have made many of those publicly available on our GitHub page, and there are even more that we’ve decided to keep private.
With the Magento 2 code base being available on GitHub, however, things have changed. Now we’re presented with a few options…
1. Custom build and install a module as we would have done in the pre-GitHub days
2. Contribute the changes back to the Magento code base via a pull request and upgrade when the changes become available
The main benefit of the latter option is that the code we write and submit via a pull request becomes an official part of the Magento code base. As such, we do not have to worry (hopefully ?) that future changes to the Magento code base will break our customizations. Further our changes are now available to and will be used by the Magento community, meaning Magento core developers or Magento community contributors can enhance or bugfix the changes we introduce.
The main downside to the second approach is that going through the code review / release process adds some additional time to the overall turnaround of the change which may or may not be tolerable. However, while the changes are going through review, we can generate patch files to apply to our client’s sites, prior to upgrades being available through official Magento releases.
As you can imagine, we typically favor the latter option whenever possible.
Another major improvement that has come with GitHub hosting is GitHub issues. While there are many channels for “Googling” Magento (StackExchange, Magento Forums, various blogs), GitHub issues provide a unique environment that is unparalleled by any other.
Among other things, issues on GitHub provide references to specific lines of code, labels and responses from Magento core engineers, and workarounds identified by community members. They’ve been invaluable for our team to get to the bottom of issues reported by our clients.
Git Blame / Pull Request Audit Trails
Finally, by being on GitHub, we are able to use the powerful Git tools such as git blame to understand the code archeology of any and all code in the Magento code base. We can then review commit messages and conversations about the changes that happened via a GitHub pull request. Again, this has come in handy more times than I can remember.
All in all, being available on GitHub has been very beneficial to our development process at Something Digital. If you’d like to continue the conversation feel free to hit us up @SomethingDigitl on Twitter or on our contact form!