What is the naming hierarchy in IBM

Object orientation. Object orientation glossary


1 Object Orientation Glossary Object Orientation 1

2 Index Object Orientation Abstract Data Type Abstraction Attribute Automatic Object Data Encapsulation Delegation Dependency Injection Destructor Extension Typed Object Oriented Language Scope Hierarchy Imperative Programming Instance Instantiation Instance Method Instance Object Instance Variable IoC, inversion of control Class Definition Class Method Class Object Class Variable Complex Class Composition Constructor Lifetime Multiple Inheritance Characteristic Metaclass 2

3 Method Upper Class Object Object-based Programming Object Hierarchy Object Model Object-Oriented Programming Object-Oriented Software Metrics Object Orientation Object Reference Object Type Persistence Polymorphism Prototype Procedural Programming Specialization Sub-Object Sub-Type Type Hierarchy Sub-Class Inheritance Imprint 3

4 Abstract data type ADT, abstract data type An abstract data type is the description of a data type through a combination of value ranges and applicable operations. Only syntactic and semantic properties, the so-called signature and algebra of an abstract data type, are defined. The internal data structure and the implementation of the operations are abstracted, so that several implementations are possible for an abstract data type, but all of them must comply with the signature and algebra. In object-oriented languages, abstract data types can be described by classes, but mostly only taking syntactic properties into account, e.g. Uniqueness of identifiers and definition of the types of attributes and arguments of the methods. Abstraction abstraction Abstraction is a term used in object-oriented programming (OOP). Abstraction is understood to be the restriction to the properties of objects that are essential for an application. In abstraction, only the properties of an object are considered that distinguish it from other objects from a conceptual point of view. This abstracts from the internal object structure and the implementation of the methods. Attribute attribute In general, attributes are descriptive properties that can be assigned to a file, a directory or a data field in a database. Attributes can designate parameters that are required for the correct management of resources. The term attribute exists in different contexts; in file management, Internet terminology, encryption, graphics, X.500 and programming languages. The term attribute is also used in object-oriented programming (OOP). This is understood to be a variable for storing object-specific data that is assigned to exactly one object. The set of attributes of an object 4

5 defines the object structure; the amount of current attribute values ​​the object state. Attributes of instance objects are also called instance variables, attributes of class objects accordingly class variables. Automatic object The term automatic objects is related to object-oriented programming. The scope of automatic objects extends from the declaration to the end of the surrounding block, e.g. Statement block, function, program. In the case of nested declarations of the same identifier, the link between an identifier and the next comprehensive declaration always applies. Their lifespan extends from the processing of the definition until the validity range is exited. The constructor is called automatically. This behavior is the usual behavior in all block-structured programming languages. Since here the declaration is always linked to the creation of the object, there is no risk of using object identifiers without an associated object or of no longer being able to identify created objects with this form. Another form are the application-controlled objects. In addition to these two forms, there are also mixed forms in object-oriented languages ​​that were developed from the C programming language. Data encapsulation Data encapsulation refers to the encapsulation of a data structure and the implementation of the operations that can be applied to it. An encapsulated data structure has an interface with the externally accessible operations. All access to the stored data takes place exclusively via the operations of this interface. Encapsulated data structures are often created as instances of abstract data types. In object-oriented programming, the objects form the units of the data encapsulation. 5

6 Delegation delegation The term delegation is used in object-oriented programming (OOP). Delegation is the processing of messages by forwarding them to other objects. The delegation of messages is e.g. Used in complex objects, in which received messages are forwarded to subobjects - that is, parts of a complex object. Dependency Injection DI, dependency injection Dependency Injection (DI) is a term that is related to object-oriented programming. This expresses that modules (objects, classes) are assigned their dependencies - information or a certain behavior by calling methods - from another, external instance, which is then also referred to as injection. This injection is performed by a DI framework such as the Spring or Unity framework. Closely linked to the term dependency injection is the principle of inversion of control - the reversal of the flow of control. With setter injection, constructor injection and interface injection, three different types of dependency injection can be distinguished. This also makes the planes on which the injection is made clear. The goal of using DI is to minimize dependencies between modules. Dependency injection is also a concept that can be used as part of a software architecture. The term dependency injection was coined and introduced by Martin Fowler. Under the below Link is a detailed description of this subject by Martin Fowler. The principle of Inversion of Control (IoC) has been an aspect discussed in this context since the beginning of object orientation. But only in the course of the further development of object-oriented programming languages ​​and concepts, such as in the environment of C ++, Java, Python and others, did this topic become more popular again; although the principle is by no means 6

7 is a new invention. Inversion of control is now to be understood as a general feature of frameworks, which in common parlance is also known as the so-called Hollywood principle Don't call us, we'll call you! designated. This means that the responsibility for program execution lies with the framework - which is also known as the reverse flow of control. The responsibility therefore expressly does not lie with the components that were developed on the basis of this framework. To do this, the corresponding modules must implement so-called callback methods (callbacks). The runtime environment for the framework is provided by a container. During runtime, the callbacks give the framework the option of transferring - injecting - information to these modules or, by injecting them, realizing a certain behavior of modules by calling their methods. In this way, the life cycle of a complete module can also be influenced externally by the callbacks. Dependency Injection (DI) is a special form of the Inversion of Control principle that was defined and introduced by Martin Fowler. The background was the predominant use of the inversion of control principle for the injection of references to required resources through lightweight frameworks such as Spring and containers such as PriceContainer or Excalibur. DI can hide the services of so-called service factories from the outside world. In object orientation, factories are objects that can in turn produce other objects. The use of DI should not create any dependencies between modules and classes. In any case, the responsibility for the interaction of modules lies with the framework, which requires further information regarding the configurations of these modules. These are either integrated directly into the code or are available separately in a configuration file - often an XML file. 7th

8 The transfer of used objects to objects to be used will always be based on this configuration information. The choice of configuration depends on the individual case at hand. There are three fundamentally different forms of dependency injection when submitting Different types of IoC 8

9 modules: Setter Injection. The DI framework uses the setter method to ensure that a required module is injected. Constructor injection. With constructor injection, the required modules are passed as arguments to the constructor of a class. Interface injection. Here the injection takes place via explicitly implemented interfaces both on the part of the module used and on the module using it. However, this possibility of injection is avoided in practice, since the implementation of the interfaces again results in dependencies. DI is best used when combining an application from different modules. The method can support various types of configuration. By assigning modules to a configuration, any forms of configuration, for example special server configurations or test configurations, can be set up by the framework. The focus of Dependency Injection is on the decoupling of modules that otherwise have no contact. Dependency Injection is not intended to be a substitute for factories. When configuring the modules using separate files, there is also a major disadvantage for the developer - the processes of an application can no longer be traced without precise knowledge of the configuration file. There are various frameworks that support dependency injection for different programming languages ​​and platforms: - For Java: Spring, EJB 3.0, Seam, Guice. - For .NET: Unity, Ninject, ObjectBuilder, LightCore, PicoContainer, Structuremap. - For Python: PyContainer. - For Ruby: Needle, Copland. 9

10 - For C ++: DSM. - For PHP5: Garden, Symfony Components, Stubbles IoC. An alternative option for dependency injection are so-called service locators - this refers to a higher-level directory of services. The Service Locator knows a corresponding implementation for all services that an application requires and makes them available on request. However, since nothing happens here without the using module explicitly requesting it, it is not possible to speak of a reversal of the control flow - the prerequisite for dependency injection. Destructor destructor The term destructor is used in object-oriented programming (OOP). This is a method that first deletes the attributes of an object and then the object itself. The opposite mechanism to the destructor is the constructor. Expansion expansion The term expansion is used in object-oriented programming (OOP). Extension is the definition of additional characteristics in a subclass. When expanding, the set of characteristics of a subclass, which due to inheritance contains all characteristics of the superclass (es), is supplemented by additional characteristics. With the expansion, a class becomes the specialization of its upper classes. Typed object-oriented language Typed object-oriented language is an object-oriented programming language that is based on a typification of the objects. In statically typed object-oriented languages, the type consistency of expressions and assignments can already be 10

11 can be checked during translation, while in dynamically typed object-oriented languages ​​this check is sometimes only possible at runtime. Typed object-oriented languages ​​offer a limited polymorphism. Area of ​​validity The two terms service life and area of ​​validity must be explicitly differentiated from one another in object-oriented programming languages. Dealing with an object includes not only the creation but also the declaration of an identifier that is associated with the object; the object definition is made up of the declaration of an identifier, possibly with type information, and the creation of the object. In object-oriented programming languages, objects are identified, for example, by variables or formal parameters that accept the created object. The object can be reached using this identifier within the validity range of its identifier. The area of ​​validity is therefore a static property, i.e. one that depends on the program text, and designates the part of the program in which precisely this object can be used under its identifier and with the same meaning. The block-structured object-oriented programming languages ​​differentiate between different types of object definition, such as automatic objects and application-controlled objects, which affect the scope and lifespan of the object. Hierarchy hierarchy The term hierarchy is used in network technology for the classification of structures. This term is also used in object-oriented programming. In object-oriented programming, hierarchy means the partial order 11

12 of objects or classes according to a relationship defined between them. Most object-oriented languages ​​use different orthogonal hierarchies: the object hierarchy, which is based on the composition part-of relationship, and the class hierarchy, which is based on inheritance of the implementation. In some languages, a distinction is made between the type hierarchy. Imperative programming imperative programming In imperative programming, programs are formulated as consecutive commands. The commands change values ​​stored in variables during program execution and can thus determine calculation results. Imperative programming is a programming paradigm and is implemented, for example, in procedural programming and object-oriented programming. Another paradigm is declarative programming. Instance entity In computer science, an entity describes the abstract, individual object. The objects can be of material or immaterial origin. Entity is comparable to the concept of the object or the instance in object-oriented programming. Entity is often used in connection with the modeling of the data-oriented view with the help of ER modeling (Entity-Relationship-Model). Entities can exist in relation to themselves and also to other entities. Entities are assigned a specific entity type. The properties of entities are identified by attributes. This allows entities of the same entity type to be distinguished from one another. Entity sets identify the combination of individual entities of an entity type. Entity types can in turn be assigned to entity classes. This corresponds to the point of view in object-oriented programming. 12th

13 Instantiation Instantiation, which is related to object-oriented programming, is specifically understood to mean the creation of an object as an instance of a class. The instantiation may require the specification of object-specific parameters. It includes the creation of a memory area for the instance as well as the assignment of attributes with default or initial values. Instance method The term instance method, which is used in object-oriented programming, refers specifically to a method that can be executed by an instance of a class. An instance method must be defined in the corresponding class or inherited from a superclass. An instance can execute exactly those methods that are instance methods of its class. Instance object An instance object is specifically understood to be the instance of a class which, in contrast to class objects, cannot itself create instances. The term instance object occurs in object-oriented programming. Instance variable Instance variable is a term used in object-oriented programming (OOP). This is a variable that is assigned to an instance of a class. An instance variable is therefore an attribute of a class that is created each time this class is instantiated for the new object. Instance variables have the same lifespan as the object to which they are assigned. The current values ​​of the instance variables of an object describe the object state. 13th

14 IoC, inversion of control Inversion of control (IoC) is a term that, in connection with object-oriented programming, describes a paradigm in which a reusable module calls a specific module. Modules are used to describe separate and independent parts of software - these can be objects or classes. The reversal of the control flow should not be confused with the principle of the reversal of dependencies (Dependency Inversion Principle), which is equally well known in object-oriented programming. Rather, the reversal of the flow of control can be a consequence of the reversal of the dependencies. Inversion of control is also represented in common parlance as the application of the Hollywood principle: Don t call us, we ll call you. There are two ways to implement IoC - Dependency Lookup and Dependency Injection. IoC is one possible way to reduce coupling. As soon as the handling of events is to be made available by a reusable module, IoC is used.So the specific modules do not call the reusable modules for certain events, but the opposite is the case. The concrete implementation of an object creates dependencies. The reusable module can also be designed as a complete framework, in the framework of which the classes for specific and concrete applications are then combined. In IoC, the framework then takes on the role of the main program and takes care of the life cycle of objects. In addition, the 14

15 Framework provides an interface that must first be implemented by the specific modules so that it can then be called by the framework - this is also referred to as a callback mechanism. There are two possible forms of implementation of IoC: - Dependency Lookup, a container provides callbacks to the components and a lookup context. This approach is used, for example, with Enterprise JavaBeans or Apache Avalon. It is the task of the individual components to implement the lookup on resources using the relevant APIs in the container. - Dependency Injection is a special form of the IoC. The following explains what IoC can mean for practical software development. A classic approach is to hard-code classes and their dependencies. In doing so, concrete classes are used, which are then used via constructors or properties. With IoC, a container creates instances and injects dependencies and receives dependencies. 15th

16 The figure illustrates this procedure - LogManager is directly dependent on the specific implementation of LogWriter. This defines which interactions are carried out with other objects during compilation. Changes at runtime are therefore not possible at all. Changes of any other kind can only be introduced after previous modification of the source code and subsequent compilation. It is more advantageous if this procedure is reversed. A component - the container shown in the figure - creates the objects and dynamically decides at runtime how and in what form specific implementations are to be used. Since the container takes over control, it is also called inversion of control. The use of this principle requires abstractions such as interfaces and the use of abstract classes in order to be able to realize the possibility of dynamic influencing. Class definition class definition A class definition is the definition of the characteristics - these are the characteristic properties such as attributes and methods - of objects. A class definition describes the objects of a class using a scheme according to which instances of this class are created and manipulated. This schema consists of the class name and the attributes and methods of the class. If inheritance is supported, a class definition can also contain the names of the superclasses of the new class. In addition, class definitions can describe the access rights to attributes and methods and thus define a subset of their characteristics (attributes and methods) as an interface. 16

17 Classes and Objects of Object-Oriented Programming (OOP) Class Method The term class method is related to object-oriented programming. A class method is specifically understood to be a method that can only be executed by a class object and not by instance objects. Class methods are only supported by object-oriented programming languages ​​with class objects. You can only access class variables and other class methods, not instance variables and instance methods of your class. 17th

18 Class Object The object-oriented programming approach assumes that every activity is based on the action of an object. In particular, the creation of instances of a particular class is such an activity. This activity can be ascribed to a special instantiation object that then uses construction information from the class definition. In terms of information encapsulation, the point of view is that there is a special instantiation object for each class that knows the class information. The class itself can be understood as such and thus becomes a class object. In this context, such a class object is also called a factory object, which creates or deletes objects through operations such as create and possibly destroy. Factory or class objects can, however, also have other characteristics. The attributes of the class objects are also known as class attributes (or class variables), and the methods accordingly as class methods. In this sense, the constructors in each class can also be viewed as class methods of the class objects. Class variable The class variable is related to object-oriented programming. This specifically means a variable that represents an attribute of a class object. The current values ​​of class variables describe the state of a class object. They are accessible to all instances of the corresponding class. Since there is exactly one class object for each class, each class variable is only created once. Complex class The term complex classes is used in object-oriented programming (OOP). This is understood to be a class for which one or more attributes with object type are defined. An object of a complex class, a so-called complex object, therefore consists of one or more objects of other classes, so-called 18

19 sub-objects. A complex object can have any number of sub-objects, as lists, sets or arrays of objects of a certain type can also be implemented through an object type. An instance of a complex class is also referred to as a complex object. Composition composition The term composition is used in object-oriented programming (OOP). Composition is the definition of complex classes by defining one or more attributes with object type. In object-oriented languages, complex objects are created as instances of a complex class. The sub-objects of a complex object are called components or sub-objects. Constructor constructor The term constructor is used in object-oriented programming (OOP). A constructor is a method that creates an object and / or initializes its attributes. A constructor that creates objects must be defined as a class method, while the constructor that only initializes the attributes of an object can also be defined as an instance method. The opposite mechanism to the constructor is the destructor. Lifetime lifetime The term lifetime is treated here in the context of object-oriented programming languages, whereby the two terms lifetime and area of ​​validity must be explicitly differentiated from one another. The service life of an object is dynamic, i.e. a property that depends on the program run, and describes the period from the creation of an object to its termination. In addition to the generation, the handling of an object also includes the 19th

20 declaration of an identifier which is associated with the object; the object definition is made up of the declaration of an identifier, possibly with type information, and the creation of the object. Objects are used in object-oriented programming languages, e.g. identified by variables or formal parameters that accommodate the created object. The object can be reached using this identifier within the validity range of its identifier. The block-structured object-oriented programming languages ​​differentiate between different types of object definition, such as automatic objects and application-controlled objects, which affect the scope and lifespan of the object. Multiple inheritance The term multiple inheritance is used in object-oriented programming (OOP). Multiple inheritance is an inheritance in which a class has several direct superclasses. A class that is defined by multiple inheritance inherits the characteristics of all superclasses. Conflicts can arise if a characteristic is defined in different superclasses or if an indirect superclass occurs as a multiple superclass. Characteristic The term characteristic is used in object-oriented programming (OOP). Characteristic is a generic term for the characteristic properties of an object, i.e. its attributes and methods. Metaclass meta class A metaclass is a class whose instances are in turn classes. In object-oriented programming languages ​​with metaclasses, classes are used as objects, 20

21 so-called class objects. These class objects are in turn instances of a class that is referred to as a metaclass. Since metaclasses can also be viewed as class objects, metaclasses and class objects cannot be clearly distinguished from one another. The concept of metaclasses enables dynamic manipulation of class definitions, among other things. Method method In object-oriented programming (OOP), a method defines an operation which an object can perform and which is characterized by the corresponding class definition, its name and its argument types. The permitted methods of an object are determined in object-oriented languages ​​by the class definition. The methods implement the services of an object and determine the object behavior. Superclass In object-oriented programming (OOP), a superclass defines a class, the attributes and methods of which are transferred to derived classes, the subclasses, by inheritance. Depending on the number of inheritance levels, i.e. the number of classes between a subclass and a superclass, one speaks of the direct or indirect superclasses of a class. In addition, there is the multiple upper class and the virtual upper class. The multiple superclass is a special class that occurs multiple times as the superclass of a derived class. A derived class has a multiple superclass if it is derived multiple times, either directly or indirectly, from the same class. In the second case, several superclasses of the derived class have a common superclass. The problem of repeated inheritance arises from having multiple superclasses. 21

22 Inheritance with subclasses and superclasses A virtual superclass is to be understood as a multiple superclass, the characteristics of which are inherited only once to each derived class, i.e. the subclass. Virtual superclasses avoid the problem of repeated inheritance by suppressing multiple inheritance of their characteristics through an indirect subclass. 22nd

23 Object O, object 1. An object is an abstract element of our imagination and can therefore be all or nothing. Depending on the application, the word object is interpreted differently. In data communication, for example, an object is an executable data packet that contains data, codes, functions and process mechanisms. The object reflects a reality from the application environment including all contexts. It is the model-like replication of structures that describe a software problem and that work together on the way to the result. Objects can be related to one another, the interaction between the objects taking place according to a functional plan. In software, an object is understood to be an instance of a class, which in turn is formed by the abstract description of the objects. Systems created with objects are very secure and of high quality because only their own code can access the data. To enforce this encapsulation, the code is grouped into a limited number of methods. Different objects can react differently to a command. 2. In object-oriented programming (OOP), an object is understood to mean the combination of a data structure and the methods that can be applied to it to form a unit. An object has a structure - the object structure -, a state - the object state -, a behavior - the object behavior - and an identity. In object-oriented languages, every object is an instance of a class, the definition of which, the class definition, determines the characteristics of the object. An object can either be an instance object or a class object. In object-oriented programming, objects form the units of data encapsulation. In object-oriented programming, the object structure is understood to be the data structure 23

24 Classes and objects of object-oriented programming (OOP) of an object, which is described by the set of attributes. Under object status you specifically see the current value assignment of the attributes of an object. The permissible states of an object are determined by the types of the attributes and possibly additional restrictions on the combination of the values ​​of various attributes. The term object behavior characterizes the behavior of an object, i.e. actions and reactions of an object in the form of changes in the object state and the sending of messages. The object behavior is determined by the definition and implementation of its methods. 24

25 Object-based programming object-based programming Object-based programming is a programming paradigm that supports objects and thus the principle of data encapsulation. In contrast to object-oriented programming, object-based programming does not support inheritance. Object-based programming supports abstractions (only) by creating objects that communicate with each other through messages and execute methods. This manipulates the state of the objects. The construction descriptions of all objects of a class are precisely specified in class definitions, i.e. all their attributes, their value assignment determine their state, as well as the behavior of the objects of the class. Object hierarchy The term object hierarchy is used in object-oriented programming. This is understood to mean the partial order on the set of objects according to the compositional relationship that exists between them (part-of relationship). Components are arranged as successors of the object to which they belong. Object hierarchies are built on complex objects and are dynamic because they can be changed at runtime by assigning, creating and deleting objects. They are represented by directed graphs. Object model object model 1. Object models describe specific objects which are characterized by their properties and which can be accessed via their interfaces. Often these are software components that are collected and managed in libraries and each of which is individually identifiable. The object models describe the properties for object-oriented programming and create the basis so that the individual software components can communicate with one another and be linked. 25th

26 The Component Object Model (COM) from Microsoft represents such an object model, others are the System Object Model (SOM) from IBM, the Document Object Model (DOM), the Java Document Object Model (JDOM) and the object model for network applications DCOM (Distributed) and CORBA. 2. In object-oriented programming, an object model is understood to be the set of object-oriented mechanisms on which an object-oriented language or an object-oriented design is based. Possible criteria for characterizing an object model are abstract data types, data encapsulation, classes, class objects, metaclasses, inheritance, composition, typing, polymorphism, persistence and parallelism. Object-oriented programming OOP, object-oriented programming. Object-oriented programming (OOP) is a method for modularizing programs that differs greatly from classic procedural programming. Object-oriented software, when well designed, is easier to maintain and expand than procedural software. In addition, it simplifies unit tests and reuse of software parts thanks to the strict modularization. It follows the programming paradigm of imperative programming. In object-oriented programming, programs are divided into units called objects. Every object has a state that is described by its properties (object attributes). Only the functions (called methods) present in the object itself can manipulate its data and thus change the state. Objects can send messages to other objects (by calling their methods) asking them to change their state. Ultimately, however, it is up to the object to decide whether it will comply with the request. Thus the object is always 26

27 in a well-defined, self-controlled state. In OOP programming, data and functions are combined into objects. These objects can be related to each other in a variety of ways, by calling each other's methods or by an object containing other objects. In this way, the software objects form a very flexible overall system. Summary of data and functions in object-oriented programming (OOP) 27

28 Every object belongs to a class. Classes are also often described as blueprints for objects because they define which attributes and methods the associated objects have. Every object is an instance of its class, one also says: The object o instantiates the class k. There can be any number of objects of a class, the properties of which can but do not have to differ. A merchandise management system, for example, only knows one article class, but many article objects. Classes and Objects of Object Oriented Programming (OOP) 28

29 Object-oriented programs meet various important criteria that can simplify and accelerate development and at the same time improve quality: - Data encapsulation: The data of an object cannot be changed from outside in an uncontrolled manner; ultimately, the object itself always decides on changes to its state. - Interchangeability: Objects are abstractions of real entities and actors that hide their actual implementation from the outside world and thus become interchangeable. - Inheritance: Properties and functions of an object can be passed on to other objects and taken over, changed or overwritten by them. - Polymorphism supports the interchangeability of objects, because the same message can be sent to different objects and accordingly cause different actions on them. Not every programming language supports object-oriented programming. For example, C and Pascal are purely procedural. Other languages ​​such as C ++ or Object Pascal allow OOP, but do not enforce it. The resulting programs can be a mix of different paradigms. The same applies to languages ​​such as PHP or Perl, which can be made OOP-capable through extensions. Others like Eiffel, Smalltalk, Java or C # are purely object-oriented. In addition to the actual object-oriented programming, object-oriented methods for object-oriented analysis (OOA) and for object-oriented design (OOD) of software systems have also become established. The Unified Modeling Language (UML) has established itself as the generally recognized notation for these procedures. Appropriate software tools, some of which are integrated into development environments (IDEs), allow 29

30 the generation of software from graphically designed systems or, conversely, document finished systems in UML notation. A recurring problem in practice with many possible solutions is the connection between relational databases (RDBMS) and object-oriented software. Object Relational Mapping (ORM) converts relational structures into objects and vice versa. Alternatively, object-relational or object-oriented databases can also be used, although their distribution is not very widespread. Object-oriented software metrics To measure software products, so-called software metrics are used, which quantify different properties of software products and processes. The classic software metrics according to Halstead, McCabe or Rechenberg presented in the 70s and 80s as well as the LOC metrics are classified in the group of conventional software metrics. This includes the scope metrics, which determine the size of a software under various aspects. This can be the number of coded lines as with Lines-of-Code (LOC), the combination of the number of operators and operands (Halstead) and the process-oriented approach of the function point metric. The McCabe metric shows another way, which includes the logical structure, among other things, the nesting depth of loops in the measurement. According to the metric according to Rechenberg, the aspect of measuring the software complexity is emphasized, which is also generally referred to as data structure metric. The number of variables, their validity and service life as well as their referencing are integrated into the measurement. Another conventional method is the so-called style metric, which is limited to determining the proportion of comments in the source code. 30th

31 One result of recent research are the so-called object-oriented software metrics. When measuring software, these take into account the summary of data structures and the methods that can be applied to an object, its relationships to other objects and the general structural features of object-oriented programming - such as data encapsulation, inheritance, classes, methods and abstraction. To better classify these metrics, the following levels can be differentiated: Measurement at method level. This is where the properties of methods are measured. Conventional methods such as Lines-of-Code (LOC) or McCabe can still be used for this. Measurement at the class level. This is where the structural features of classes are measured. The following metrics can be used as a measure: Response for a Class (RFC), Weighted Methods for Class (WMC) and Lack of Cohesion in Methods (LCOM). Measurement of inheritance hierarchies. The structures created by inheritance and abstraction are considered here. The Number of Children (NOC) method is a suitable measure for this. Measurement of aggregation hierarchies. A measure for the link between classes is determined here. The Coupling between Objects (CBO) method is ideal for this. In general, with regard to the mentioned metrics, their partial lack of theoretical foundation and the exclusive measurement of trivial facts are criticized. Object orientation OO, object oriented In this article, object orientation is defined from different perspectives. This from the fact that ultimately the weighting of the individual aspects is decided by the specific application. A common denominator defines 31

32 Object orientation with the items object-based, class-based and the inheritance mechanism. Object orientation includes: 1. Object-based, i.e. encapsulation of attributes, 2. Class-based through quantity abstraction, i.e. the joint modeling of similar objects in the form of a class, and 3. Inheritance, i.e. the transfer of attributes between classes. Object-oriented design is the method that leads to software architectures that are based on the objects processed by each system or subsystem, and not on the function that the system realizes. With an object-oriented design, the development of software systems is also defined as a structured collection of implementations of abstract data types. It can thus be stated that object-oriented structuring is based on a different point of view when designing programs and can be implemented through a collection of abstract data types. The structure of programs is based on their data. An object-oriented program is the collection of autonomously acting agents, called objects. The computation proceeds through the interaction of the objects. Objects and their communication with one another are identified as main components and inheritance plays a subordinate role. Object-oriented systems are object-based, class-based, support inheritance between classes and parent classes and allow objects to send messages to one another. Here the aspect lies on the inheritance and abstraction of objects by classes. 32

33 In summary, an object-oriented programming language supports: - an object-based, modular structure, - data abstraction, - automatic storage space management, - classes (as types), - inheritance, - polymorphism and dynamic binding as well as - multiple and repeated inheritance. The definition in a specific case certainly depends on the weight given to the individual concepts. Object reference object reference The object reference is a term from object-oriented programming. This specifically means a pointer to an object. In typed object-oriented languages, any object reference is restricted to objects of certain classes. On the basis of polymorphism, an object reference can point to instances of the class assigned to it or one of its subclasses. Object type object type The term object type is used in object-oriented programming. This is understood to be a type that is determined by a class definition. In typed object-oriented languages, a class definition describes a user-defined type, which is referred to as an object type and can be addressed using the name of the class. The interpretation of this name depends on the context, i.e. it can stand for a type or a class, depending on its use as an identifier. 33

34 Persistence persistence Persistence is the property of an object that makes its lifespan permanent and therefore independent of the execution of the generating program. Persistent objects have a potentially infinite lifespan and can only be accessed by explicitly calling a special method, e.g. of the destructor, can be deleted again. They are therefore stored in permanent storage systems, e.g. object-oriented database systems. Classes are static descriptions of a set of objects. The collection of classes describes an object-oriented program. The program itself consists of the objects which, through their exchange of messages, make the program run. For various reasons it is necessary and desirable to interrupt a program at a certain point and start it again at this point. For this purpose, the data calculated during the program run must be suitably saved. In object-oriented programming, this mainly affects the objects with all the links between them. Persistence is the property of objects to exist beyond the runtime of the program in their identity, their state and their description. Of course, it would be easiest if every object knew how to store itself and how to identify itself again. In fact, this is achieved by the fact that there are generally available parent classes in most programming languages ​​that provide these same functionalities. The persistence of objects becomes a problem when class descriptions change, but the same stored data is to be used further. Object-oriented databases in particular deal with this problem area. An interesting problem in this context is the frequently asked demand for the use of relational database management systems in connection with the object-oriented structure of a system. This usually leads to another layer in 34

35 the architecture of a system, which converts objects into relations and vice versa. Polymorphism polymorphism Literally, polymorphism means many manifestations. The term is used for various forms of object-oriented programming languages. 1. The property of variables to be able to assume different types. 2. The ability of functions to accept polymorphic arguments. 3. The property of a function to be defined for different parameter sets with the same name. 4. The property of an operator to refer to instances of different classes during runtime. Therefore, polymorphic messages are interpreted differently by different objects. According to the role that typing plays there, programming languages ​​are divided into two classes: statically and dynamically typed languages. Static here means that certain type information can already be evaluated in the program text - i.e. by the compiler. In contrast, dynamic here means that the runtime system only evaluates this type information when the program is running. In statically typed programming languages ​​such as Pascal, Modula, the programming languages ​​C, C ++, a type is currently assigned to the variables in an explicit declaration and determines how the value of a variable can be interpreted and manipulated. In dynamically typed programming languages ​​such as Lisp and small talk, this is just not the case. The type information is not stored there with the variable declaration, but the value of a variable contains its type information. One consequence is that variables or function arguments can accept values ​​of different types during runtime and are then manipulated differently according to the value assignment. 35

36 functions can now be programmed in such a way that they can carry out different actions regardless of the typing of their arguments. + defines differently on int arguments than on real arguments and delivers different values ​​of types as function values. Such variables, arguments and functions are called polymorphic (many forms). Prototype In connection with object-oriented programming, a prototype is an object that serves as a template for generating additional objects. The template can in turn be a copy of an object or a corresponding reference to it. In principle, all existing objects can be used as prototypes for new objects. The inherited properties - these are attributes and methods - behave like the original properties of the prototype. JavaScript is an example of a programming language that supports this method of inheritance, which is based on objects. One advantage of this mechanism is that prototypes and objects derived from them can be modified while the program is running. One speaks here of prototype-based programming or, likewise, of classless object orientation. When objects are created on the basis of classes, their structure is determined by the structure of the class. This means that the properties of an object - i.e. its attributes and methods - are already defined when they are created, and they can no longer be modified. The class is the underlying model of the object. An alternative way is prototype-based programming. A new object is created on the basis of a prototype, and the concrete structure of the object is only determined afterwards. For example, attributes and / or methods can be added 36