This section describes the rational for gmStudio's approach to deployment .
One of the unique features of gmStudio is that is allows you to separate code generation from code deployment. This best practice resulted from our work in helping teams perform migrations of very large systems. It works like this: rather than publishing the translated code as separate files and folders immediately as they are produced, gmStudio creates a consolidated text archive that contain all the files. This text archive, or bundle file as we call it, must be explicitly processed, or "deployed", to create the separate files and folders. By default, this feature works behind the scenes and it is extremely fast so you barely notice it. This approach provides additional control and visibility to the migration effort, and having all the generated code in a single file facilitates several useful operations:
Furthermore, migrating a large system produces a new codebase, and this can mean thousands of new source files and millions of new lines of code. It is critical that the migration team plan for this tsunami of new code and has tools to help them manage it efficiently. gmStudio's bundle file deployment feature is useful in this regard.
A contemporary codebase consists of a very large number of files, some of which are text files and some of which have binary formats. It is the mandate of this system that it be able to process an existing codebase and to then transform it into a new codebase with different files, different structure, and even with different internal file format. The term "Deployment" is used to refer to the various operations required to gather large numbers of files into an archive and then to redistribute the contents of the archive in a new location.
Though there are many binary compaction formats that could be used to gather files into a single archive, this system uses a simple text-based format that is compatible with all contemporary operating systems. The details of this format will be discussed later. The advantages of using a text-based format are two-fold:
So what is a Bundle File?
Bundle files are the self-extracting text archives produced by the translation process.
Here is a sample bundle file
rmdir \gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh
mkdir \gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh
mkdir \gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh\bin\
cat >\gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh\ScanToolUI.csproj <<
'!)(!'
'' ... Text OF \gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh\ScanToolUI.csproj ...
'!)(!'
cat >\gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh\AssemblyInfo.cs <<
'!)(!'
'' ... Text OF \gmProj\DemoScanTool\deploy\ScanToolUI_iop_csh\AssemblyInfo.cs ...
'!)(!'
''... REMAINING FILES AND DEPLOYMENT COMMANDS ...
Notice that the bundle file contains commands and content. The commands are directory management commands such as rmdir and mkdir. The content is in the venerable unix "here-file" format
cat >
'PATH OF FILE TO CREATE <<'!)(!'
'' ... Text OF FILE TO CREATE ...
'!)(!'
The translator always writes your translation to a bundle file that you specify in the Translation Script and a separate step, running the deployment tool -- is used to run the bundle file. By default, gmStudio handles all of this behind the scenes.
You can view the deployment logs for a given migration unit by selecting the [Deploy Log] option on the [Task Details] tab. Checking the [Grid] option here will display the internal contents of the bundle file.
You can generate a report of the internal contents of the bundle files for selected migration units in your project by clicking [Reports/Code Bundles].