SRE(Simple Rule Engine) Document
生活随笔
收集整理的這篇文章主要介紹了
SRE(Simple Rule Engine) Document
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
What is a rule engine?
什么是規(guī)則引擎?
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?
為什么使用規(guī)則引擎?
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?
由于內(nèi)部外部的環(huán)境地變化,大多數(shù)公司的商業(yè)經(jīng)營(yíng)策略會(huì)經(jīng)常持續(xù)地變動(dòng)。CEO 有一個(gè)新的想法,增加銷(xiāo)售量,顧客 以減少競(jìng)爭(zhēng)對(duì)手的不斷侵蝕。當(dāng)今商業(yè)仍沒(méi)有脫離依賴,正是由于變化的規(guī)則。怎么把握系統(tǒng)的變化,做到可維持,可重用,可擴(kuò)展,和所有權(quán)等?
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.
規(guī)則引擎通過(guò)集中規(guī)則來(lái)增強(qiáng)系統(tǒng)的可維護(hù)性。對(duì)于不基于規(guī)則引擎的含有規(guī)則的系統(tǒng),典型的簡(jiǎn)化復(fù)雜性的處理方法是將它的規(guī)則插入業(yè)務(wù)邏輯對(duì)象的方法中。這 些業(yè)務(wù)邏輯對(duì)象涉及到其他業(yè)務(wù)邏輯對(duì)象,尤其是形成的錯(cuò)綜復(fù)雜的關(guān)系網(wǎng)。那些對(duì)象緊緊地聯(lián)系的變化會(huì)透過(guò)對(duì)象集成產(chǎn)生聯(lián)動(dòng)效果。清晰的規(guī)則貫穿于這些對(duì)象 實(shí)體中,這樣系統(tǒng)就變得相當(dāng)?shù)牟唤选?duì)于開(kāi)發(fā)人員僅僅理解這些關(guān)系的詳細(xì)內(nèi)容就是困難的,更甚至是要改變這些關(guān)系。
Typically a rule engine based system will use a proxy class that delegates a call to a rule engine.
基于規(guī)則引擎的系統(tǒng)典型的方法就是使用一個(gè)代理類(lèi)通過(guò)委托調(diào)用規(guī)則引擎。
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.
系統(tǒng)自有的規(guī)則都轉(zhuǎn)移到集中的規(guī)則引擎中,尤其使用SRE。規(guī)則使用容易理解的自然語(yǔ)言描述。SRE設(shè)計(jì)將規(guī)則放置在簡(jiǎn)單易于理解的XML文檔中。XML很容易學(xué)習(xí),可以不超過(guò)一天時(shí)間,就有一些 XML in 24hours 等書(shū)籍
?
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簡(jiǎn)化我們的開(kāi)發(fā)過(guò)程?
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?
為什么我要使用它而不是一個(gè)完整的規(guī)則引擎?
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?
規(guī)則引擎都有什么樣的類(lèi)型呢?
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?
一個(gè)規(guī)則引擎都包含哪些內(nèi)容?
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屬于哪一類(lèi)規(guī)則引擎?
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
什么是規(guī)則引擎?
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?
為什么使用規(guī)則引擎?
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?
由于內(nèi)部外部的環(huán)境地變化,大多數(shù)公司的商業(yè)經(jīng)營(yíng)策略會(huì)經(jīng)常持續(xù)地變動(dòng)。CEO 有一個(gè)新的想法,增加銷(xiāo)售量,顧客 以減少競(jìng)爭(zhēng)對(duì)手的不斷侵蝕。當(dāng)今商業(yè)仍沒(méi)有脫離依賴,正是由于變化的規(guī)則。怎么把握系統(tǒng)的變化,做到可維持,可重用,可擴(kuò)展,和所有權(quán)等?
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.
規(guī)則引擎通過(guò)集中規(guī)則來(lái)增強(qiáng)系統(tǒng)的可維護(hù)性。對(duì)于不基于規(guī)則引擎的含有規(guī)則的系統(tǒng),典型的簡(jiǎn)化復(fù)雜性的處理方法是將它的規(guī)則插入業(yè)務(wù)邏輯對(duì)象的方法中。這 些業(yè)務(wù)邏輯對(duì)象涉及到其他業(yè)務(wù)邏輯對(duì)象,尤其是形成的錯(cuò)綜復(fù)雜的關(guān)系網(wǎng)。那些對(duì)象緊緊地聯(lián)系的變化會(huì)透過(guò)對(duì)象集成產(chǎn)生聯(lián)動(dòng)效果。清晰的規(guī)則貫穿于這些對(duì)象 實(shí)體中,這樣系統(tǒng)就變得相當(dāng)?shù)牟唤选?duì)于開(kāi)發(fā)人員僅僅理解這些關(guān)系的詳細(xì)內(nèi)容就是困難的,更甚至是要改變這些關(guān)系。
Typically a rule engine based system will use a proxy class that delegates a call to a rule engine.
基于規(guī)則引擎的系統(tǒng)典型的方法就是使用一個(gè)代理類(lèi)通過(guò)委托調(diào)用規(guī)則引擎。
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.
系統(tǒng)自有的規(guī)則都轉(zhuǎn)移到集中的規(guī)則引擎中,尤其使用SRE。規(guī)則使用容易理解的自然語(yǔ)言描述。SRE設(shè)計(jì)將規(guī)則放置在簡(jiǎn)單易于理解的XML文檔中。XML很容易學(xué)習(xí),可以不超過(guò)一天時(shí)間,就有一些 XML in 24hours 等書(shū)籍
?
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簡(jiǎn)化我們的開(kāi)發(fā)過(guò)程?
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?
為什么我要使用它而不是一個(gè)完整的規(guī)則引擎?
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?
規(guī)則引擎都有什么樣的類(lèi)型呢?
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?
一個(gè)規(guī)則引擎都包含哪些內(nèi)容?
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屬于哪一類(lèi)規(guī)則引擎?
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
轉(zhuǎn)載于:https://www.cnblogs.com/august/archive/2008/07/26/1252154.html
總結(jié)
以上是生活随笔為你收集整理的SRE(Simple Rule Engine) Document的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: “养卡公司”是怎样养卡的?这样做可能会泄
- 下一篇: Mac OS X Glut build