DEMETER(ID:1965/dem002)


adaptive OOP is viewed as a major advance in software technology based on using well known finite automata and formal language theory to express succinctly and process efficiently paths sets in architectural graphs (e.g. UML class diagrams). It allows you to make your software both simpler and more reusable by exploiting regularities which exist in most OO programs. It reduces software development and maintenance costs significantly. The more collaborating objects you use in a project, the larger the reduction.


Structures:
Related languages
C++ => DEMETER   Augmentation of
DEMETER => AP/S++   Positive strong Influence
DEMETER => DEM   Subset
DEMETER => Law-Governed Linda   Incorporated some features of

References:
  • Law-Governed Regularities in Object Systems; part 1: Principles. Naftaly Minsky Published in Theory and Practice of Object Systems (TOPAS) (John Wiley) Vol II, No. 4, 1996; view details
  • Lieberherr, Karl "Adaptive Object-Oriented Software: The Demeter Method" PWS Boston 1996 view details Extract: The Purpose of the Book
    The Purpose of the Book
    This book introduces a software development method, called the Demeter1 Method, for developing adaptive object-oriented software. The reader will learn the Demeter Method for evolutionary software development by specifying class dictionaries for defining the structure of objects and by specifying propagation patterns for implementing the behavior of the objects. The reader will learn how class dictionaries and propagation patterns are translated to C++. Translation to other languages that support the object-oriented paradigm is very similar. The behavior of objects may be implemented with only partial knowledge of the object structure.
    The Demeter Method is not yet another object-oriented method; it enhances and complements other object-oriented methods, such as Booch, Jacobson, Rumbaugh, and Wirfs- Brock, by lifting object-oriented software development to a higher level of abstraction by considering entire families of object-oriented designs and programs. This generalization of object-oriented software development amplifies the advantages of object-oriented technology and eliminates some of its disadvantages, such as the many tiny methods that hinder program understanding and reusability.
    One important insight of the Demeter Method is that for a significant fraction of programming tasks, solving a more general problem is easier than solving a specialized problem. This is why we work with families of programs and designs; it often happens that the families can be described much more succinctly than the individual programs. Let's take a look at nature to better understand how adaptive object-oriented software (adaptive software from now on) works. You find the essential information about an organism in its genes. We can view the genes as a process model of the organism, which will later be complemented by an environment or structural model that customizes the behavior of the organism. However, the process model puts certain constraints on the applicable environments. A palm tree will not thrive in Alaska.
    From the analogy to nature, we obtain the idea of focusing on the essence in process models, and we develop our software in terms of process and corresponding structural models. The process models (which are not only software development processes, but any kind of processes) focus on the essence of a given task, and they define constraints on applicable structural models.
    Why is it easier, for many programming tasks, to solve a more general problem? The essence of a process model is often more easily specified in terms of a partial structural model (for example, a partial data structure) than of a detailed structural model (for example, a complete data structure). The process models expressed as adaptive software therefore describe entire families of programs.
    The Demeter Method provides an approach to object-oriented software development that is, by experience, easier to use than traditional object-oriented software development methods.
    The purpose of the book is to make the concepts of adaptive software available in a form that is useful to software developers who currently use object-oriented languages. The book is the entry point to a wealth of other information on an adaptive software Extract: The Purpose of Adaptive Software
    The Purpose of Adaptive Software
    Adaptive software is an extension of object-oriented software where relationships between functions and data are left  exible, that is, where functions and data are loosely coupled through navigation specifications. Adaptive means that the software heuristically changes itself to handle an interesting class of requirements changes related to changing the object structure.
    Adaptive software is a natural evolution of object-oriented software since every objectoriented program is essentially an adaptive program. In many cases however, the adaptiveness of the object-oriented program can be significantly improved. Although object-oriented programs are easier to reuse than programs that are not written in an object-oriented style, object-oriented programs are still very rigid and hard to evolve. Our experience shows that for most application domains, object-oriented programs can be made significantly more general and extensible by expressing them as adaptive programs. An adaptive program allows us to express the "intention" of a program without being side-tracked by the details of the object structure.
    Adaptive software has several benefits:
  • Shorter programs and a higher level of abstraction
    Adaptive software allows shorter programs by focusing only on the interesting parts and by having the tedious work done automatically. Programs get shorter by several factors. The higher the level of a programming tool, the clearer and simpler are the programs.
  • Reusable software libraries
    Adaptive software is easier to extend than standard object-oriented software and allows for unplanned reuse. The "elastic" class structures used during adaptive software development facilitate reuse.
    Adaptive software allows the building of application-oriented, domain-specific reusable libraries, which can be used in similar projects with no extra cost for the reusability property (beyond the cost of object-oriented software). Adaptive software provides the unique capability of parameterizing software with minimal assumptions on how the software will be used. Producing adaptive software incurs no extra cost since the software is much shorter when written in adaptive form. Adaptiveness enhances reusability and the adaptiveness/reusability property pays o in the first project.
  • Ability to plan for changes, allow for learning
    An important advantage of adaptive software is that it allows for initial error and subsequent adjustment. Many problems are complex, and often it is not clear how best to structure the classes at the beginning. With adaptive software, we can easily make a first approach to the class structure and write the behavior with minimal dependency on that first approach, so that changing to a better class structure is much easier.
  • Ability to build on familiar object technology
    Adaptive software builds on the advantages of object-oriented technology. Objectoriented programs can often be gradually transformed into shorter, more  exible adaptive programs. Adaptive software can take advantage of any feature that the underlying object-oriented base language o ers; therefore adaptive software does not limit the creativity of the object-oriented programmer in any way.
  • Risk avoidance
    Adaptive software has no disadvantages with respect to object-oriented software. Adaptive software is usually significantly more expressive than object-oriented software, and the best adaptive software can be no worse than the best object-oriented software that can be written for a given application. Adaptive software can always be expanded into ordinary object-oriented software.
    Adaptive software can be learned in a few hours by someone who knows an objectoriented language and object-oriented design.
  • Minimal reliance on an object-oriented programming language such as C++ or Small- talk
    Adaptive software provides a tool that allows development of the important parts of software above the object-oriented programming level.
    Object-oriented programming is a promising technology that has been developed over the last twenty years. One important advantage of object-oriented programming is that it reduces the semantic gap between a program and the world it models because the world consists of physical and abstract objects that are represented naturally by software objects in an object-oriented program.
    However, object-oriented design and programming has several disadvantages, the most significant of which is that it binds functions and data too tightly. A loose binding between functions and data allows very generic software where data structure information in the functions or procedures is only used to constrain the applicable data structures. Before a program can be run, we select one of the applicable data structures, which in turn usually determines the structure of the input objects. The goal when writing the functions is to minimize the assumptions we make about the data structures. This technique could be called data-structure-shy programming, and it leads to generic software that can be  exibly customized later. One data-structure-shy program potentially describes an infinite collection of object-oriented programs. External link: Online copy of full book
  • Naftaly Minsky and Partha Pal "Imposing The Law of Demeter and Its Variations" the TOOLS Conference, Aug 1996, Santa Barbara, CA, USA view details
  • Naftaly Minsky and Partha Pal "Law-Governed Regularities in Object Systems; Part 2: the Eiffel Case" In Theory and Practice of Object Systems (TOPAS) (John Wiley) 1997; view details
  • Philippsen, Michael "A survey of concurrent object-oriented languages" pp917-980 view details
          in Concurrency: Practice and Experience 2000 v12 view details