SRE(Simple Rule Engine) Document
生活随笔
收集整理的這篇文章主要介紹了
SRE(Simple Rule Engine) Document
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
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
什么是規則引擎?
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的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: “养卡公司”是怎样养卡的?这样做可能会泄
- 下一篇: 索尼发布外挂手柄:iPhone秒变PS掌