Benefits & Issues
While the benefits and issues may vary between implementation, there are a few huge potential benefits and issues of this paradigm. Functionality simply requires that it knows the abstract data type of the variables it is working with. Functions and interfaces can be used on all objects with the same data fields, for instance the object's "position". Data can be grouped into objects or "entities" according to preference with little to no consequence.
While data-driven design does prevent coupling of data and functionality, in some cases, data-driven programming has been argued to lead to bad object-oriented design, especially when dealing with more abstract data. This is because a purely data-driven object or entity is defined by the way it is represented. Any attempt to change the structure of the object would immediately break the functions that rely on it. As a, perhaps trivial, example, one might represent driving directions as a series of intersections (two intersecting streets) where the driver must turn right or left. If an intersection (in the United States) is represented in data by the zip code (5-digit number) and two street names (strings of text), you might run into bugs when you discover a city where streets intersect multiple times. While this example may be over simplified, restructuring of data is fairly common problem in software engineering, either to eliminate bugs, increase efficiency, or support new features. In these cases responsibility-driven design may be promoted as a better approach, where functionality and data can be coupled together, so functions don't have to deal with the data representation itself.
Read more about this topic: Data-driven Programming
Famous quotes containing the words benefits and/or issues:
“One of your biggest jobs as a parent of multiples is no bigger than simply talking to your children individually and requiring that they respond to you individually as well. The benefits of this kind of communication can be enormous, in terms of the relationship you develop with each child, in terms of their language development, and eventually in terms of their sense of individuality, too.”
—Pamela Patrick Novotny (20th century)
“The universal moments of child rearing are in fact nothing less than a confrontation with the most basic problems of living in society: a facing through ones children of all the conflicts inherent in human relationships, a clarification of issues that were unresolved in ones own growing up. The experience of child rearing not only can strengthen one as an individual but also presents the opportunity to shape human relationships of the future.”
—Elaine Heffner (20th century)