What is a rule engine?
什么是规则引擎?
A Rule Engine is a software system that contains rules on behalf of another system. Many different kinds of rules can be contained in a rules engine: business, legal, company policy, navigation, computational. An example, a website that prompts the user to fill out a form that has dependencies between pages could use a rule engine to control the verification of the validity of the form and the navigition between pages. Another example, a bank could have a set of rules that dictate the interest rate and fee's associated with a checking account. It also provides a means to classify and manage rules in a centralized location instead of being hardcoded throughout an application.

Why use a rule engine?
为什么使用规则引擎?
Most companies business strategies are constantly in flux due to their changing internal and external environments; the CEO has a new idea on increasing sales, consumer base is being eroded by a more aggressive competition, current business practices wiill soon be out of compliance due to changes in regulations. How do handle changes in a system in an maintainable, reusable, extensibility, and ownership?
由于内部外部的环境地变化,大多数公司的商业经营策略会经常持续地变动。CEO 有一个新的想法,增加销售量,顾客 以减少竞争对手的不断侵蚀。当今商业仍没有脱离依赖,正是由于变化的规则。怎么把握系统的变化,做到可维持,可重用,可扩展,和所有权等?

Maintainability is increased by using a rule engine by centralizing the rules. Typically a non-rule engine based systems that contain rules of moderate complexity will implement its rules in methods of objects that encapsulate business logic (business objects). They refer to other business objects that form associations with other business objects, typically creating an intricate web of associations. Since these objects are tightly coupled changes to them can have rippling effects throughout the collection. Clarity of the rules in such a system can be quite poor when the rules cross these objects. Not only is it difficult for a developer to understand the details of such relationships, but even more so to change them.
规则引擎通过集中规则来增强系统的可维护性。对于不基于规则引擎的含有规则的系统,典型的简化复杂性的处理方法是将它的规则插入业务逻辑对象的方法中。这 些业务逻辑对象涉及到其他业务逻辑对象,尤其是形成的错综复杂的关系网。那些对象紧紧地联系的变化会透过对象集成产生联动效果。清晰的规则贯穿于这些对象 实体中,这样系统就变得相当的不健壮。对于开发人员仅仅理解这些关系的详细内容就是困难的,更甚至是要改变这些关系。

Typically a rule engine based system will use a proxy class that delegates a call to a rule engine.
基于规则引擎的系统典型的方法就是使用一个代理类通过委托调用规则引擎。

Ownership of rules can be shifted to business units with a rule engine, especially with SRE. Rules being declarity in nature are easy to understand.  SRE was designed around its rules being contained in a simple to understand XML file, hence the word SIMPLE in SRE. XML should take no more than a day to learn; they even have XML for dummies and XML in 24hours books.
系统自有的规则都转移到集中的规则引擎中,尤其使用SRE。规则使用容易理解的自然语言描述。SRE设计将规则放置在简单易于理解的XML文档中。XML很容易学习,可以不超过一天时间,就有一些 XML in 24hours 等书籍

What is SRE (Simple Rule Engine)?
什么是SRE(Simple Rule Engine)?
From a technical perspective, SRE is a comprehensive, flexible product aimed at enabling software developers to create applications that can be mainteained with minimal effort and directly supported by designated business users. It leverates the flexibility and robustness of XML into a context that business users can understand and own freeing developers to work on new functionality.  It allows developers to combine rule-based and object oriented programmng methods to add business rules to new and existing applications.  Hence the name of this product, Simple Rule Engine.

How does SRE simplify our development?
怎么让SRE简化我们的开发过程?
1. SRE makes it easy to create, edit, store, and organize rules.
2. SRE's XML is the simpliest possible manner of describing rules.
3. Rules are declaritive, not procedural, in nature allowing problems to be broken down into discrete pieces.
4. SRE allows rules to be seperated from your application allowing for flexibility for future changes.

Why would I want to use SRE instead of a full blown rule engine?
为什么我要使用它而不是一个完整的规则引擎?
A full blown rule engine, like NxBRE (also open source), is far more capable than SRE but it comes at a price. That ability has a price, SRE has far better performance and is far easier to understand. Not every application needs the complexity of a bull blown rule engine, sometimes a simple one will do just fine and sometimes it wont. Choose wisely.

What kind of rule engines are there?
规则引擎都有什么样的类型呢?
Chaining refers to the relationship between the rules; forward and backwards refer to the direction of that relationship.

Forward chaining : Often refered to being 'data driven' due to the fact that the data determines the truthality of the rule.
(Rule) If my car is green, then
(Action) my house red.
(Fact) I have a green car.
(therefore) I have a red house.

Backwards-chaining : Often refered to being 'goal driven' due to the fact that we are trying to determine if something exists based on existing information.
(Rule) If my car is green, then
(Action) my house red.
(Fact) My house is NOT red.
(therefore) I dont have a green car.

hybrid :  combination of the above two.

What is contained in a rule engine?
一个规则引擎都包含哪些内容?
Rule engines typically support rules, facts, priority (score), mutual exclusion, preconditions, and other functions. Because SRE's goal is to be simple and not a full blown rule engine, it only supports rules, facts, and actions.

What kind of rule engine is SRE?
SRE属于哪一类规则引擎?
forward chaining

What is declararitive programming?
(modified version from drool)
Declarative programming deals with what is, as opposed with the how to normally encountered in imperative programming languages. SRE allows for rules to be decoupled and lowers the unidirectional logical flow. Declarative rules typically take the form as follows:

http://sourceforge.net/docman/display_doc.php?docid=30688&group_id=139180

转载于:https://www.cnblogs.com/august/archive/2008/07/26/1252154.html

SRE(Simple Rule Engine) Document相关推荐

  1. JSR94(Java Rule Engine)

    from: IBM DeveloperWorks Java URL: http://www.ibm.com/developerworks/cn/java/j-java-rules/#N10041 本文 ...

  2. JSR 94: JavaTM Rule Engine API

    JSR 94: JavaTM Rule Engine API Drools的JSR94实现形式 JAVA规则引擎JSR-94笔札 Java规则引擎与其API(JSR-94) 漫话规则引擎(4): Ja ...

  3. php rule engine,jinchunguang

    Business rules (like "all the customers that have reached 100€ in one time receive a voucher of ...

  4. C#开源资源大汇总(转)

    一.AOP框架         Encase 是C#编写开发的为.NET平台提供的AOP框架.Encase 独特的提供了把方面(aspects)部署到运行时代码,而其它AOP框架依赖配置文件的方式.这 ...

  5. .NET平台下开源框架

    一.AOP框架 Encase 是C#编写开发的为.NET平台提供的AOP框架.Encase 独特的提供了把方面(aspects)部署到运行时代码,而其它AOP框架依赖配置文件的方式.这种部署方面(as ...

  6. C#开源资源大汇总(2)

    规则引擎 NxBRE是.NET平台下的一款开源轻量级的业务规则引擎(aka Rule Based Engine),它由正向串行的推理引擎(forward-chaining inference engi ...

  7. 最新C#开源资源项目

    一.AOP框架 Encase 是C#编写开发的为.NET平台提供的AOP框架.Encase 独特的提供了把方面(aspects)部署到运行时代码,而其它AOP框架依赖配置文件的方式.这种部署方面(as ...

  8. [转]DotNet C#开源资源汇总

    一.AOP框架   Encase 是C#编写开发的为.NET平台提供的AOP框架.Encase 独特的提供了把方面(aspects)部署到运行时代码,而其它AOP框架依赖配置文件的方式.这种部署方面( ...

  9. 最全面的C#开源项目介绍

    一.AOP框架        Encase 是C#编写开发的为.NET平台提供的AOP框架.Encase 独特的提供了把方面(aspects)部署到运行时代码,而其它AOP框架依赖配置文件的方式.这种 ...

最新文章

  1. 百度自从取消餐补,公司同事天天七点多就跑了,八点基本工位都空了。
  2. Confluence 6 推荐的更新通知设置和禁用
  3. 安装完Pycharm,启动时碰到“failed to load jvm dll“的解决方案
  4. python语言可以在哪系统操作-python能检测到它运行的是哪个操作系统?
  5. MATLAB读取JSON数据(使用JSONlab工具箱)
  6. 【Java代码】使用 org.apache.ibatis.plugin.Interceptor 拦截器实现全局 mapper.xml 参数注入(可用于切换数据库实例schema+Demo举例源码)
  7. hdoj-1004-Let the Balloon Rise(map排序)
  8. centos 7 lvm用法
  9. 小程序入门学习12--云函数与数据库01
  10. 《软件方法》书中自测题大全-题目全文+分卷自测
  11. 路由器常见故障排除及解决方法!
  12. arctanx麦克劳林公式推导过程_经典卢瑟福散射公式的初等推导
  13. python3爬虫实战-requests+beautifulsoup-爬取下载顶点网站的小说
  14. maven打包报错:-source 1.5 中不支持 diamond 运算符
  15. 如何利用matlab根据excel画三维图像
  16. Python学习-安装Anaconda及print我爱王晓静
  17. 单片机两个正玄波信号的相位差计算_【案例】南宁市首个多品牌信号机互联绿波带“新鲜出炉”...
  18. 别只关注chatGPT能不能写论文了,它还支持49中场景,代码都给你写好了,速领
  19. java闭锁_Java并发工具类(闭锁CountDownLatch)
  20. PostgreSQL 不在使用tigger或rule来模拟 SSQLSERVER timestamp 行变化版本管理

热门文章

  1. Windows Mobile logo测试介绍
  2. 流量计算机标准,流量计算机
  3. java random产生随机数_java的三种随机数生成方式,必掌握
  4. matlab数组存字符串,MATLAB字符串数组存储为CSV格式
  5. java 堆内存分析_JVM内存堆布局图解分析
  6. oracle数据库访问sqlserver2008,透过SQL Server 2008访问Oracle 10g的配置方法
  7. linux监测node进程,通过node_exporter监控linux服务器一
  8. Unity将来时:IL2CPP是什么?
  9. Ubuntu下安装Pycharm及相关设置
  10. Spring Cloud Gateway(五):路由定位器 RouteLocator