Micro Focus recommends that you create and use Visual Studio projects for your source code. There is a number of benefits to using projects such as:
The following sections include some recommendations about how to create and configure your projects, especially when you are working with a large number of files.
The following list gives a number of recommendations for how to structure your projects and solutions, especially if your applications consist of a large number of files:
Recommendation | Benefits |
---|---|
Create multiple smaller projects in a solution, rather than keeping all code in one very big project. Consider creating one project per functional area of your application. |
Smaller projects are:
In addition, keeping your projects smaller helps achieve quicker response times in the editor. |
Consider splitting a very large solution into multiple solutions, especially if the solution contains many projects. |
In addition to the reasons listed above, this helps with some solution-specific issues such as using Find All References for a solution. If your solution contains hundreds of projects, using this feature can have a negative effect on performance. |
Do not include copybooks in your projects. Store them in a folder outside the project folder. You then specify the location of the copybooks on the Copybook Paths page in the project's properties. |
|
Use paths relative to the project location in the project's properties - for example, for paths for the build output or for the location of copybook. | Helps make the project portable to other machines. |
Do not use copybooks or any other files from a network drive. | Helps avoid any issues with performance. |
Micro Focus recommends that you:
It is hard to provide a strict recommendation for the maximum number of files to store in a single project. This number will depend on many factors related to your particular development scenario such as:
Keeping the size of your projects smaller helps avoid various performance issues. As the size of a project increases you need to be aware of issues such as the following::
Micro Focus recommends that you avoid having a large number of projects in a single solution. The reasons are the same as the ones for limiting the number of files within a single project.
It is hard to provide a strict recommendation for the maximum number of projects to store in a solution. Keeping the size of your solutions smaller helps avoid various performance issues and improves the times for:
Micro Focus makes the following recommendations when working with copybooks:
Recommendation | Benefits |
---|---|
Do not include any copybooks directly in your project. Store them in a folder outside the project's location and add that folder to the Copybooks page in the projects' properties. | This helps reduce the projects' sizes and makes projects easier to manage.
This also helps share the copybooks if other projects depend on them. |
Avoid adding hardcoded paths to the copybooks in your source files or using the copybooks from the projects folder. Do not use other similar methods such as setting an environment variable to point to the files. Instead, use relative paths when specifying the location of the copybooks on the Copybooks page in the projects' properties. | This helps make the projects portable. You can use the relative path with the MSBuild utility and any build scripts. |