Project Files and Folders

The following is the typical file structure of a basic morfik project once compiled (for windows) and deployed.

My Project

This is the project's root directory. It contains the various files and folders which make up your Morfik project.

mxp.png My Project.Mxp

This is the main project file. It contains code, design elements and settings that apply to the project as a whole:

  • the project module (browser- and server-side code);
  • the project theme (details of the default fonts, colors and effects used in forms and reports);
  • external database connectors used in the project (if any);
  • most of the settings on the Application, Server and Compiler tabs of the Morfik Options dialog.

This file is in XML format.

morfik32.png My Project.exe

This is the binary executable file generated by Morfik when you compile your project as a standalone XApp. It implements the server-side logic of your project and the Morfik framework.

dll321.png My Project.dll

This is the binary executable file generated by Morfik when you compile your project as a plugin XApp (either as a Morfik plugin XApp, Apache plugin XApp, or IIS plugin XApp). It implements the server-side logic of your project and the Morfik framework. This is one of the files uploaded to the server when you deploy your project using the Deployment wizard.

mxd.png My Project.Mxd

This file contains your project's default Firebird database. Any (standard) tables that you create for your project in the Morfik IDE reside in this database. Also, any tables imported from external databases are stored in this database. You can access and/or modify the data stored in this database using the Morfik IDE, your xApp, or 3rd-party utilities.

Note: if you select No Embedded Database option in Morfik Server Options, this file may still be present even though it is no longer required. This is done to make it possible to reverse the setting change without losing any data. If you are confident your application is not going to use default database you can manually delete this file.

mxr.png My Project.Mxr

This file contains various resources and settings used by your XApp at run time. It is generated when you compile your project. It includes javascript files, images and other content that the XApp needs to serve up to the browser at run time. It also includes various design-time settings such as database connectors needed by your XApp at run time. This is one of the files uploaded to the server when you deploy your project using the Deployment wizard.

document_plain32.png My Project.wsdl

This file contains information about the webservices published by your XApp (if any). It is generated when you compile your project. It is required if you want to call the webservices of your XApp from another application. To call your XApp's webservices from another XApp, import the WSDL file into the calling project using the Web Services wizard; this will then create an interface module that you can call from browser- or server-side code to consume the webservice.

folder32.png _My Project Source

This folder contains the source code of your project items. Each table, query, form, page, report, webmethod, widget and module in your project has a corresponding file in this folder, which contains:

  • the source code of the project item;
  • the project item's properties, events and parameters;
  • the layout of controls in the project item (forms and reports only);
  • the project item's metadata (tables and queries only).

The files in this folder are in XML format.

Note: The list of project items is not explicitly stored anywhere, every time you open the project the _Source folder is scanned to find out what items exist in the project. This makes the process of project management easy: to add an existing module to the project you can simply copy a file into the Source folder and reopen the project.

folder32.png _My ProjectCache

This folder is used by your XApp at run time. Its contents fall into two categories: those related to server-side caching, and those that relate to Morfik Apache (standalone XApp) deployment.

When your XApp runs, it creates a subfolder in the _My ProjectCache folder whose name is a GUID e.g. {12B676BB-32F7-4036-A0FB-370CC7E13E7C}. This folder is used to store cached copies of the forms and reports in your project. Documents for which server-side caching has been enabled (on the Document Properties dialog, Caching tab) are saved to this folder the first time the document is requested, and thereafter only regenerated if the copy in the cache has expired.

If your XApp is running as a standalone XApp, the Cache folder also contains files related to Morfik Apache. The most important of these are as follows:

  • The configuration file httpd.conf. This file contains various directives to Apache, such as which http/https ports it should listen on, and the locations of log files. The XApp generates this file when it is run. In some circumstances you may want to edit the directives in this file manually. This can be accomplished as follows: run the XApp once, copy the httpd.conf file from the _My ProjectCache folder to the My Project folder, make the required edits, then restart the XApp. The httpd.conf file in the My Project folder overrides the one in the _My ProjectCache folder.
  • The SSL certificate and private key files. By default the files MorfikDefaultCert.Pem and MorfikDefaultKey.Pem from the Morfik System folder are used. If you have your own SSL certificate and private key files, you should specify these on the Server tab of the Morfik Options dialog, and they will be automatically copied to the _My ProjectCache folder.
  • The log files access.log, ssl_request.log and error.log. Apache appends a message to these files when it receives a http request, when it receives an https request, and when it encounters an error, respectively.

folder32.png _My ProjectDeployment

This folder is used by the Morfik IDE when you deploy your project using the Deployment wizard. It contains various files required for the upload, updating and debugging of your XApp on the server.

folder32.png _My ProjectResources

This folder contains image files and other resources used by your project. These resources can be bound to form or report controls at design time, for example by setting the Picture property of an Image control. If the Package Resources option (Morfik Options dialog, Compiler tab) is enabled then these resources are added to the project's MXR file during compilation; otherwise the _My ProjectResources folder must be copied to the deployment server.

folder_hid32.png _My_ProjectBuild

This folder is created during the compilation of your project. For each server-side module in the project and in the Morfik framework, the Morfik compiler generates a corresponding .pas file in this folder. These .pas files are then compiled by the platform compiler (which by default is Free Pascal) to give the final executable file (.exe or .dll on Windows). The _My_ProjectBuild folder also contains files used by the Morfik debugger.

folder32.png Log

This folder contains log file(s) generated by your XApp at run time. The Morfik framework logs various messages to a text file whose filename is the name of the project, followed by an underscore, followed by today's date in yyyy-mm-dd format, followed by the file extension .log. For example, if your project is named BookCollector and today's date is 3rd June 2010, then the filename will be BookCollector_2010-06-03.log. (A separate log file is generated for each day.) This log file contains information, warnings and error messages issued by the Morfik framework during XApp startup and execution. If desired, the developer can also write messages to this file from server-side code using the framework function Logfile.Add().

Related Topics