The composition filters model denotes a modular extension to the conventional object model. It provides a solution for a wide range of problems in the construction of large and complex applications. Most notably, one implementation of composition filters provides an abstraction layer for message-passing systems.
Composition filters work by changing the behavior of an object through the manipulation of incoming and outgoing messages. This is done with the help of input and output filters which are controlled by conditions.
In concurrent and distributed computing, there are many problems such as scattering and tangling of code, which were difficult to handle using traditional object-oriented models. A need arose to develop a new software development model which addressed these concerns and this resulted in the formation of the Aspect-oriented software development paradigm. Several models in this paradigm were developed concurrently, and one of them is the Composition Filters Object Model. The creators of this model were Mehmet Aksit and various PhD students (Lodewijk Bergmans, Jan Bosch, Bedir Tekinerdogan) and many MSc. students from the TRESE Group at the University of Twente in the Netherlands. It was based on the Sina language [1] [2] which was developed by Mehmet Aksit in his PhD thesis. Many advancements have been made in the model since then. [3] [4]
The design of the composition filters model is an extension of the design of the kernel object model. The design consists of two major parts – the kernel (implementation part), and the outer layer (interface part). The extensions are made in the interface part to produce the composition filters model from the traditional kernel object model. [5]
The implementation part or the kernel consists of a single layer with three types of components:
It also consists of an encapsulation boundary which separates the implementation and the interface layers.
The Instance Variables are the only components of the kernel which are fully encapsulated. It is not possible to access these variables from outside the boundary. In this model, the Instance Variables can be of any type. Primitive data types such as integers, characters and user-defined data types such as classes and enumerations are all considered to be Instance Variables.
The behavior of an object is implemented through its methods. The method consists of two parts – the method body and the method declaration. The actions that an object is expected to perform on being invoked is defined in the method body. The method declaration consists of the method name, the name and type of the parameters and the return type. Methods are not completely encapsulated in the kernel and can be used in the interface part.
The initial method is a special method whose function is similar to that of the constructors in other object oriented models.
A method which has a Boolean return type and an empty parameter list is called a condition. Conditions can be used to provide information about the current state of an object. Similar to methods, conditions too can be used in the interface part and most of the usage of the conditions is outside the implementation part.
The interface part of the composition filters object model consists of two major components – the input and output filters. It also contains two supporting components – the internals and the externals. Moreover, the methods and conditions from the implementation part can also be accessed from the interface part.
The input and output filters are similar in design but vary in functionality. The input filters are tasked with dealing with the messages which are sent to the object, while output filters do so for messages being sent by the object. The main function of the filters is to manipulate the messages which arrive and pass them to the next layer. Filters are designed in layers, a message has to pass through one layer to reach the next. Each layer may consist of different filters. Each filter specifies a particular pattern. The pattern defines a syntax which an incoming or outgoing message must conform to. When a message arrives, two possibilities exist – the message is rejected by the filter or is manipulated by the filter. The way in which a message is rejected or manipulated depends upon the type of the filter.
A filter is designed using a set of filter element. This set is ordered since each message is applied from left to right. This continues till a match occurs.
Each filter element consists of three components – a condition, a matching part and a substitution part.
Internals are nested objects which reference to the input filters. They are completely encapsulated in the interface part. They are automatically created during the creation of an object.
Externals are nested objects which reference to the output filters. They are used to declare objects which lie outside the composition filters model but are still within its scope. An example of such objects are global variables.
The SINA programming language is an object oriented programming language which was designed to implement the features of composition filters object model. Each SINA program is a collection of classes, each of which can be separated into the implementation and the interface. The first implementation of SINA was for the Smalltalk and ran only in that environment. [6]
An abstract communication type object abstracts communication and interactions among objects. The objectives of an ACT is to improve the reusability throughout the application, to hide the implementation details in separate modules and reducing the complexity of modeling layered communications architectures.
Experts[ who? ] believe that conventional object-oriented models are too low-level because the semantics of communication between two objects cannot be easily extended to other objects. Therefore, there was a need for a high level language mechanism that can be used to model layered system architectures in which each system in a layer exchanges data with its adjacent layers. Mechanisms such as inheritance only provide abstraction at the object level, but fail in abstraction of communication among objects.
Composition filters model were applied to abstract communications among objects. The object module is extended by introducing input and output filters which determine what needs to be done with received and sent messages.
Notable ACT advantages include:
Composition filters can be used to incorporate database features such as persistent dynamic data structures, data sharing, transactions, multiple views and associative access into an object-oriented language. The basic object-oriented mechanisms such as inheritance and delegation are also provided by composition filters. In the database integration model, database operations such as union, intersect, exclude, and select are developed using composition filters without disintegrating object oriented mechanisms such as data abstraction, encapsulation, message passing and inheritance. [8]
Many implementations of composition filters exist (including SmallTalk and Java implementations). The advantage of existing implementations is that there is no difference between the conceptual and implementation model, which makes it easier to understand the implementation of certain features. The drawback, however, is that these implementations are slow and have a lot of overhead. One implementation in Java, namely ComposeJ, addressed this problem by using a compile-time oriented source modification approach. [9]
In object-oriented programming, a class defines the shared aspects of objects created from the class. The capabilities of a class differ between programming languages, but generally the shared aspects consist of state (variables) and behavior (methods) that are each either associated with a particular object or with all objects of that class.
Java Platform, Standard Edition is a computing platform for development and deployment of portable code for desktop and server environments. Java SE was formerly known as Java 2 Platform, Standard Edition (J2SE).
In software engineering and computer science, abstraction is the process of generalizing concrete details, such as attributes, away from the study of objects and systems to focus attention on details of greater importance. Abstraction is a fundamental concept in computer science and software engineering, especially within the object-oriented programming paradigm. Examples of this include:
This is a list of terms found in object-oriented programming.
A method in object-oriented programming (OOP) is a procedure associated with an object, and generally also a message. An object consists of state data and behavior; these compose an interface, which specifies how the object may be used. A method is a behavior of an object parametrized by a user.
In computing, the Windows Driver Model (WDM) – also known at one point as the Win32 Driver Model – is a framework for device drivers that was introduced with Windows 98 and Windows 2000 to replace VxD, which was used on older versions of Windows such as Windows 95 and Windows 3.1, as well as the Windows NT Driver Model.
ABAP is a high-level programming language created by the German software company SAP SE. It is currently positioned, alongside Java, as the language for programming the SAP NetWeaver Application Server, which is part of the SAP NetWeaver platform for building business applications.
Hardware abstractions are sets of routines in software that provide programs with access to hardware resources through programming interfaces. The programming interface allows all devices in a particular class C of hardware devices to be accessed through identical interfaces even though C may contain different subclasses of devices that each provide a different hardware interface.
In computing, an abstraction layer or abstraction level is a way of hiding the working details of a subsystem. Examples of software models that use layers of abstraction include the OSI model for network protocols, OpenGL, and other graphics libraries, which allow the separation of concerns to facilitate interoperability and platform independence.
In computing, an interface is a shared boundary across which two or more separate components of a computer system exchange information. The exchange can be between software, computer hardware, peripheral devices, humans, and combinations of these. Some computer hardware devices, such as a touchscreen, can both send and receive data through the interface, while others such as a mouse or microphone may only provide an interface to send data to a given system.
The architecture of Windows NT, a line of operating systems produced and sold by Microsoft, is a layered design that consists of two main components, user mode and kernel mode. It is a preemptive, reentrant multitasking operating system, which has been designed to work with uniprocessor and symmetrical multiprocessor (SMP)-based computers. To process input/output (I/O) requests, it uses packet-driven I/O, which utilizes I/O request packets (IRPs) and asynchronous I/O. Starting with Windows XP, Microsoft began making 64-bit versions of Windows available; before this, there were only 32-bit versions of these operating systems.
D-Bus is a message-oriented middleware mechanism that allows communication between multiple processes running concurrently on the same machine. D-Bus was developed as part of the freedesktop.org project, initiated by GNOME developer Havoc Pennington to standardize services provided by Linux desktop environments such as GNOME and KDE.
The Perl Object Environment (POE) is a library of Perl modules written in the Perl programming language by Rocco Caputo et al.
Object-oriented analysis and design (OOAD) is a technical approach for analyzing and designing an application, system, or business by applying object-oriented programming, as well as using visual modeling throughout the software development process to guide stakeholder communication and product quality.
In object-oriented programming, inheritance is the mechanism of basing an object or class upon another object or class, retaining similar implementation. Also defined as deriving new classes from existing ones such as super class or base class and then forming them into a hierarchy of classes. In most class-based object-oriented languages like C++, an object created through inheritance, a "child object", acquires all the properties and behaviors of the "parent object", with the exception of: constructors, destructors, overloaded operators and friend functions of the base class. Inheritance allows programmers to create classes that are built upon existing classes, to specify a new implementation while maintaining the same behaviors, to reuse code and to independently extend original software via public classes and interfaces. The relationships of objects or classes through inheritance give rise to a directed acyclic graph.
In computer programming, data-driven programming is a programming paradigm in which the program statements describe the data to be matched and the processing required rather than defining a sequence of steps to be taken. Standard examples of data-driven languages are the text-processing languages sed and AWK, and the document transformation language XSLT, where the data is a sequence of lines in an input stream – these are thus also known as line-oriented languages – and pattern matching is primarily done via regular expressions or line numbers.
In object-oriented programming, the dispose pattern is a design pattern for resource management. In this pattern, a resource is held by an object, and released by calling a conventional method – usually called close
, dispose
, free
, release
depending on the language – which releases any resources the object is holding onto. Many programming languages offer language constructs to avoid having to call the dispose method explicitly in common situations.
Domain-driven design (DDD) is a major software design approach, focusing on modeling software to match a domain according to input from that domain's experts. DDD is against the idea of having a single unified model; instead it divides a large system into bounded contexts, each of which have their own model.
Object-oriented programming (OOP) is a programming paradigm based on the concept of objects, which can contain data and code: data in the form of fields, and code in the form of procedures. In OOP, computer programs are designed by making them out of objects that interact with one another.
Pattern-Oriented Software Architecture is a series of software engineering books describing software design patterns.