- The Source Code Manager
- Creating a repository for SCM
- When should an SCM repository be created?
- Configuring the project in order to work with the SCM
- Adding a project into SCM
- Sharing resources
- Working with SCM
- Project options affecting the SCM
- Checking out an element
- Checking an element back in
- Management modes of project
- Working in offline mode with SCM
- SCM administrator
8. Sharing a project in practice
The development of a large IS system requires the participation of several developers. These developers must work on a single WEBDEV project while sharing the different resources (queries, classes, ...).
To share a project, you have the ability to use:
WEBDEV innovates regarding the management of teamwork with the Source Code Manager (also called SCM).
Entirely integrated in the environment, the Source Code Manager (SCM) is used to:
- make teamwork easier and faster,
- store the history of modifications and versions,
- save the source code of the development team in an automatic way.
Sized for team between 1 and 100 developers, the SCM facilitates and standardizes the collaboration between developers (even when developing alone, the SCM is useful because it contains the history of your applications).
The SCM is using an SCM repository: procedures, classes, pages, reports, components, analyses, ...
This repository can be installed on a server (in HFSQL Classic or HFSQL Client/Server mode) or on a network computer in a shared directory.
The SCM can be run locally or remotely, via Internet or via an HTTP or HTTPS connection. This feature gives you the ability to work on a project from an agency or from a remote site without losing the modifications.
The SCM can also be used in offline mode (train, plane, etc.).
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 is using the Source Code Manager retrieves a local copy of project.
To work on a project element (page, report, etc.), the developer must check out the element from the repository, modify it and check it back in.
If the element is already checked out, the developer can ask the person who performed the check-out to check the element back in (via the integrated messaging).
To benefit from the modifications performed, the other developers must synchronize their local project with the reference project (found in the repository).
The source code of your applications is essential.
This source code must be handled with great care!
Tips for configuring the server that will host your source code:
- Use a dedicated server with a comfortable size disk (200 GB at least)
- 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 SCM
To share a project via the Source Code Manager, a repository must be created. This repository must be created once only on a server.
The operating system and the file system on which the SCM repository is installed must support the files exceeding 4 GB.
The repository can be created:
- in a shared directory on network: all the SCM users must have full rights on this directory. The repository will be in HFSQL Classic format.
To do so, specify the network directory where the SCM repository will be created.
- 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.
When should an SCM repository be created?
The SCM repository must be created once only
WEBDEV allows you to create this repository at different times:
- when installing WEBDEV.
- when creating a project that is using 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.
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 in order to work with the SCM
Some operations are required before an existing project can be used by the Source Code Manager.
Adding a project into SCM
To add a local project into the SCM
- Open your project in WEBDEV.
- On the "SCM" pane, in the "Add project" group, click "Add project to SCM".
- In the wizard, select the repository to use. Specify whether you want to use:
Remark: If no SCM repository has been created yet, click "Create a repository".
- a repository found on a network share (repository in HFSQL Classic format). Specify the directory of the repository (network computer or shared directory).
- a repository located 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.
- an SCM Drive repository. Specify the information for identifying to your SCM Drive: email, password and team.
- a repository located in PCS Cloud. Specify the name of cloud platform used and the project to open.
- Validate the wizard. The project is added to SCM.
A first project was imported into the Source Code Manager. This project contains elements shared with other projects (classes, pages, procedures, style sheets, ...).
Project options affecting the SCM
Several options are used to configure a project handled by the Source Code Manager. These options are grouped in the "SCM" tab of the project description (on the "Project" pane, in the "Project" group, click "Description").
- Propose to get the latest version of the elements when the project is opened:
When opening a project found in the SCM, this option proposes to retrieve the latest version of project elements.
By default, the latest version of elements is automatically retrieved.
- Propose to check in the elements when the project is closed:
When the project is closed, this option is used to display the list of elements that are currently checked out in order for some of them (or all of them) to be checked back in.
By default, the checked-out elements are not checked back in when the project is closed.
- 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 action was performed on the project, the project file is automatically checked back in.
This option is used to disable the "Master/Guest" management on the project. This option can also be enabled on the "SCM" pane, in the "Project" group, by expanding "Master/Guest" and by selecting "Manage the project check-out automatically".
Checking out an element
The different check-out modes
The SCM proposes two modes for checking out the project elements:
- the standard mode: if you display an SCM element that is not checked out, a panel indicates that the element must be checked out before it can be modified. The element can be checked out immediately (check-out button found in the dialog box).
- the automatic mode: if you try to modify an SCM element that is not checked out, the SCM automatically proposes to check it out. Once the check-out is validated, the element can be modified.
Remark: this mode is not recommended when using SCM with a slow Internet connection.
To change the check-out mode:
- On the "Home" pane, in the "Environment" group, expand "Options" and select "General options of WEBDEV".
- In the "General" tab, the option "Check out elements during the first modification" is used to switch all the next opened projects to automatic mode.
Opening a project element to modify its characteristics
To modify the characteristics of a project element managed by the SCM:
- Check out the element from the Source Code Manager.
- Select the check-out mode of 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 test 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.
- 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, all you have to do is select "Check in" from the popup menu of the element (in the project graph or in the "Project explorer" pane).
When checking an element back in, a screen allows you to perform the following actions before the element is checked back in:
- find out the modifications performed.
- compare the element found in repository with the local (checked out) element.
- access the element history in the repository.
You can check in the modifications made to the element while keeping the element checked out ("Keep the element checked out" option)
Management modes of project
Two management modes are available with the SCM:
- Managing the project in Master/Guest mode.
- Management 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:
- modify the project characteristics and check these modifications back into the repository.
- check all elements back in to create the setup program of site.
To switch from master mode to guest mode, under the "GDS" pane, in the "Project" group, scroll down to "Master / Guest" and select "Become guest on the project (and reintegrate everything)".
In this case, the Source Code Manager proposes to check in all the project elements (including the .WWP file).
To switch from guest mode to master mode, under the "GDS" pane, in the "Project" group, scroll down "Master / Guest" and select "Become master on the project".
Caution: Modifying the project options:
All project users (master or guests) can modify the project characteristics (first project page, animation, programming charter, etc.). These modifications will have to be checked back in into the Source Code Manager by the master of the project.
The modifications made by a guest will be lost when the project is updated from the repository.
With the automatic mode, the project file is checked out only if the action performed requires it (regardless of the user). Once the action was performed on the project, the project file is automatically checked back in.
The automatic mode allows you not to manage the "Master/Guest" mode on the project.
Working in offline mode with SCM
The Source Code Manager allows you to easily work in offline mode.
This mode allows a developer who is using a laptop to continue working on a project found in the SCM repository while being disconnected from the repository.
The principle is simple:
- before the disconnection, on the "SCM" pane, in "Other actions", expand "Remote work" and select "Disconnect to work offline". Before the disconnection, we advise you to check out the different elements that will be modified (therefore, these elements will be "already checked out" for the other users). You can work on your project locally. The different project elements can be handled directly.
- when reconnecting, on the "SCM" pane, in the "Other actions" group, expand "Remote work" and select "Reconnect and synchronize". Then, simply check the modified elements back in.
The SCM administrator allows you to handle the different projects included in the Source Code Manager.
It allows you to:
- manage the repositories (creation, connection to a repository).
- manage the branches.
- manage files and directories present in a project in the repository (add, delete, rename files and directories).
- manage the different files of the repository (check-in, check-out, share, etc.).
- start some tools (options, maintenance, etc.).
- restore a project version.
- see the history and the differences of versions.
- cancel the check-outs (in administrator mode).
- clear a repository, save it, restore it.
- add files of any type into the repository (.doc, .xls, .pdf, etc.).
Click [Add] to post a comment