Data-driven Programming - Benefits & Issues

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:

    While greedy good-doers, beneficent beasts of prey,
    Swarm over their lives enforcing benefits ...
    Robert Frost (1874–1963)

    Cynicism formulates issues clearly, but only to dismiss them.
    Mason Cooley (b. 1927)