To create a new application, we enter the Developer area and repeat the process we followed in the previous lesson.
We click the "New Application" button, select the main region, and select "use REST API" as the application type. But instead of providing links to files on a server, we attach an archive containing the application, which can be obtained from the lesson materials.
After saving and closing the slider, we edit the application name to "Static App Example" and save the changes.
Testing the application involves entering our Bitrix24 address where we have administrator privileges and clicking Install. Bitrix24 automatically opens the application after successful installation, as it has a user interface.
Examining the inner workings of the application, we start with the install.html file.
Like in the case of server applications, the application must inform Bitrix24 of a successful installation through the installFinish js-method of a special js-library. Upon the application's execution of this function, Bitrix24 recognizes the installation as successful and redirects the user to the index.html file within the archive. This file is mandatory, but other html pages, CSS files, and JS libraries may also be included.
The REST API is utilized through methods from the special js-library.
Our example, for instance, calls the user.current method, which retrieves information about the current user.
The application framework is now in place, allowing for customization through the addition of necessary functionality.
The updated archive can be reinstalled on our portal, and, after thorough debugging, the solution can be published on Bitrix24.Market.