25.01.2015 Views

Using Caché Objects - InterSystems Documentation

Using Caché Objects - InterSystems Documentation

Using Caché Objects - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

2<br />

Object-Oriented Database<br />

Development<br />

The use of object-oriented programming is widespread and growing. Most modern user<br />

interface code is object based and a large amount of new business logic is also being implemented<br />

as objects. Where there is a lag is within the database layer of applications. Most<br />

databases rely on older methodologies (such as the ISAM and relational models). <strong>Caché</strong><br />

brings the power of object-oriented programming to the database.<br />

In this chapter we will briefly discuss some of the key concepts of object-oriented programming<br />

and how they relate to database application development.<br />

2.1 Classes and <strong>Objects</strong><br />

A class is a template that describes the data and behavior of a specific entity within an<br />

application. For example, your application may define a Car class that specifies the characteristics<br />

shared by all cars within the application.<br />

An object is a specific instance of a class. For example, a “1972 Dodge Dart” is a specific<br />

instance of a Car.<br />

<strong>Objects</strong> may exist in the memory of a specific process or session (similar to variables) where<br />

they can be manipulated (data values changed, methods invoked). <strong>Objects</strong> can also be stored<br />

in and retrieved from a database.<br />

<strong>Using</strong> <strong>Caché</strong> <strong>Objects</strong> 9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!