On Oct 23, 2018, at 2:00 PM, Tom Benedict wrote: > Dani Beaubien writes: >> >> I use the external git client for diffs against historical commits and I use >> the >> Code Analysis component for diffs between what is in the 4D structure >> compares against the last export to the external folder. > > We did a similar thing based on Thomas Maul's MethodHistory component. We > added a UI and integrated it into our semi-automated build/version tracking > process. Compare method versions on screen filtered by date/version. > >> Works quite well. Definitely a few extra steps but benefits to be able to go >> back >> in time and see the change history tied to code commit is amazingly useful. > > We use it for pre-release code review as well as post-release > troubleshooting, if needed. It helped improve code quality on an 8 developer > team.
I did a similar thing. I took Thomas Maul’s component and then customized it to suit my needs. I basically wanted to have a “Show History” option available in any open method window in Design. Accomplished that with a macro that calls a method to display a window with the current version of the method and the previous version of the method diff'd. It uses a JSON library to do the diff. Also a dropdown menu to select older versions of the method to compare and a “Copy” button to bring back older versions. I decide when I want to take a “snapshot” of the database and save the current version of each method. I usually do this just before I build and deploy a new version. But I can also save a version of any method at any time I want with another macro call from an open method window. At first I built this thing to create thousands of text files of all the methods in hundreds folders all organized so that I could use GitHub to store the method text and do the diffs and all the things everyone says is so fantastic and cool and just must be done if you want to be a REAL developer. I gave up on that because it is was becoming a large amount of work automating all of that and testing it and getting it all working and you still have to wander around on the website or with separate diff tools to get what I wanted which was “open a window showing the current version of a method and let me compare and diff it against previous versions.” I ended up with a very simple to use and maintain system that uses a 4D external database. Yeah, remember those things that’s been around for many versions that you can only access with SQL? Turned out it was so much easier to deal with, control and maintain than the whole GitHub thing. And it’s easy to add indexes to these external databases via SQL code so look ups are super fast. This also works with 4D Team Developer so that a group of developers I work with can use it from 4D Client. Same code works on 4D or 4D Client. Everything is stored on 4D Server in a single folder named “Method History” that contains 3 files: Method History.4DB, Method History.4DD and Method History.Match. So before you decide that you have to do GitHub because that’s what everyone says you should do, consider what you really want and really need and weigh that against how much work it’s going to take to accomplish that. Of course I know some love to spend tons of time building super complex things because it gives them great satisfaction, but I’ve got other more fun and interesting things to do with my spare time. :) Tim ***************************************** Tim Nevels Innovative Solutions 785-749-3444 [email protected] ***************************************** ********************************************************************** 4D Internet Users Group (4D iNUG) Archive: http://lists.4d.com/archives.html Options: https://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

