Using Caché Objects
Introduction to Caché Objects
[Home] [Back] [Next]
InterSystems: The power behind what matters   

This manual describes the various aspects of Caché objects. You may also find the Caché Web Applications Tutorial to be a useful introduction to the topic.

Caché object technologies give application developers the means to easily create high performance, object-based, database applications.
The features of Caché objects include:
You can use Caché objects in many ways including:
Caché Objects Architecture
Caché object technology contains the following major components:
Class Definitions and the Class Dictionary
Every class has a definition that specifies what members (properties, methods, and so on) it contains as well as class-wide characteristics (such as superclasses). These definitions are contained within the class dictionary, which is itself stored within the Caché database.
Creating Class Definitions
You can create class definitions in many ways:
The Class Dictionary
Every Caché namespace contains its own class dictionary which defines the available classes for that namespace. There is a special “CACHELIB” database, installed as part of Caché, that contains the definitions and executable code for the classes of the Caché class library. These classes are referred to as system classes and all are part of packages whose names start with a “%” character, such as %Library.Persistent (the names of members of the %Library package can be abbreviated, so that %String is an abbreviation for %Library.String).
Every Caché namespace is automatically configured so that its class dictionary, in addition to containing its own classes, has access to the system class definitions and code within the CACHELIB database. By this mechanism, all namespaces can make direct use of the classes in the Caché class library.
The class dictionary contains two distinct types of data:
The class dictionary stores its data in a set of globals (persistent arrays) whose names start with ^odd. The structure of these arrays may change with new versions of Caché, so applications should never directly observe or modify these structures.
The Caché Class Library
The Caché class library contains a set of prebuilt classes. It is automatically installed with every Caché system within the CACHELIB database. You can view the contents of the Caché class library using the online class documentation system provided with Caché.
The Caché class library contains a number of packages, each of which contains a family of classes. Some of these are internal and Caché objects uses them as part of its implementation. Other classes provide features that are designed for use in applications.
The main packages within the Caché class library include:
Caché Class Library Packages
Package Description
%Activate Classes used by the Caché Activate ActiveX gateway. See Using the Caché ActiveX Gateway.
%Compiler Internal classes used by the class compiler.
%CSP Classes used by Caché Server Pages. See Using Caché Server Pages (CSP).
%csr A set of generated internal classes that implement the standard CSP rules.
%Library The core set of Caché “behavioral” classes (such as %Persistent). Also includes the various data types, collections, and stream classes.
%Net A set of classes providing various Internet-related features (such as email, HTTP requests, and so on). See Using Caché Internet Utilities.
%Projection A set of projection classes that generate client-side code for user classes. See the chapter Class Projections.”
%SOAP Classes you can use to create web services and web clients within Caché. See Creating Web Services and Web Clients in Caché.
%SQL Internal classes used by Caché SQL.
%Studio Internal classes used by Studio.
%SYSTEM The various system API classes accessible via the $System special variable.
%XML Classes used to provide XML and SAX support within Caché. For information, see Projecting Objects to XML and Using Caché XML Tools.
For a comprehensive list of options, see the table of contents of the InterSystems Programming Tools Index.
Development Tools
Caché includes a number of tools for developing object-based applications. In addition, it is quite easy to use Caché with other development environments.
Studio is an integrated, visual development environment for creating Caché class definitions. See Using Studio for more details.
SQL-Based Development
It is possible to develop Caché applications using SQL-based tools, since Caché automatically creates a class definition from any relational tables defined using SQL DDL statements. This approach does not exploit the full power of objects because you are limited by what DDL can express; however, it is useful for migrating legacy applications.
XML-Based Development
It is possible to develop class definitions as XML documents and load them into Caché. You can do this using either the Caché-specific XML format for class definitions or you can use an XML schema representation.
User Interface Development and Client Connectivity
Caché object technology supports connections with the Caché user-interface development tools as well as its connectivity tools for interoperating with other systems. For a comprehensive list of options, see the table of contents of the InterSystems Programming Tools Index.

Send us comments on this page
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA