ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WEBDEV concepts / Part 3 - Development environment
  • Source Code Manager
  • Overview
  • Principle
  • Creating a repository for the SCM
  • Overview
  • When to create a repository?
  • Backups
  • Configuring the project to work with the SCM
  • Adding a project to the SCM
  • Sharing resources
  • Working with the SCM
  • Project options related to the SCM
  • Checking out an element
  • Checking an element back in
  • Project management modes
  • Working in offline mode with the SCM
  • SCM administrator
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
8. Sharing a project in practice
Previous pageTable of contentsNext page
The development of a large IS system requires the participation of multiple developers. These developers must work on a single WEBDEV project and share different resources (queries, classes, etc.).
To share a project, you can use the Source Code Manager.
Source Code Manager

Overview

WEBDEV innovates in teamwork management with the Source Code Manager (SCM).
The Source Code Manager (SCM), which is fully integrated in the environment, is used to:
  • make teamwork easier and faster,
  • store the history of changes and versions,
  • save the sources of the development team automatically.
Designed for teams between 1 and 100 developers, the SCM promotes and standardizes the collaboration between developers (even when developing alone, the SCM is useful because it contains the history of your applications).
The SCM uses a repository: procedures, classes, pages, reports, components, analyses, etc.
You can choose between a repository:
The SCM can be run locally or remotely, via Internet or via an HTTP or HTTPS connection. This feature enables you to work on a project from your office or from a remote site without losing any changes.
The SCM can also be used in offline mode.

Principle

Setup
All project elements are saved in the repository (on the server). This operation is performed when creating the project or when importing an existing project into the Source Code Manager.
Each developer who uses the Source Code Manager retrieves a local copy of the project.
Use
To work on a project element (window, page, report, etc.), the developer must check out the element from the repository, modify it and check the element back in.
If the element is already checked out, the developer can send a message to request that the element be checked back in.
To use the latest version, the other developers must synchronize their local project with the reference project (located in the repository).
Tips
The sources of your applications are essential.
These sources must be handled with great care!
Tips for configuring the server that will host your sources:
  • Use a dedicated server with a disk with enough space (at least 200 GB).
  • Use the Source Code Manager (SCM) in Client/Server mode.
  • The hard disks may encounter physical problems: use a RAID I system on your server (several disks that store the same information).
  • Use a UPS to protect the power supply of your server.
  • Make backup copies of the repository on a regular basis (at least once a week).
  • Place the server in a "secure" area and use a firewall.
Creating a repository for the SCM

Overview

To share a project via the Source Code Manager, a repository must be created. This repository must be created once only on the server.
The operating system and file system on which the repository is installed must support files exceeding 4 GB.
The repository can be created:
  • via SCMDrive, a "turnkey" solution (recommended). In this case, a shared server is used. This paid solution simplifies all the SCM server setup operations. For more details, see SCMDrive.
  • via PCSCloud, a "turnkey" solution. In this case, a dedicated server is used. This paid solution simplifies all the SCM server setup operations. You will use a platform adapted to your needs. For more details, see PCSCloud.
  • on an HFSQL Client/Server server: the repository will be in HFSQL Client/Server format. In this case, you must specify:
    • the server,
    • the database,
    • the port used,
    • the name and password of an HFSQL database administrator.
  • locally, in a shared directory on the network: all the SCM users must have full rights on this directory. The repository will be in HFSQL Classic format.
    Simply specify the network directory where the repository will be created.

When to create a repository?

The repository must be created only once.
WEBDEV allows you to create this repository at different times:
  • when installing WEBDEV.
  • when creating a project that uses the SCM.
  • when importing a project into the Source Code Manager.
  • in the SCM administrator directly.
Once the repository is created, all shared WEBDEV projects can be imported into it.

Backups

We advise you to make backup copies of the repository on a regular basis. These backups can be performed via the SCM administrator.
Configuring the project to work with the SCM
Some operations are required before an existing project can be used by the Source Code Manager.

Adding a project to the SCM

To add a local project to the SCM:
  1. Open your project in WEBDEV.
  2. On the "SCM" tab, in the "Add project" group, click "Add project to SCM".
  3. In the wizard, select the repository to be used:
    • A new repository. In this case, select the type of repository you want to create (SCMDrive or PCSCloud, Client/Server or local repository). Provide the required information according to the chosen option.
    • An existing repository. Simply select the desired repository.
  4. Finish the wizard. The project is added to the SCM.

Sharing resources

A first project was imported into the Source Code Manager. This project contains elements shared with other projects (classes, pages, procedures, style sheets, etc.).
Sharing is an important concept of the SCM. There are several methods to share resources. For more details, see Configuring an existing project for the SCM.
Working with the SCM

Project options related to the SCM

Several options are available to configure a project handled by the Source Code Manager. These options are grouped in the "SCM" tab of the project description ("Project" tab, "Project" group, "Description").
  • Propose to get the latest version of the elements when the project is opened:
    When opening a project located in the SCM, this option prompts you to get the latest version of the project elements.
    By default, the latest version of the elements is automatically retrieved.
  • Suggest checking the elements back in when the project is closed:
    When the project is closed, this option displays a list of the checked out elements to check some or all of them back in.
    By default, when the project is closed, the checked out elements are not checked back in.
  • Check out/Check in the project automatically:
    This option is used to automatically manage the "project file". If this option is checked, the project file is checked out only if the action performed requires it. Once the actions have been completed in the project, the project file is automatically checked back in.
    This option disables the "Master/Guest" management on the project. This option can also be enabled on the "SCM" tab, in the "Project" group, by expanding "Master/Guest" and selecting "Manage project check-out automatically".

Checking out an element

The different check-out modes
The SCM includes two modes to check out the project elements:
  • standard mode: if you open an element that has not been checked out from the SCM, a panel indicates that the element must be checked out to modify it. The element can be checked out immediately (check-out button found in the dialog box).
  • automatic mode: if you try to modify an element that has not yet been checked out, the SCM automatically prompts you to check it out. Once the check-out is validated, the element can be modified.
    Remark: this mode is not recommended when using the SCM with a slow Internet connection.
To change the check-out mode:
  1. On the "Home" tab, in the "Environment" group, expand "Options" and select "General options of WEBDEV".
  2. In the "General" tab, the "Check out elements on first modification" option allows you to switch all subsequent projects to automatic mode.
Opening a project element to change its characteristics
To change the characteristics of a project element included in the SCM:
  1. Check out the element from the Source Code Manager.
  2. Select the check-out mode for the element. The check-out mode can be:
    • exclusive: nobody can check out this element until it is checked back in. The element can be checked out for tests only.
    • for test: the element can be modified but the modifications will not be checked back in.
    • multiple: the element can also be checked out by other users. In this case, the differences between the different element versions can be viewed when the element is checked back in.
  3. Validate. The element is opened. The title bar indicates that the element is checked out.

Checking an element back in

The elements checked out from the Source Code Manager are bordered by a red line in the project editor.
To check in an element, go to the "Project explorer" pane and select "Check in" in the context menu of the element.
A screen allows you to perform the following actions before checking the element back in:
  • view the changes made.
  • compare the element in the repository with the local (checked out) element.
  • access the element history in the repository.
You can check in the changes made to the element while keeping the element checked out ("Keep element checked out" option).

Project management modes

Two management modes are available with the SCM:
  • Managing the project in Master/Guest mode.
  • Managing the project in automatic mode (by default).
Master and guest
The Source Code Manager distinguishes between 2 types of users:
  • the master: the master is the user who initially stored the project in the Source Code Manager.
  • the guests: the guests are the developers who handle the project from the Source Code Manager.
There is no need to be connected in master mode on a project. The "Master" mode is only required to:
  • change the project characteristics and check these changes back into the repository.
  • check all elements back in to create the site setup program.
To switch from master mode to guest mode, go to the "SCM" tab, "Project" group, expand "Master/Guest" and select "Become guest on the project (and check all in)".
In this case, the Source Code Manager prompts you to check in all the project elements (including the .WWP file).
To switch from guest mode to master mode, go to the "SCM" tab, "Project" group, expand "Master/Guest" and select "Become master on the project".
Caution: Changing the options of the project:
All project users (master or guests) can change the project characteristics (first page of the project, animation, code style, etc.). However, only the project master will be able to check these changes back into the Source Code Manager.
Changes made by a guest will be lost when the project is updated from the repository.
Automatic mode
With the automatic mode, the project file is checked out only if the action performed requires it (regardless of the user). Once the actions have been completed in the project, the project file is automatically checked back in.
With the automatic mode, you do not need to manage the "Master/Guest" mode in the project.
Working in offline mode with the SCM
The Source Code Manager allows you to easily work in offline mode.
For example, this mode allows a developer who works on a laptop to continue working on a project located in the repository while offline.
The principle is simple:
  • before disconnecting, go to the "SCM" tab, "Other actions" group, expand "Remote work" and select "Disconnect to work offline". Before working offline, it is recommended to check out the different elements you will work on (these elements will appear as "already checked out" for the other users). Then, you can work on your project locally. You can handle the different elements in the project directly.
  • on reconnection, on the "SCM" tab, in the "Other actions" group, expand "Remote work" and select "Reconnect and synchronize". Then, simply check the modified elements back in.
For more details, see SCM: Working in Offline mode.
SCM administrator
The SCM administrator allows you to handle the different projects included in the Source Code Manager.
It allows you to:
  • manage repositories (create or connect to a repository).
  • manage branches.
  • manage files and directories located in a project in the repository (add, delete, rename files and directories).
  • manage the different files of the repository (check-out, check-in, share, etc.).
  • start some tools (options, maintenance, etc.).
  • restore a project version.
  • see the history and differences in the versions.
  • undo check-outs (in administrator mode).
  • clear, save and restore a repository.
  • add any type of file to the repository (.doc, .xls, .pdf, etc.).
Previous pageTable of contentsNext page
Comments
Click [Add] to post a comment

Last update: 09/18/2023

Send a report | Local help