Day 051 - Exploring SCM in more detail
I left off yesterday around page 418 in the tutorial, although I really hadn't been following it strictly at that point. This is the section on SCM, the Source Code Manager.Â
WinDev is very much an everything-in-the-box kind of product. It uses its own version control/source management system, it's own project planning system, it's own SQL database (although you can certainly use other databases), and so forth.Â
To have these kinds of support modules right in the product is usually something of a mixed blessing.
The typical upside is tight integration with the IDE; there are no kludges required. WinDev certainly fits the bill there.Â
The usual downside is that because of the scope of any decent development environment, the particular implementation of the support module may be less feature rich than the kind of thing you could find in the third party market. Take version control, for instance. I think it would be pretty cool if I could use Git together with WinDev, so I could host a WinDev repository on GitHub, something like the DevRoadmaps Clarion Library on GitHub. But that's not an option; the only way to host a publicly-accessible WinDev repo is via SCM itself. That's fine, but SCM isn't a distributed version control system, it's a centralized version control system.Â
Actually, it is possible to host WinDev code on GitHub or other such sites, but as WinDev stores components (including procedures and classes) as binary files you also lose the ability to actually see what you're using until you've downloaded and imported it, and the process is a hassle.
Similarly, there are any number of products out there for project planning, feature tracking, customer support etc. There are all these different products precisely because there are so many different ways to go about the work, and some products suit some situations and some developers better than others.Â
That said, it's definitely a plus to have these kinds of features in the box, and I hope if you've never used any project management tools in your development that you'll reconsider. Definitely the first place to start is with SCM.Â
Automatic checkout
SCM is even easier to use with automatic checkout. When I first tried SCM I got that little checkout dialog box every time I started editing/changing something. Go to Tools | Options | General options of WinDev:
After setting that option I didn't see the warning dialogs, but I still got the checkout dialog whenever I attempted to modify something that wasn't already checked out.Â
If, for instance, I modified a class and then closed it, that didn't automatically check it in. But I did get a warning when I tried to close the project that I had checked out elements, and did I want to check them in?Â
If you're working in a team environment, and there's any possibility that more than one person could be working on the same program element, you'll need to keep that in mind and not keep things checked out longer than necessary (as in don't leave items checked out when you go home for the day).Â
SCM has something called Master/Guest mode, which is really only suitable for a single developer. In Master/Guest mode, only the master can post changes to SCM. Guests can still check out modifications, but their own changes will be ignored by SCM. I'm not completely clear on when this would apply, but perhaps it's suitable to in-house development where only one person makes changes but others want to regularly get updates via SCM.Â
Opening a project from SCM
I had previously added a project to SCM and from that point on I'd just opened it as usual. But the tutorial instructed me to use the SCM | Open a project from SCM menu item. This confused me a little, as previously I'd just opened the project in the usual way, and had been able to check items out/in. Had I done something wrong?
When I attempted to open my just-added project via that menu option I got this window:
So if you've added the project yourself, or you've previously opened it from SCM, you don't want to do that again unless you've made some horrible mistake and you want to obliterate your local copy.
There are additional SCM configuration options under Project | Project Description:
Under the SCM menu you can also find options to disconnect from/reconnect to the server, as when you are mobile and want to continue working but will not have any networking capability.Â
And finally there is an SCM administrator, which lets you maintain repositories and which also supports branching.Â
There's lots of good stuff worth exploring in SCM. And remember, this isn't just for teams. Single developers can also benefit greatly from source code management.Â