Site.xml file contains the configuration of a site. At run time, Geocortex Essentials parses (deserializes) the site configuration into business objects. Business objects can be accessed (consumed) by client-side applications (viewers) or they can be accessed from the server.
Essentials provides a number of built-in classes of business object, for example, layers, reports, print templates, and data links. Essentials also allows you to create custom functionality that extends your sites, specifically, custom properties and custom site extensions. As well, you can create custom REST endpoints, which are independent of sites but can work with sites.
Custom properties are simple name/value pairs and as such, do not have any logic associated with them. Custom properties are configured using Geocortex Essentials Manager. Custom site extensions and custom REST endpoints have logic associated with them, which requires programming to implement.
Your Essentials installation can use any combination of custom properties, custom site extensions, and custom REST endpoints that you require.
Often a custom function can be implemented using either a custom site extension or a custom REST endpoint. From the site administrator’s point of view, there are two important differences between the two:
Unlike custom REST endpoints, custom site extensions and custom properties are configured in the site configuration file. This gives the administrator direct control over how custom site extensions and custom properties are used.
Custom REST endpoints can have parameters, whereas custom site extensions cannot. In other words, custom REST endpoints can dynamically accept inputs that alter the behavior of the business logic. Depending on the situation, these inputs can come from an application or from the end user as part of the request URL path or the query string.
Parameterization provides a means for the administrator to restrict the objects that a custom REST endpoint can operate on. For example, you might want to restrict a custom REST endpoint to operate on a particular layer.
If there is no administrative reason to choose one approach over the other when creating a particular function, it is often the application developer who makes the decision about which method to use. There may be software design reasons for selecting one approach over the other.
We recommend using Visual Studio to customize the code, since it offers excellent support for editing XML documents, including IntelliSense. For example, when you begin to define a new element and the XSD is properly referenced, a list of possible child elements will display for you to select from, as illustrated in the following figure. Here, we see that the
site.xsd file allows the
Map child elements of the
Intellisense in Visual Studio