| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (3 out of 6)

Using Module Prefixes

A typical G2 application consists of numerous modules, which you merge together to create a complete application. During development, especially if you are working in a team, you might mistakenly define two items of the same name in two different modules, each with a different definition. This might occur when defining classes, methods, procedures, or functions.

When you attempt to merge two such modules into a single application, G2 presents a conflict workspace indicating that two different definitions exist. By default, G2 renames the definition in the module that you merged by appending -from-module-name to the name, for example, robot-from-defs.

To avoid this type of cross-module conflicts, we recommend that you use module prefixes and that you following these naming conventions:


Caution: G2 makes no assurances that module prefixes are unique. Thus, you might have to establish a prefix reservation system to prevent naming conflicts.

Benefits of Using Module Prefixes

Using the module prefix on all items and attributes has numerous benefits:

Costs of Using Module Prefixes

Using the module prefix on all items and attributes carries these costs, which you should also be aware of:

| Prev | Next | Start of Chapter | End of Chapter | Contents | Glossary | Index | Comments | (3 out of 6)

Copyright © 1997 Gensym Corporation, Inc.