Chapter 6. Sites and Services

6.1. Library sites
6.2. Java sites
6.3. Web Services
6.4. Custom sites

Orc programs communicate with their environment by calling sites. Sites perform services, which the Orc program orchestrates. A site call may return a single value, or may be silent, returning no value. Beyond this, there are no restrictions on sites' behavior. In prticular, site calls may interact with other site calls, have side effects, or continue to run after returning a value.

Orc has no built-in services, so even operations as simple as addition are performed by sites. Sites may also provide complex services, such as a database management system.

Sites may be provided by various types of software components, such as Java classes, Web services, or custom Orc sites. An Orc program's views of sites, however, remains uniform across these types.

Some sites, called classes, create other sites when called. Orc programs may import previously-defined sites and classes for use, through use of the import site and import class declarations. Programs may also define classes directly in Orc code, using the def class declaration.