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
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
8. Project sharing 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. This repository contains all the procedures, classes, windows, 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

Installation
All project elements are saved in the SCM repository (on the server). This operation is performed when importing an existing project into 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 benefit from the modifications performed, the other developers must synchronize their local project with the reference project (found 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: if possible, use a RAID I system on your server (several disks storing 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, you must create a repository. This repository must be created only once 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 a server in HFSQL Client/Server mode. In this mode, 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. In this case, all SCM users must have full rights to 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 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. You can make these backup copies 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 aspect 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").
  • Suggest getting 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 removes the need to manage the project using "Master/Guest" roles. 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 view an element from the SCM that has not been checked out, a message indicates that this element must be checked out in order to be modified. The element can be checked out immediately (check-out button found in the dialog box).
  • Automatic mode: When you try to modify an element that has not been checked out, the SCM automatically prompts you to check it out. Once the check-out is validated, the element can be modified.
    Note: 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 "WEBDEV general options".
  2. On 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: This element will not be available until it is checked back in. The element can be checked out for tests only.
    • For test: The element can be modified, but changes won't be checked in.
    • Multiple: Other users will also be able to check out the element. In this case, the differences between the element versions can be viewed when the element is checked back in.
  3. Confirm. 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:
  • Master: User who initially stored the project in the Source Code Manager.
  • Guests: Developers who manipulate the project from the Source Code Manager.
You don't always have work 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 project options:
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.
This mode removes the need to manage the project using "Master/Guest" roles.
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/24/2024

Send a report | Local help