Development in the file system
Glossary Item Box
Introduction
Using an Integrated Development Environment (IDE) maximizes development speed. Examples of the IDE include Visual Studio, WebStorm and other tools. An IDE usually enables you to create, modify and compile the source code, debug it, run team development, use version control systems, etc. IDEs usually use text files stored in the file system to work with the source code.
NOTE
For development in the file system, you can use Microsoft Visual Studio Community, Professional and Enterprise version 2017 (with latest updates) and higher.
You can configure Creatio configuration packages in the file system. With this mechanism, you can export the packages from the database to a set of files, edit the package content using an IDE and upload the updated packages back to the database. Using Visual Studio, you can debug custom source code of the schemas of the “Source code” (SourceCodeSchema) type.
Use Creatio built-in tools if there is no need or possibility to develop in the file system.
Main limitations of development in the file system
When the development in the file system mode is enabled, a full-fledged development is supported only for schemas of the “Source code” (SourceCodeSchema) and “Client schema” (ClientUnitSchema) types.
For other package elements (such as resources and SQL scripts), the following rules are used:
- When exporting packages from the database to the file system, the package elements that are stored in the database will replace the corresponding items in the file system. The source code schemas and client schemas will not be replaced.
- When uploading packages to the database, source code schemas and client schemas will replace the corresponding items in the database. The application will keep using source code schemas and client schemas from the file system.
ATTENTION
Starting with version 7.11.2, when the file system development mode is enabled, resources of these schemas are also saved in the file system after saving client schemas (ClientUnitSchema) and source code schemas (SourceCodeSchema) in the corresponding designers (see the [Configuration] section).
Integration with the version control system (SVN) with enabled development in the file system is performed with third-party tools. Creatio built-in mechanism of working with SVN is not used. It is still possible to install packages from the SVN repository in the [Configuration] section (this simplifies working with related packages). Use third-party utilities, such as TortoiseSVN to install separate packages.
NOTE
To use the built-in capabilities of working with the SVN repository, disable the development mode in the file system.
Application settings for development in the file system
To enable development in the file system, edit the Web.config file (located in the root folder with the installed application) and set the enabled attribute of the fileDesignMode element to true.
<fileDesignMode enabled="true"/>
ATTENTION
Currently, the development in the file system is no compatible with getting client content from preliminary generated files. For the correct work of the development in the file system you need to disable getting static client content from the file system. Set the “false” for the UseStaticFileContent flag in the Web.config file to disable this functions.
<fileDesignMode enabled="true" /> ... <add key="UseStaticFileContent" value="false" />
After enabling the development in the file system, two buttons will appear on the [Actions] tab in the [Configuration] section.
- [Download packages to file system] – exports the packages from the database to the following folder: [path to the installed application]\Terrasoft.WebApp\Terrasoft.Configuration\Pkg.
- [Update packages from file system] – uploads the packages to the database from the following folder: [path to the installed application]\Terrasoft.WebApp\Terrasoft.Configuration\Pkg.
Fig. 1 Actions of the [Configuration] section for development in the file system
To integrate the application with the configuration project, grant full access to the [path to the installed application]\Terrasoft.WebApp\Terrasoft.Configuration\Pkg folder for the OS user, who runs the IIS application pool (Fig. 2). Usually, this is the built-in IIS_IUSRS user.
Fig. 2 Setting up access rights for the Terrasoft.Configuration folder
Terrasoft.Configuration package
A configuration project is a Visual Studio solution supplied with Creatio setup files. The solution can be found here: [path to the installed application\Terrasoft.WebApp\Terrasoft.Configuration.
To start development in the file system, open the following file in Visual Studio: [path to the installed application]\ Terrasoft.WebApp\Terrasoft.Configuration\Terrasoft.Configuration.sln.
The configuration project structure is available in table 1.
Table 1. Configuration project structure
Folder | Purpose |
---|---|
Lib | The folder where package-bound third-party class libraries are exported. |
Autogenerated\Src | The folder with files that contain auto-generated source code of the preset package schemas. These files cannot be edited. |
Pkg | The folder where the packages for development in the file system are exported from the database. |
bin | A folder for compiled configuration and third-party libraries. |
Getting Started with the configuration
Creating a package
If you do not intend using SVN in the development process, then the process of creating a package is the file system development mode is the same as that in the normal mode. For more information on creating packages please refer to the Creating a package for development article.
ATTENTION
The working with SVN mode is enabled in the Creatio by default. If the [Version control system repository] field is empty when creating a package, then the package will not be bound to the repository. The versioned development of this package can be performed only after manually binding it to the repository from the file system.
More information about creating a custom package and binding it to the SVN repository can be found in the "Creating a package in the file system development mode” article.
Working with new package elements
It is recommended to add new elements (schema or resource) to the package only from the [Configuration] section. To create and edit a new item in a custom package:
- Select a custom package in the [Configuration] section and add a new element in it (see Creating a custom client module schema, “Creating the [Source code] schema”).
- Add resources (such as localized strings) to the schema if needed.
- Click [Download packages to file system] (Fig. 1).
- Use an IDE (such as Visual Studio) to edit the source code of the schema or localized resource in the files (located in the [Path to the installed application]\Terrasoft.WebApp\Terrasoft.Configuration\Pkg\[Package name] folder). The package properties are described in the "Package structure and contents” article.
- Click [Update packages from file system] to upload changes to the application database (Fig. 1).
ATTENTION
Changes made in client schemas are available in the application immediately, without uploading to the database. You only need to update the page in the browser.
- If you changed a source code schema, then you must compile the application.
NOTE
When developing source code schemas in C #, compile them directly in Visual Studio. More information about compilation and debugging in Visual Studio can be found in the "Working with the server side source code” article.
See also
- IDE settings for development
- Working with the client code
- Working with the server side source code
- Developing the configuration server code in the user project
- Working with the client code. Automatic displaying of changes
- Working with SVN in the file system
- Packages file content
- Localization of the file content
- Testing tools. NUnit
- How to use TypeScript when developing custom functions