Table of Contents

About

The scope is a (depth|level) of a hierarchical namespace.

As namespace, the scope groups name but at a hierarchical level.

Example

Type

Global

The global scope is the root of the namespace.

Example:

  • the root directory for a file system
  • the root catalog for a database system

Local

The local scope is the namespace attached to a primary element (entity or relationship)

Example:

Uniqueness

In a specific scope, only one primary element with the same primary key can exist.

Example:

  • In a file system, in a specific directory, you can't have two file with the same name.
  • In a table, you can't have two rows with the same primary key.

Quality

As with each group functionality, the less you have in your scope, the beter.

You should follow the magical number (seven +-2)

The code quality / maintainability will increase, your test will be more isolated