Structural refactoring initiatives typically make use of the synchronisation that is possible between Studio and Workspace. Careful configuration of Structure101 Build will ensure the Key Measures can be tracked consistently across Studio, Workspace, SonarQube and the Structure101 Web Application.
Workspace and Studio
The synchronisation between Studio and Workspace begins by creating the Studio project from the Workspace .hsw file. This ensures the classpaths used in Workspace are also used by Studio. Whenever the Studio project is opened the .hsw file is checked for changes to the modules and their classpaths and the Studio project is updated accordingly.
The Studio project is used to create refactoring Action Lists and Structure Specs. These are shared with the development team by publishing a shared Action List and Structure Spec to the Structure101 Repository.
In the Workspace settings the published project is referenced.
Build
Structure101 Build needs the classpaths it should process, a project name and its repository location. The repository project has the snapshot against which comparisons will be made. It will also contain the Structure Spec against which the model will be validated. This information can be captured in a structure101-build-config.xml file.
The config file can reference the Studio .hsp project file from which the repository, project name and classpath can be retrieved. Any of them can be overridden in the configuration file.
Web Application
The Structure101 Web Application is configured to use the repository. In addition to viewing the projects that have been published it can be used for remote access to the Repository.
Source Control of the Workspace, Studio and Build Files
The Studio .hsp project file, Workspace .hsw file and build configuration file should be kept under source control in the root folder of the source tree. All file paths in all three files should begin with or be relative to const(THIS_FILE). So that the source tree can be checked out into any folder path and the file and classpath references in the three files will resolve to the correct folders.
It is recommended that the commit privileges on these files are restricted to the team leads/developers responsible for the restructuring initiative.
The integration of all the Structure101 components is shown below.
Leave a Reply