Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is data-driven programming?

Tags:

data-driven

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.

like image 674
jtbradle Avatar asked Jun 30 '09 19:06

jtbradle


People also ask

What it means to be data driven?

When a company employs a “data-driven” approach, it means it makes strategic decisions based on data analysis and interpretation. A data-driven approach enables companies to examine and organise their data with the goal of better serving their customers and consumers.

What is a data driven software?

Data-driven development is a software engineering approach that relies on data to guide the development process. It involves selecting and monitoring metrics or key performance indicators (KPIs) that help you better understand your product so you can make continuous improvements.

Is data driven a programming approach?

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.

What is a data driven program C++?

Data driven programming is where a program has a set of rules that operate on meta data that is loaded into the program. A different set of meta data will cause the program to operate differently using the same rules.


2 Answers

Data 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:

  • set1: DOWN - STOP - START - STOP - UP - STOP
  • set2: UP - DOWN - UP - DOWN

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.

like image 156
nojevive Avatar answered Oct 13 '22 00:10

nojevive


Although there are more than a few ideas as to what data driven programming is, allow me to give an example using a data structure and a function.

Non data driven example:

data_lloyd = {'name': 'Lloyd', 'lives': 'Alcoy }
data_jason = {'name': 'Jason', 'lives': 'London' }
go = function(x) 
    if x.name == 'Lloyd' 
    then 
        print("Alcoy, Spain") 
    else 
        print("London, UK") 
end

Data driven example:

data_lloyd = {'name': 'Lloyd', 'lives': function(){ print("Alcoy, Spain") }
data_jason = {'name': 'Jason', 'lives': function(){ print("London, UK") }
go = function(x)
    x.lives()
end

In the first example the decision to show one result or the other is in the code logic. In the last example the output is determined by the data that is passed to the function and for that reason we say the output is 'driven' by the data.

like image 45
2 revs, 2 users 72% Avatar answered Oct 13 '22 00:10

2 revs, 2 users 72%