What is data driven programming?

I was commissioned to write a detailed engineering plan for the logistics application that we are coding to offer to the client. I was told that this is a data driven application. What does it mean that the application is "data driven"? What is the opposite? In my opinion, I cannot get a clear answer to this question, although during the web search I see how many people publish their own examples. Any help would be greatly appreciated.

+78
data-driven
Jun 30 '09 at 19:39
source share
8 answers

Data programming is a programming model in which the data itself controls the flow of a program, rather than program logic. This is the model in which you control the flow by offering different data sets for the program, where program logic is some general form of flow or state changes.

For example, if you have a program with four states: UP - DOWN - STOP - START

You can manage this program by offering an input (data) that represents states:

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

The program code remains unchanged, but the data set (which is not a type of dynamic input, but statically set for the computer) controls the flow.

+79
Jun 30 '09 at 19:51
source share

"I was told that this is a data-driven application" - you need to ask who told you.

You do not want to read a plausible answer here, and then find out that this is not at all what the person in charge of your project meant. The phrase is too vague to have an unambiguous meaning, which is necessarily applicable to your project.

+42
Jun 30 '09 at 19:40
source share

Although there are some ideas on what data-based programming is, let me give you an example using a data structure and function.

Example without data:

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 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 is to show one result or another in the logic of the code. In the last example, the output is determined by the data that is passed to the function, and for this reason we say that the result is β€œdriven” by the data.

+42
Jun 06 2018-11-11T00:
source share

Data Driven Application:

(1) a set of rules that accept different data sets to make a predefined decision for each specific data set and discard the result as a result

(2) several predefined processes that are initiated based on the result.

A great example is ifttt.com

The application has only rules. What makes it useful is the data that will pass through it.

+6
Oct 12
source share

Data-driven development is something that can be brought into the program logic by changing not the code, but the data structure.

You can find more information about data-based programming at http://www.faqs.org/docs/artu/ch09s01.html

Procedural Programming

 var data = { {do:'add',arg:{1,2}}, {do:'subtract',arg:{3,2}}, {do:'multiply',arg:{5,7}}, }; foreach(var item in data){ switch(item.do){ case 'add': console.log(item.arg[0] + item.arg[1]); break; case 'subtract': console.log(item.arg[0] - item.arg[1]); break; case 'multiply': console.log(item.arg[0] * item.arg[1]); break; } } 

Data Management Programming

 var data = { {do:'+',arg:{1,2}}, {do:'-',arg:{3,2}}, {do:'*',arg:{5,7}}, }; foreach(var item in data){ console.log(eval (item.arg[0] + item.do + item.arg[1]); } 
+6
Jan 17 '17 at 20:38 on
source share

This article most clearly explains that I understand what the term means:

What is table-driven and data-driven programming? http://www.paragoncorporation.com/ArticleDetail.aspx?ArticleID=31

Data / table programming is a technique of factoring repetitive programming into data and a transformation pattern. This new data is often referred to by purists as metadata when used in this way.

+4
Jun 30 '09 at 20:05
source share

There is no one at work who could help you in this matter? It is very difficult to visualize what you are working without, for example. But from what I'm going to, it will be a program in which they primarily enter information. This will allow you to retrieve and edit the information that the client must manage.

Good luck!!

+1
Jun 30 '09 at 19:43
source share

I think this tip is good, but I always thought that Data Driven Design revolves around existing or data data structures as the basis for your domain objects.

For example, a classic seller management program may have the following table type structure:

  • Seller
  • Region
  • Customers
  • Products

So, your application will focus on managing these data structures, instead of taking a direct API that does things like β€œmake a sale,” etc.

Only my opinion, as other answers say;)

0
Jun 30 '09 at 19:48
source share



All Articles