데이터 기반 프로그래밍이란 무엇입니까?
저는 고객에게 제안하기 위해 코딩중인 물류 애플리케이션에 대한 세부 엔지니어링 계획을 작성하는 작업을 맡았습니다. 나는 그것이 데이터 기반 응용 프로그램이라고 들었습니다. 애플리케이션이 "데이터 기반"이라는 것은 무엇을 의미합니까? 그 반대는 무엇입니까? 웹 검색 중에 많은 사람들이 자신의 예제를 게시하는 것을 볼 수 있지만 이것에 대한 명확한 대답을 얻을 수없는 것 같습니다. 어떤 도움이라도 대단히 감사하겠습니다.
데이터 기반 프로그래밍은 데이터 자체가 프로그램 로직이 아닌 프로그램의 흐름을 제어하는 프로그래밍 모델입니다. 프로그램 로직이 흐름 또는 상태 변경의 일반적인 형태 인 프로그램에 다른 데이터 세트를 제공하여 흐름을 제어하는 모델입니다.
예를 들어 네 가지 상태가있는 프로그램이있는 경우 : UP-DOWN-STOP-START
상태를 나타내는 입력 (데이터)을 제공하여이 프로그램을 제어 할 수 있습니다.
- set1 : DOWN-STOP-START-STOP-UP-STOP
- set2 : 위-아래-위-아래
프로그램 코드는 동일하게 유지되지만 데이터 세트 (동적 입력 유형이 아니지만 컴퓨터에 정적으로 제공됨)가 흐름을 제어합니다.
데이터 기반 프로그래밍이 무엇인지에 대해 몇 가지 아이디어가 있지만 데이터 구조와 함수를 사용하여 예를 들어 보겠습니다.
데이터 기반이 아닌 예 :
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_lloyd = {'name': 'Lloyd', 'lives': function(){ print("Alcoy, Spain") }
data_jason = {'name': 'Jason', 'lives': function(){ print("London, UK") }
go = function(x)
x.lives()
end
첫 번째 예에서 하나의 결과를 표시하기위한 결정은 코드 로직에 있습니다. 마지막 예에서 출력은 함수에 전달 된 데이터에 의해 결정되며 그 이유 때문에 출력이 데이터에 의해 '구동'된다고 말합니다.
"데이터 기반 애플리케이션이라는 말을 들었습니다."라고 말한 사람에게 물어봐야합니다.
여기에서 그럴듯한 답변을 읽고 프로젝트 담당자가 의미하는 바가 전혀 아님을 알고 싶지 않습니다. 이 문구는 프로젝트에 확실히 적용되는 명확한 의미를 갖기에는 너무 모호합니다.
데이터 기반 개발은 코드가 아닌 데이터 구조를 편집하여 프로그램의 논리를 변경할 수있는 것입니다.
http://www.faqs.org/docs/artu/ch09s01.html 에서 데이터 기반 프로그래밍에 대한 자세한 정보를 찾을 수 있습니다 .
절차 적 프로그래밍
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;
}
}
데이터 기반 프로그래밍
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]);
}
데이터 기반 애플리케이션은 다음과 같습니다.
(1) 각 특정 데이터 세트에 대해 미리 결정된 결정을 내리고 결과로 결과를 던지기 위해 서로 다른 데이터 세트를 허용하는 일련의 규칙
(2) 결과에 따라 트리거되는 몇 가지 미리 결정된 프로세스.
완벽한 예는 ifttt.com입니다.
The application has nothing but rules. What makes it useful is the data that will flow through it.
This article explains most clearly what I understand the term to mean:
What is Table-Driven and Data-Driven Programming? http://www.paragoncorporation.com/ArticleDetail.aspx?ArticleID=31
Data/Table-Driven programming is the technique of factoring repetitious programming constructs into data and a transformation pattern. This new data is often referred to by purists as meta-data when used in this fashion.
There is no one at work that can help you with this question? It is very hard to visualize what you are working without without a greater example. But from what I gather it is going to be a program that they primarily enter information into. That will be able to retrieve and edit information that the customer needs to manage.
Best of luck!!
I think the advice given isn't bad, but I've always thought of Data Driven Design revolves around using existing or given data structures as the foundation for your domain objects.
For instance, the classic salesperson management program might have the following type structure of tables:
- Salesperson
- Region
- Customers
- Products
So, your application would be centered around managing these data structures, instead of taking a straight API which does things like - "make sale" etc...
Just my opinion as the other answers suggest ;)
참고URL : https://stackoverflow.com/questions/1065584/what-is-data-driven-programming
'development' 카테고리의 다른 글
C #에서 "인라인"배열을 사용할 수 없습니까? (0) | 2020.09.20 |
---|---|
gulp에서 사용 가능한 작업 목록을 얻는 방법 (0) | 2020.09.20 |
IIS7에서 실행하는 동안 maxAllowedContentLength를 500MB로 설정하는 방법은 무엇입니까? (0) | 2020.09.20 |
문자열 연결이 예상대로 작동하지 않음 (0) | 2020.09.20 |
CocoaPods-특정 포드 버전 사용 (0) | 2020.09.20 |