I've been tasked at work to write a detailed engineering plan for a logistics application that we are coding to propose to a customer. I have been told that it is a data-driven application. What does it mean for an application to be "data-driven"? What is the opposite? I can't seem to get any really clear answer for this although while web searching I can see many people posting their own examples. Any help would be greatly appreciated.
20k 11 11 gold badges 66 66 silver badges 112 112 bronze badges asked Jun 30, 2009 at 19:39 2,488 6 6 gold badges 25 25 silver badges 26 26 bronze badges Pretty much all real world programming is data-driven. Commented Nov 8, 2012 at 15:44The classic The Art of Unix Programming has an good discussion of this topic: homepage.cs.uri.edu/~thenry/resources/unix_art/ch09s01.html. Key quote: "In data-driven programming, the data is not merely the state of some object, but actually defines the control flow of the program. Where the primary concern in OO is encapsulation, the primary concern in data-driven programming is writing as little fixed code as possible."
Commented Jul 13, 2013 at 21:43 FMc's answer is for me the most convincing explanation, and should be an answer, but elaborated. Commented May 24, 2015 at 7:38Data driven progamming is a programming model where the data itself controls the flow of the program and not the program logic. It is a model where you control the flow by offering different data sets to the program where the program logic is some generic form of flow or of state-changes.
For example if you have program that has four states: UP - DOWN - STOP - START
You can control this program by offering input (data) that represents the states:
The program code stays the same but data set (which is not of a dynamic input type but statically given to the computer) controls the flow.
answered Jun 30, 2009 at 19:51 3,578 3 3 gold badges 23 23 silver badges 18 18 bronze badgesThe programming part is writing/defining the "generic form of flow or of state-changes", am I right? But I can write such a "machine" in any language, and there is nothing unusual about that, so I don't really get anything out of your answer. Perhaps data-driven programming is when the language itself or a library, encourages or makes it very easy to write such machines. Or maybe the definition is that the language/library let's one define the machines in a declarative way, ie not procedural.
Commented May 24, 2015 at 7:36On en.wikipedia.org/wiki/Data-driven_programming, they use AWK as an example. In AWK two things are supplied, an expression defining what to be done with the data, and the data itself. What is the expression defining what to happen considered to be: 1) the programming, or 2) data. If it's considered to be data, then the programming is AWK's machine itself, which of course in the example of AWK is static. But in other contexts, eg if writing the machine itself in some traditional procedural way, that alone is the programming part.
Commented May 24, 2015 at 7:46So. assuming more powerful data drive programming examples are turing complete, does this not simply become an include statement in an engine with some pre-built assumptions and tools?