|Oracle 8i Data Cartridge Developer's Guide
Release 2 (8.1.6)
Part Number A76937-01
Design Considerations, 7 of 8
Design for maintenance
- Carefully design your object types and methods. Object types are difficult to upgrade once they are in use by applications.
OIDs in all of your object types so users can import/export data easily across databases.
- It is easy to add a method to a type; it's hard to remove it.
- You are likely get more use out of the cartridge and the existing tool stack if you support functions against a traditional relational model in addition to an object model.
- Expose significant and frequently used data from your complex objects in object types as attributes so that you can build an index on them.
- If your cartridge maintains a large number of objects, views, tables, etc., consider making a metadata table to maintain the relationships among the objects for the user. This will ease the complexity of developing and maintaining the cartridge when it is in use.
How to Make Your Cartridge Extensible
- Keep your interface simple, and document it thoroughly.
- Use OO concepts appropriately.
- Ensure that your methods do not have side affects
How to Make Your Cartridge Installable
- Include a
README with your cartridge to tell users how to install the cartridge
- Make the cartridge installable in one step in the database, if possible:
- Tell users how to start the
listener if you are using callouts.
- Tell users how to setup
extproc. Most users have never heard of
extproc and many users have never set up a listener. This is the primary problem when deploying cartridges.
- In Orace8i release 8.1.5 using the software packager, you can easily create custom SQL install scripts by using the
'instantiate_file' action. This is a great feature that allows you to substitute variables in your files when they are installed and it leaves your user with scripts and files that are customized for their machine.