DELAPARRA
Index
Color
NL
Category: Core glossary

Namespace

Explained by Updated

What is Namespace?

Namespace: A logical grouping that organises identifiers (classes, functions, variables) to avoid naming conflicts. In Kubernetes, namespaces isolate resources within a cluster. A namespace groups names together so they do not clash. In PHP, App\Models\User and Vendor\Package\User can both exist, because they live in different namespaces. JavaScript modules, Python packages and Java packages solve the same problem.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about Namespace

How is Namespace used in practice?

Namespaces also organise code. Combined with autoloading in PHP, the namespace usually mirrors the folder structure, so you can tell where a class lives from its full name.

What should you keep in mind with Namespace?

In Kubernetes, the word means something related: a namespace separates resources inside one cluster, such as staging and production, or different teams. Names only need to be unique within a namespace. In both cases, a clear and consistent naming scheme from the start saves a lot of renaming later.

At a glance

CategoryCore glossary
Explained by
Updated

More Core glossary terms

All terms starting with N

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.