Previous Table of Contents Next


Application Designing Using NCA Cartridges

There are several design considerations when building business solutions based on the Network Computing Architecture.

  Client cartridge and application cartridge. The client cartridge should package all the operations and functions that directly control the user interface. The rest of the operations and functions should be divided between the application and the data cartridge. In NCA, the clients will be thin, so the application designers of the NCA solution should pay careful attention to the distribution of the functionality between the various cartridges.
  Application cartridge and data cartridge. The data cartridge should package all the operations and functions that extend the Oracle8 database with new types or new behavior. The fact that a function performs SQL-based data access is not sufficient to package the function as a data cartridge; it should really be packaged as an application cartridge. Server-based extensions, which are integrated with the server and packaged as a single unit, qualify as data cartridges.


Note:  
Application cartridges can execute on either the application server or on the data server, but a data cartridge can execute only on the data server.

Data Cartridge Components

A data cartridge typically contains one or more object datatypes. While defining an object datatype, a data cartridge makes use of the built-in datatypes, such as integer and varchar. It may even reference another datatype defined in other data cartridges. A data cartridge generally includes the following components:

  Object type specification
  Object type method code
  External library calls
  External library

Advantages of Data Cartridges

Data cartridges have a lot of advantages because the objects that are defined in the cartridge allow you to centralize the definitions and rules, which can then be used in different types of applications. There are several advantages to this approach.

  Packaging of domain-specific expertise allows the cartridge to access the corporate information repository and add more meaning to the data and its use.
  The cartridge can be used across different sections of the industry, making it versatile.
  It can open up new business opportunities.

Data Cartridge Extensions

You can create a new data cartridge, or you can extend the functionality of an existing data cartridge. The data cartridge to extend could be Oracle-supplied or custom-built, if you have a data-cartridge “people.” Different companies can add new data elements as well as new methods to this cartridge to represent their employees and their own special policies.

Difference Between Data Cartridge and Application Cartridge

Within the Network Computing Architecture, the data cartridges are a means to extend the functionality of Oracle Server to new domains. Data cartridges can have a variety of uses, from the broad horizontal spectrum such as Spatial, Image, Time Series, and Context, to a narrow and focused vertical set such as Portfolio, Telecom, Video, and Audio.

Data cartridges have the following features:

  Data cartridges are server-based. The cartridge components reside on the server or are accessed from the server (in the case of external procedures and error messages). On the other hand, application cartridges reside at the application server, get data from the data server, and process it locally at the client.
  They typically define and implement domain-specific object datatypes. Users of data cartridges can use the new types in their application in the same manner that they use the built-in types. For example, after the Image cartridge has been loaded, the user can easily define a table called Employee that has a column called Photo of the type image.
  The server can be extended by defining new row-sources or extensible data sources. In this case the data is actually outside the database, but it can be logically integrated into the database by means of abstract tables.
  The components of the data cartridge are packaged together as one unit. In other words, the types, packages, external procedures, users, and so on that comprise the cartridge can be installed and uninstalled as a single unit.
  They can be integrated with the server engine such that the server can take special action when dealing with the domain. For example, the queries can be optimized by having a more meaningful interpretation of the domain.


Note:  
In Oracle8.1, the data cartridge will be able to more closely integrate with the server engine by means of interfaces. For example, an interface with the indexing engine will make it possible to create a more meaningful domain-specific indexing scheme.

Developing Cartridges

Before you begin the actual development of a cartridge, you have to be clear about the purpose of the cartridge. You have to decide what functionality the cartridge will provide to developers and users. The following steps need to be performed after the functional definition has been dealt with:

  Decide the objects that will be exposed and that will provide the cartridge functionality. It is very important to choose the objects and name them such that they represent the domain they are extending. Also, use similar names for the objects.
  Using object-oriented methodologies to define all the object attributes and their methods. It will help to use an object-oriented paradigm when developing a data cartridge.
  Interfaces between object methods and existing 3GL code. Keep the interface between the SQL method of the objects and the existing 3GL code as simple as possible. Minimize the number of calls to library routines, and also try to do as much work as possible in each call.
  Package existing 3GL code. The existing 3GL code should be packaged in a DLL. Create new entry points that will be used by the SQL code of the object’s methods.
  Define and write the object’s type specification and the PL/SQL code. The object methods can be written entirely in PL/SQL, or they may even call the external library. If the external library is called, the definitions for the library and the arguments that are passed must be defined accurately.
  Sample debugging program. A sample program can be created by using the externally visible definitions. This will serve as a debugging tool during the development phase.


Previous Table of Contents Next
Используются технологии uCoz