java rule and drool

来源:互联网 发布:我的网盘java源码 编辑:程序博客网 时间:2024/06/13 21:45
 

Java rule

1.reason:

    1.business needs often change faster than development teams

2.objective: 

Java rule
1.reason:
    1.business needs often change faster than development teams
2.objective:
   1.One technique that's gaining traction in the Java community is to separate the business decisions of your executives from the technical decisions of your developers, and to keep those business decisions in a central data store, where they can be managed and altered in real-time (that is, business-time). It's one strategy you might consider.
 
    Separate  the business decisions from  technical implementation
3.Benefit:
   1 .Business decisions is independent  from  technical implementation, so we can change the business decisions in accodrance in accordance with the business need ,without modifying the technical implementation.
   2.Maintaining complex Boolean logic can be a difficult task, and a rules engine can help you organize this logic. 
   3 Java rule  apply in  your business logic layer in a Java appliction
   4.When do you use a rules engine?
      1.  
The application code must be recompiled. 
The code is dropped in a test staging environment. 
The code is inspected by data-quality auditors. 
The change is approved by the hosting environment architects. 
The change is scheduled for deployment. 
 Even a simple change to one line of code can cost an organization thousands of dollars. If  you need to follow such strict rules and find yourself making frequent changes to your business  logic code, then it would make sense to consider a rules engine
2.
client has a tendency (and the financial and political resources) to add and change business logic requirements frequently during the development cycle and even after deployment.
4.java rule architecture
  
图4 Java规则引擎工作机制
5.java rule engine api(JSR-94 Rules )
   Architecture
     1.  the administrator API
     2.  The runtime client API
     The distinction between the runtime and admin packages allows a more fine grained control of the user population; for example, some users may be allowed to execute rules but not to administer them.
     3.Error Logging and Tracing
     4.Security
     5.Exceptions
6.The traits about drool
1.express your business logic rules in a declarative way. You can write rules in a Java/XML syntax
2..A very active community 
3.Easy to use 
4.Fast execution speed 
5.Gaining popularity among Java developers 
6.JSR 94-compliant (JSR 94 is the Java Rule Engine API) (see Resources
7.Free 
7.my project using drool
    1. Project summary
       There are some monkey, we assign some apples to them ,and how many apples assign to one monkey denpends on the value of the monkey.
    
   2.design and implementation 
     
      1.simple drool procedure figue
      
      
    
          Monkey :        monkey 
          Ruleengine :      rule engine that using drool deal with rules of the application
          Testruleengine :   use the ruleengine and rules deal with the monkey
          Rule :           drool rules
          New monkey :    the result of testruleengine
         
      2. Test procedure figue
               
             New monkey :    the result of testruleengine
             Test module :     verify the new monkey
             Result :          the result of the test
       3.analyse requirements
       4.compile document
       5 .create model 
Java rule
1.reason:
    1.business needs often change faster than development teams
2.objective:
   1.One technique that's gaining traction in the Java community is to separate the business decisions of your executives from the technical decisions of your developers, and to keep those business decisions in a central data store, where they can be managed and altered in real-time (that is, business-time). It's one strategy you might consider.
 
    Separate  the business decisions from  technical implementation
3.Benefit:
   1 .Business decisions is independent  from  technical implementation, so we can change the business decisions in accodrance in accordance with the business need ,without modifying the technical implementation.
   2.Maintaining complex Boolean logic can be a difficult task, and a rules engine can help you organize this logic. 
   3 Java rule  apply in  your business logic layer in a Java appliction
   4.When do you use a rules engine?
      1.  
The application code must be recompiled. 
The code is dropped in a test staging environment. 
The code is inspected by data-quality auditors. 
The change is approved by the hosting environment architects. 
The change is scheduled for deployment. 
 Even a simple change to one line of code can cost an organization thousands of dollars. If  you need to follow such strict rules and find yourself making frequent changes to your business  logic code, then it would make sense to consider a rules engine
2.
client has a tendency (and the financial and political resources) to add and change business logic requirements frequently during the development cycle and even after deployment.
4.java rule architecture
  
图4 Java规则引擎工作机制
5.java rule engine api(JSR-94 Rules )
   Architecture
     1.  the administrator API
     2.  The runtime client API
     The distinction between the runtime and admin packages allows a more fine grained control of the user population; for example, some users may be allowed to execute rules but not to administer them.
     3.Error Logging and Tracing
     4.Security
     5.Exceptions
6.The traits about drool
1.express your business logic rules in a declarative way. You can write rules in a Java/XML syntax
2..A very active community 
3.Easy to use 
4.Fast execution speed 
5.Gaining popularity among Java developers 
6.JSR 94-compliant (JSR 94 is the Java Rule Engine API) (see Resources
7.Free 
7.my project using drool
    1. Project summary
       There are some monkey, we assign some apples to them ,and how many apples assign to one monkey denpends on the value of the monkey.
    
   2.design and implementation 
     
      1.simple drool procedure figue
      
      
    
          Monkey :        monkey 
          Ruleengine :      rule engine that using drool deal with rules of the application
          Testruleengine :   use the ruleengine and rules deal with the monkey
          Rule :           drool rules
          New monkey :    the result of testruleengine
         
      2. Test procedure figue
               
             New monkey :    the result of testruleengine
             Test module :     verify the new monkey
             Result :          the result of the test
       3.analyse requirements
       4.compile document
       5 .create model
       6. Coding
          
       7. test
       
Reference:
1. drool
http://labs.jboss.com/drools/
2. Implement business logic with the Drools rules engine
http://www-128.ibm.com/developerworks/java/library/j-drools/#when
3. An introdution to the Drools Project
http://www.theserverside.com/tt/articles/content/Drools/article.html
Resources
Learn
Drools Web site: Get more information about the Drools rules engine project.
"The Logic of the Bottom Line: An Introduction to The Drools Project" (N. Alex Rupp, TheServerSide.com, May 2004): A good introduction to the Drools rules engine.
"Getting Started With the Java Rule Engine API (JSR 94): Toward Rule-Based Applications" (Qusay H. Mahmoud, Sun Developer Network, July 2005): An introduction to the Java Rule Engine API.
JSR 94: Java Rule Engine API: The official JSR 94 specification.
Rete algorithm: An explanation of the Rete algorithm on the Drools site.
Declarative programming: The Drools site's definition of declarative programming.
The Java technology zone: Hundreds of articles about every aspect of Java programming.
Get products and technologies
Drools: Download the latest Drools distribution.
Eclipse: Download the latest version of the Eclipse IDE for the Java platform.
   
       6. Coding
          
       7. test
       
Reference:
1. drool
http://labs.jboss.com/drools/
2. Implement business logic with the Drools rules engine
http://www-128.ibm.com/developerworks/java/library/j-drools/#when
3. An introdution to the Drools Project
http://www.theserverside.com/tt/articles/content/Drools/article.html
Resources
Learn
Drools Web site: Get more information about the Drools rules engine project.
"The Logic of the Bottom Line: An Introduction to The Drools Project" (N. Alex Rupp, TheServerSide.com, May 2004): A good introduction to the Drools rules engine.
"Getting Started With the Java Rule Engine API (JSR 94): Toward Rule-Based Applications" (Qusay H. Mahmoud, Sun Developer Network, July 2005): An introduction to the Java Rule Engine API.
JSR 94: Java Rule Engine API: The official JSR 94 specification.
Rete algorithm: An explanation of the Rete algorithm on the Drools site.
Declarative programming: The Drools site's definition of declarative programming.
The Java technology zone: Hundreds of articles about every aspect of Java programming.
Get products and technologies
Drools: Download the latest Drools distribution.
Eclipse: Download the latest version of the Eclipse IDE for the Java platform.
   

   1.One technique that's gaining traction in the Java community is to separate the business decisions of your executives from the technical decisions of your developers, and to keep those business decisions in a central data store, where they can be managed and altered in real-time (that is, business-time). It's one strategy you might consider.

 

    Separate  the business decisions from  technical implementation

3.Benefit:

   1 .Business decisions is independent  from  technical implementation, so we can change the business decisions in accodrance in accordance with the business need ,without modifying the technical implementation.

   2.Maintaining complex Boolean logic can be a difficult task, and a rules engine can help you organize this logic. 

   3 Java rule  apply in  your business logic layer in a Java appliction

   4.When do you use a rules engine?

      1.  

The application code must be recompiled. 

The code is dropped in a test staging environment. 

The code is inspected by data-quality auditors. 

The change is approved by the hosting environment architects. 

The change is scheduled for deployment. 

 Even a simple change to one line of code can cost an organization thousands of dollars. If  you need to follow such strict rules and find yourself making frequent changes to your business  logic code, then it would make sense to consider a rules engine

2.

client has a tendency (and the financial and political resources) to add and change business logic requirements frequently during the development cycle and even after deployment.

4.java rule architecture

  

图4 Java规则引擎工作机制

5.java rule engine api(JSR-94 Rules )

   Architecture

     1.  the administrator API

     2.  The runtime client API

     The distinction between the runtime and admin packages allows a more fine grained control of the user population; for example, some users may be allowed to execute rules but not to administer them.

     3.Error Logging and Tracing

     4.Security

     5.Exceptions

6.The traits about drool

1.express your business logic rules in a declarative way. You can write rules in a Java/XML syntax

2..A very active community 

3.Easy to use 

4.Fast execution speed 

5.Gaining popularity among Java developers 

6.JSR 94-compliant (JSR 94 is the Java Rule Engine API) (see Resources

7.Free 

7.my project using drool

    1. Project summary

       There are some monkey, we assign some apples to them ,and how many apples assign to one monkey denpends on the value of the monkey.

    

   2.design and implementation 

     

      1.simple drool procedure figue

      

      

    

          Monkey :        monkey 

          Ruleengine :      rule engine that using drool deal with rules of the application

          Testruleengine :   use the ruleengine and rules deal with the monkey

          Rule :           drool rules

          New monkey :    the result of testruleengine

         

      2. Test procedure figue

               

             New monkey :    the result of testruleengine

             Test module :     verify the new monkey

             Result :          the result of the test

       3.analyse requirements

       4.compile document

       5 .create model

       6. Coding

          

       7. test

       

Reference:

1. drool

http://labs.jboss.com/drools/

2. Implement business logic with the Drools rules engine

http://www-128.ibm.com/developerworks/java/library/j-drools/#when

3. An introdution to the Drools Project

http://www.theserverside.com/tt/articles/content/Drools/article.html

Resources

Learn

Drools Web site: Get more information about the Drools rules engine project.

"The Logic of the Bottom Line: An Introduction to The Drools Project" (N. Alex Rupp, TheServerSide.com, May 2004): A good introduction to the Drools rules engine.

"Getting Started With the Java Rule Engine API (JSR 94): Toward Rule-Based Applications" (Qusay H. Mahmoud, Sun Developer Network, July 2005): An introduction to the Java Rule Engine API.

JSR 94: Java Rule Engine API: The official JSR 94 specification.

Rete algorithm: An explanation of the Rete algorithm on the Drools site.

Declarative programming: The Drools site's definition of declarative programming.

The Java technology zone: Hundreds of articles about every aspect of Java programming.

Get products and technologies

Drools: Download the latest Drools distribution.

Eclipse: Download the latest version of the Eclipse IDE for the Java platform.