I've heard from someone that they´re using a business process automation tool (like Weblogic Integration) as a programming language (what sounds like something kind of stupid) to make things declarative. Then they put all the logic inside a process, every single if
and while
.
我从某人那里听说他们使用业务流程自动化工具(如Weblogic Integration)作为一种编程语言(听起来像是一种愚蠢的东西)来使事情变得陈述。然后他们将所有逻辑放在一个进程中,每个单独的if和while。
But, isn´t a process a how to step-by-step entity to reach a target?
但是,流程是一个如何逐步实现目标的过程吗?
For me it makes a process completely imperative. What do you think?
对我来说,这是一个完全必要的过程。你怎么看?
2 个解决方案
#1
1
It is definitely not what people usually mean when they talk about declarative programming, even if it some sense can be called declarative.
当他们谈论声明性编程时,它绝对不是人们通常的意思,即使它在某种意义上可以被称为声明式。
#2
2
Orchestration languages are in fact imperative scripting languages with conditionals, looping and other traditionally imperative constructs, typically expressed through a flowchart-based user interface. They certainly do not (in my experience) implement tail-recursive functional programming, backward chaining or any other paradigm that might reasonably described as declarative in the generally accepted sense.
业务流程语言实际上是命令式脚本语言,包括条件,循环和其他传统的命令式构造,通常通过基于流程图的用户界面表达。他们当然不会(根据我的经验)实现尾递归函数式编程,反向链接或任何其他可能在普遍接受的意义上合理地描述为声明的范例。
MS Workflow Foundation is advertised as having a rules engine, but this is fairly simplistic and doesn't really do forward chaining, except in a somewhat roundabout way. ILOG actually makes an adaptor for their rules engine specifically to drop it into MS workflow foundation.
MS Workflow Foundation被宣传为具有规则引擎,但这是相当简单的,并没有真正进行正向链接,除了有点迂回的方式。 ILOG实际上为其规则引擎制作了一个适配器,专门用于将其放入MS工作流基础。
Other workflow tools have better rule engines and a proper forward chaining system that could be viewed as declarative. However, once you get into the workflows themselves with looping and conditional branches you are most definitely in the territory of imperative programming.
其他工作流工具具有更好的规则引擎和适当的正向链接系统,可以视为声明性的。但是,一旦您使用循环和条件分支进入工作流程,您肯定是在命令式编程领域。
However, some systems also implement a petri-net or state change based markup system for workflow, which might reasonably be described as declarative, but they still have an imperative mode of interaction with the underlying system. They still update variables and have side-effects.
但是,一些系统还为工作流实现了基于petri网或状态更改的标记系统,这可能被合理地描述为声明性的,但它们仍然具有与底层系统交互的命令模式。他们仍然更新变量并产生副作用。
I have seen one or two applications (for example TOAD for data anlaysis) actually using MS Workflow Foundation as a scripting language. As such it allows you to add a scripting facility to the application that (at least for marketing purposes) doesn't require programming skill to use.
我已经看到一个或两个应用程序(例如TOAD for data anlaysis)实际上使用MS Workflow Foundation作为脚本语言。因此,它允许您向应用程序添加脚本工具(至少出于营销目的)不需要使用编程技能。
In practice, a tool designed for writing, editing and running SQL queries being fitted with a scripting framework for 'non-programmers' makes one wonder what audience it's really aimed at. As a scripting language, workflow modelling tools are fairly clumsy and offer very limited opportunities for abstraction; in practice a .Net based scripting language such as IronPython or Boo, particularly in conjunction with a decent templating mechanism, would be a very powerful addition to such a tool.
在实践中,设计用于编写,编辑和运行SQL查询的工具配有“非程序员”的脚本框架,这让人不知道它真正针对的是哪些受众。作为一种脚本语言,工作流建模工具相当笨拙,并且提供的抽象机会非常有限;实际上,基于.Net的脚本语言,如IronPython或Boo,特别是与一个体面的模板机制相结合,将是这种工具的一个非常强大的补充。
One point about graphical languages of this sort is that they do not scale well with complexity. A similar issue applies with ETL tools as well. I have seen a provisioning application (see below) that was done (ironically) with Crossworlds (now known as Websphere Integrator). Within a month of starting on the application it became obvious that the graphical workflow language was not going to scale with the complexity of the application and it was re-built, based on a custom rules engine written in Java and a fairly large body of bespoke java code.
关于这种图形语言的一点是,它们不能很好地适应复杂性。类似的问题也适用于ETL工具。我已经看到了一个配置应用程序(见下文),它与Crossworlds(现在称为Websphere Integrator)完成了(具有讽刺意义)。在应用程序启动后的一个月内,显而易见的是,图形化的工作流语言不会随着应用程序的复杂性而扩展,并且它是基于用Java编写的自定义规则引擎和相当大的定制服务器重新构建的。 java代码。
This type of issue is not uncommon with EAI and Orchestration systems and is one of the reasons that SOA is hard to implement in practice. What you are doing is actually pushing business logic into a very clumsy programming environment that is not being officially acknowledged as such. This will work in a simple case but is hard to make work on a complex system - this is sort of a guilty secret in SOA circles.
这种类型的问题在EAI和Orchestration系统中并不少见,这也是SOA在实践中难以实现的原因之一。你所做的实际上是将业务逻辑推入一个非常笨拙的编程环境,而这种环境并没有得到官方认可。这将在一个简单的情况下工作,但很难在复杂的系统上工作 - 这在SOA圈子中是一个有罪的秘密。
Coda: A provisioning application is a system that takes plans for telecommunication services contracts (in this case for a mobile phone network) and pushes configuration information based on rules out to various switches, billing applications and other applications. They tend to be fairly complex. When you buy a mobile phone plan with so many minutes and so many texts per month, a provisioning application is pushing out configuration information to the rest of the system about your access and billing rules.
Coda:供应应用程序是一个系统,它为电信服务合同(在这种情况下为移动电话网络)制定计划,并根据规则将配置信息推送到各种交换机,计费应用程序和其他应用程序。它们往往相当复杂。当您购买每月有这么多时间和大量文本的移动电话计划时,配置应用程序会将配置信息推送到系统的其他部分,以了解您的访问和计费规则。
#1
1
It is definitely not what people usually mean when they talk about declarative programming, even if it some sense can be called declarative.
当他们谈论声明性编程时,它绝对不是人们通常的意思,即使它在某种意义上可以被称为声明式。
#2
2
Orchestration languages are in fact imperative scripting languages with conditionals, looping and other traditionally imperative constructs, typically expressed through a flowchart-based user interface. They certainly do not (in my experience) implement tail-recursive functional programming, backward chaining or any other paradigm that might reasonably described as declarative in the generally accepted sense.
业务流程语言实际上是命令式脚本语言,包括条件,循环和其他传统的命令式构造,通常通过基于流程图的用户界面表达。他们当然不会(根据我的经验)实现尾递归函数式编程,反向链接或任何其他可能在普遍接受的意义上合理地描述为声明的范例。
MS Workflow Foundation is advertised as having a rules engine, but this is fairly simplistic and doesn't really do forward chaining, except in a somewhat roundabout way. ILOG actually makes an adaptor for their rules engine specifically to drop it into MS workflow foundation.
MS Workflow Foundation被宣传为具有规则引擎,但这是相当简单的,并没有真正进行正向链接,除了有点迂回的方式。 ILOG实际上为其规则引擎制作了一个适配器,专门用于将其放入MS工作流基础。
Other workflow tools have better rule engines and a proper forward chaining system that could be viewed as declarative. However, once you get into the workflows themselves with looping and conditional branches you are most definitely in the territory of imperative programming.
其他工作流工具具有更好的规则引擎和适当的正向链接系统,可以视为声明性的。但是,一旦您使用循环和条件分支进入工作流程,您肯定是在命令式编程领域。
However, some systems also implement a petri-net or state change based markup system for workflow, which might reasonably be described as declarative, but they still have an imperative mode of interaction with the underlying system. They still update variables and have side-effects.
但是,一些系统还为工作流实现了基于petri网或状态更改的标记系统,这可能被合理地描述为声明性的,但它们仍然具有与底层系统交互的命令模式。他们仍然更新变量并产生副作用。
I have seen one or two applications (for example TOAD for data anlaysis) actually using MS Workflow Foundation as a scripting language. As such it allows you to add a scripting facility to the application that (at least for marketing purposes) doesn't require programming skill to use.
我已经看到一个或两个应用程序(例如TOAD for data anlaysis)实际上使用MS Workflow Foundation作为脚本语言。因此,它允许您向应用程序添加脚本工具(至少出于营销目的)不需要使用编程技能。
In practice, a tool designed for writing, editing and running SQL queries being fitted with a scripting framework for 'non-programmers' makes one wonder what audience it's really aimed at. As a scripting language, workflow modelling tools are fairly clumsy and offer very limited opportunities for abstraction; in practice a .Net based scripting language such as IronPython or Boo, particularly in conjunction with a decent templating mechanism, would be a very powerful addition to such a tool.
在实践中,设计用于编写,编辑和运行SQL查询的工具配有“非程序员”的脚本框架,这让人不知道它真正针对的是哪些受众。作为一种脚本语言,工作流建模工具相当笨拙,并且提供的抽象机会非常有限;实际上,基于.Net的脚本语言,如IronPython或Boo,特别是与一个体面的模板机制相结合,将是这种工具的一个非常强大的补充。
One point about graphical languages of this sort is that they do not scale well with complexity. A similar issue applies with ETL tools as well. I have seen a provisioning application (see below) that was done (ironically) with Crossworlds (now known as Websphere Integrator). Within a month of starting on the application it became obvious that the graphical workflow language was not going to scale with the complexity of the application and it was re-built, based on a custom rules engine written in Java and a fairly large body of bespoke java code.
关于这种图形语言的一点是,它们不能很好地适应复杂性。类似的问题也适用于ETL工具。我已经看到了一个配置应用程序(见下文),它与Crossworlds(现在称为Websphere Integrator)完成了(具有讽刺意义)。在应用程序启动后的一个月内,显而易见的是,图形化的工作流语言不会随着应用程序的复杂性而扩展,并且它是基于用Java编写的自定义规则引擎和相当大的定制服务器重新构建的。 java代码。
This type of issue is not uncommon with EAI and Orchestration systems and is one of the reasons that SOA is hard to implement in practice. What you are doing is actually pushing business logic into a very clumsy programming environment that is not being officially acknowledged as such. This will work in a simple case but is hard to make work on a complex system - this is sort of a guilty secret in SOA circles.
这种类型的问题在EAI和Orchestration系统中并不少见,这也是SOA在实践中难以实现的原因之一。你所做的实际上是将业务逻辑推入一个非常笨拙的编程环境,而这种环境并没有得到官方认可。这将在一个简单的情况下工作,但很难在复杂的系统上工作 - 这在SOA圈子中是一个有罪的秘密。
Coda: A provisioning application is a system that takes plans for telecommunication services contracts (in this case for a mobile phone network) and pushes configuration information based on rules out to various switches, billing applications and other applications. They tend to be fairly complex. When you buy a mobile phone plan with so many minutes and so many texts per month, a provisioning application is pushing out configuration information to the rest of the system about your access and billing rules.
Coda:供应应用程序是一个系统,它为电信服务合同(在这种情况下为移动电话网络)制定计划,并根据规则将配置信息推送到各种交换机,计费应用程序和其他应用程序。它们往往相当复杂。当您购买每月有这么多时间和大量文本的移动电话计划时,配置应用程序会将配置信息推送到系统的其他部分,以了解您的访问和计费规则。