Jump to: navigation, search

Difference between revisions of "Namespace"


 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
A namespace is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e., names). An [[identifier]] defined in a namespace is associated only with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace.
+
==Basic definition==
 +
A namespace is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e., names). An object defined in a namespace is associated only with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace.
  
  
Line 6: Line 7:
 
In large computer programs or documents it is not uncommon to have hundreds or thousands of identifiers. Namespaces provide a mechanism for hiding local identifiers. They provide a means of grouping logically related identifiers into corresponding namespaces, thereby making the system more modular.
 
In large computer programs or documents it is not uncommon to have hundreds or thousands of identifiers. Namespaces provide a mechanism for hiding local identifiers. They provide a means of grouping logically related identifiers into corresponding namespaces, thereby making the system more modular.
  
<br>Namespaces are stored on every [[Metaobject]].
+
==Usage in {{UBIK}}==
The Metaobjects´ translation process reads the namespaces and attaches it to the standard namespace („UBIK.Runtime“ or „UBIK.Runtime.UI“).
+
Namespaces are stored on the Namespace property of several {{UBIK}} class types, such as [[MetaClass|MetaClasses]]. While there is no direct functionality behind this property, some controls in [[UBIK_Studio_Basics|{{UBIK}} Studio]] use it for structuring purposes, i.e. the [[Class Browser]].
In the [[treeview]] the [[views]] [[Inheritance]] and [[Contentview]] are getting grouped and sorted by namespace.
+
  
===Namespaces for systemcontentobjects===
 
Every systemcontentobject owns or is able to own the property namespace. The name of this property is given to the object as a namespace.
 
If the value is empty or the property does not exist, the metaobjects´ namespace will be generated.
 
It is also possible, that objects do have an empty namespace property.
 
The systemcontentobjects will be sorted via namespace and displayed in the [[Contentview]].
 
 
===Namespaces for standardcontentobjects===
 
The namespace of a contentobject is default a emptystring.
 
If necessary, the property namespace can be attached to a contentobject. In this case the returnvalue is the properties value.
 
''It is recommended to not use this type of implementation.''
 
  
 
[[Category:UBIK]]
 
[[Category:UBIK]]

Latest revision as of 11:09, 24 April 2013

Basic definition

A namespace is an abstract container or environment created to hold a logical grouping of unique identifiers or symbols (i.e., names). An object defined in a namespace is associated only with that namespace. The same identifier can be independently defined in multiple namespaces. That is, the meaning associated with an identifier defined in one namespace may or may not have the same meaning as the same identifier defined in another namespace.


For example, Bill works for company X and his employee ID is 123. Jane works for company Y and her employee ID is also 123. The reason Bill and Jane can be identified by the same ID number is because they work for different companies. The different companies in this case would symbolize different namespaces. There would be serious confusion if the two people worked for the same company, and still had the same employee ID. For instance, a paycheck issued to employee ID 123 would not identify which person should receive the check.

In large computer programs or documents it is not uncommon to have hundreds or thousands of identifiers. Namespaces provide a mechanism for hiding local identifiers. They provide a means of grouping logically related identifiers into corresponding namespaces, thereby making the system more modular.

Usage in UBIK®

Namespaces are stored on the Namespace property of several UBIK® class types, such as MetaClasses. While there is no direct functionality behind this property, some controls in UBIK® Studio use it for structuring purposes, i.e. the Class Browser.