ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>国产三线在线,日本中文字幕一区,日韩大片b站免费观看直播http://www.aygfsteel.com/hengheng123456789/category/17304.htmlzh-cnTue, 04 Sep 2007 22:24:14 GMTTue, 04 Sep 2007 22:24:14 GMT60Give Your Business Logic a Framework with Droolshttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142399.html哼哼哼哼Mon, 03 Sep 2007 09:40:00 GMThttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142399.htmlhttp://www.aygfsteel.com/hengheng123456789/comments/142399.htmlhttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142399.html#Feedback0http://www.aygfsteel.com/hengheng123456789/comments/commentRss/142399.htmlhttp://www.aygfsteel.com/hengheng123456789/services/trackbacks/142399.htmlMost web and enterprise Java applications can be split into three parts: a front end to talk to the user, a service layer to talk to back-end systems such as databases, and business logic in between. While it is now common practice to use frameworks for both front- and back-end requirements (e.g., Struts, Cocoon, Spring, Hibernate, JDO, and Entity Beans), there is no standard way of structuring business logic. Frameworks like EJB and Spring do this at a high level, but don't help us in organizing our code. Wouldn't it would be great if we could replace messy, tangled if...then statements with a framework that gave us the same benefits of configurability, readability, and reuse that we already enjoy in other areas? This article suggests using the Drools rules engine as a framework to solve the problem.

The sample code below gives a sample of the problem we're trying to avoid. It shows some business logic in a typical Java application.


if ((user.isMemberOf(AdministratorGroup)
      && user.isMemberOf(teleworkerGroup))
     || user.isSuperUser(){
        
         // more checks for specific cases
         if((expenseRequest.code().equals("B203")
           ||(expenseRequest.code().equals("A903")
                        &&(totalExpenses<200)
                &&(bossSignOff> totalExpenses))
           &&(deptBudget.notExceeded)) {
               //issue payments
           } else if {
               //check lots of other conditions
           }
} else {
     // even more business logic
}

We've all come across similar (or even more complex) business logic. While this has been the standard way of implementing business logic in Java, there are many problems with it.

  • What if the business users come up with another form ("C987") that needs to be added to the already hard-to-understand code? Would you want to be the person to maintain it, once all of the original programmers had moved on?
  • How do we check that these rules are correct? It's hard enough for technical people--never mind commercial folks--to review. Do we have any methodical way of testing this business logic?
  • Many applications have similar business rules--if one of the rules change, can we be sure that it is changed consistently across all systems? If a new application uses some of these rules, but also adds some new ones, do we need to rewrite all of the logic from scratch?
  • Is the business logic easily configurable, not so firmly tied to Java code that we need to recompile/redeploy every time that a small change is made?
  • What if other (scripting) languages want to leverage the existing investment in business rule logic?

J2EE/EJB and "inversion of control" frameworks (such as Spring, Pico, and Avalon) give us the ability to organize our code at a high level. While they are very good at providing reusability, configuration, and security, none of them would replace the "spaghetti code" in the above example. Ideally, whatever framework we choose will be compatible with not only J2EE applications, but also "normal" Java (J2SE--Standard Edition) programs, and most of the widely used presentation and persistence frameworks. Such a framework should allow us to do the following:

  • Business users should be able to easily read and verify the business logic.
  • Business rules should be reusable and configurable across applications.
  • The framework should be scalable and performant under heavy load.
  • It should be as easy to use for Java programmers as existing front-end (Struts, Spring) and back-end (object-relational mapping) frameworks.

An additional problem is that while there are only so many ways to organize web pages and database access, business logic tends to differ widely between applications. Our framework should be able to cope with this and still promote code reuse. Ideally, our application would be "frameworks all the way down." By using frameworks in this way, we can a large amount of our application "out of the box," allowing us to write only the parts that add value for the customer.

Rule Engines to the Rescue

How are we going to solve this problem? One solution that is gaining traction is to use a rule engine. Rule engines are frameworks for organizing business logic that allow the developer to concentrate on things that are known to be true, rather than the low-level mechanics of making decisions.

Often, business users are more comfortable with expressing things that they know to be true, than to express things in an if...then format. Examples of things that you might hear from a business expert are:

  • "FORM 10A is used for expense claims over 200 Euro."
  • "We only trade shares in quantities of 10,000 or more."
  • "Purchases over â‚?0m need the approval of a company director."

By focusing on what we know to be true, rather than the mechanics of how to express it in Java code, the above statements are clearer than our previous code sample. Still, clear as they may be, we still need a mechanism to apply these rules to the facts that we know and get a decision. Such a mechanism is a rule engine.


Rule Engines in Java

JSR 94, the javax.rules API, sets a common standard for interacting with rule engines, much as JDBC allows us to interact with varying databases. What JSR-94 does not specify is how the actual rules are written, leaving plenty of choice among the most widely used Java rule engines:


  • Jess is perhaps the most mature Java rule engine, with good tool support (including Eclipse plugins) and documentation. However it is a commercial product, and it writes its rules in a Prolog-style notation, which can be intimidating for many Java programmers.
  • Jena is an open source framework, originally from HP. While it has a rules engine, and is especially strong for those interested in the Semantic Web, it is not fully JSR-94-compliant.
  • Drools is a JSR-94-complaint rules engine, and is fully open source under an "Apache-style" license. Not only does it express rules in familiar Java and XML syntax, it has a strong user and developer community. For the examples in this article, we'll be using Drools, as it has the easiest to use Java-like syntax and it has the most open license.

Starting a Java Application using Drools

Imagine this scenario: minutes after reading this article, your boss asks your to prototype a stock trading application. As the business users still haven't fully defined the business logic, you think it a good idea to implement it using a rules engine. The final system will be accessible over an intranet and will need to communicate with back-end database and messaging systems. To get started, download the Drools framework (with dependencies). Create a new project in your favorite IDE and make sure all of the .jars are referenced in it, as per Figure 1. This screenshot is Eclipse-based, but the setup will be similar for other IDEs.

Libraries needed to Run Drools
Figure 1. Libraries needed to run Drools

Due to the huge potential losses if our stock trading system went amok, it's vital that we have some sort of simulator to put our system through its paces. Such a simulator also gives you confidence that the decisions made by the system are those that are intended, even after rule changes are made. We'll borrow some tools from the Agile toolbox and use JUnit as a framework for our simulations.

The first code we write is the JUnit Test/simulator, as per the following listing. Even if we can't test every combination of values likely to be input into our application, some tests are better than none at all. In this example, all of our files and classes (including unit tests) are in one folder/package, but in reality, you would implement a proper package and folder structure. We'd also use Log4j instead of the System.out calls in the sample code.


import junit.framework.TestCase;
/*
* JUnit test for the business rules in the
* application.
*
* This also acts a 'simulator' for the business
* rules - allowing us to specify the inputs,
* examine the outputs and see if they match our
* expectations before letting the code loose in
* the real world.
*/
public class BusinessRuleTest extends TestCase {
/**
* Tests the purchase of a stock
*/
public void testStockBuy() throws Exception{
//Create a Stock with simulated values
StockOffer testOffer = new StockOffer();
testOffer.setStockName("MEGACORP");
testOffer.setStockPrice(22);
testOffer.setStockQuantity(1000);
//Run the rules on it
BusinessLayer.evaluateStockPurchase(testOffer);
//Is it what we expected?
assertTrue(
testOffer.getRecommendPurchase()!=null);
assertTrue("YES".equals(
testOffer.getRecommendPurchase()));
}
}


This is a basic JUnit test, as we know that our (very simple!) system should buy all stocks with a price of less than 100 Euro. Obviously, this won't compile without our data holding class (StockOffer.java) and our business layer class (BusinessLayer.java). These are provided in the following listings.


/**
* Facade for the Business Logic in our example.
*
* In this simple example, all our business logic
* is contained in this class but in reality it
* would delegate to other classes as required.
*/
public class BusinessLayer {
/**
* Evaluate whether or not it is a good idea
* to purchase this stock.
* @param stockToBuy
* @return true if the recommendation is to buy
*   the stock, false if otherwise
*/
public static void evaluateStockPurchase
(StockOffer stockToBuy){
return false;
}
}

The StockOffer class looks like this:

/**
* Simple JavaBean to hold StockOffer values.
* A 'Stock offer' is an offer (from somebody else)
* to sell us a Stock (or Company share).
*/
public class StockOffer {
//constants
public final static String YES="YES";
public final static String NO="NO";
//Internal Variables
private String stockName =null;
private int stockPrice=0;
private int stockQuantity=0;
private String recommendPurchase = null;
/**
* @return Returns the stockName.
*/
public String getStockName() {
return stockName;
}
/**
* @param stockName The stockName to set.
*/
public void setStockName(String stockName) {
this.stockName = stockName;
}
/**
* @return Returns the stockPrice.
*/
public int getStockPrice() {
return stockPrice;
}
/**
* @param stockPrice The stockPrice to set.
*/
public void setStockPrice(int stockPrice) {
this.stockPrice = stockPrice;
}
/**
* @return Returns the stockQuantity.
*/
public int getStockQuantity() {
return stockQuantity;
}
/**
* @param stockQuantity to set.
*/
public void setStockQuantity(int stockQuantity){
this.stockQuantity = stockQuantity;
}
/**
* @return Returns the recommendPurchase.
*/
public String getRecommendPurchase() {
return recommendPurchase;
}
}

We run BusinessRuleTest through the JUnit extension of our favorite IDE. If you're not familiar with JUnit, more information can be found at . Not surprisingly, our test fails at the second assertion, shown in Figure 2, as we don't (yet) have the appropriate business logic in place. This is reassuring, as it shows that our simulator/unit tests are highlighting the problems that they should.



JUnit Test Results
Figure 2. JUnit test results

Writing the Business Logic using Rules

At this point, we need to write some business logic that says, "If the stock price is less than 100 Euro, then we should buy it." To do this, we will modify BusinessLayer.java to read:


import java.io.IOException;
import org.drools.DroolsException;
import org.drools.RuleBase;
import org.drools.WorkingMemory;
import org.drools.event.DebugWorkingMemoryEventListener;
import org.drools.io.RuleBaseLoader;
import org.xml.sax.SAXException;
/**
* Facade for the Business Logic in our example.
*
* In this simple example, all our business logic
* is contained in this class but in reality it
* would delegate to other classes as required.
* @author default
*/
public class BusinessLayer {
//Name of the file containing the rules
private static final String BUSINESS_RULE_FILE=
"BusinessRules.drl";
//Internal handle to rule base
private static RuleBase businessRules = null;
/**
* Load the business rules if we have not
* already done so.
* @throws Exception - normally we try to
*          recover from these
*/
private static void loadRules()
throws Exception{
if (businessRules==null){
businessRules = RuleBaseLoader.loadFromUrl(
BusinessLayer.class.getResource(
BUSINESS_RULE_FILE ) );
}
}
/**
* Evaluate whether or not to purchase stock.
* @param stockToBuy
* @return true if the recommendation is to buy
* @throws Exception
*/
public static void evaluateStockPurchase
(StockOffer stockToBuy) throws Exception{
//Ensure that the business rules are loaded
loadRules();
//Some logging of what is going on
System.out.println( "FIRE RULES" );
System.out.println( "----------" );
//Clear any state from previous runs
WorkingMemory workingMemory
= businessRules.newWorkingMemory();
//Small ruleset, OK to add a debug listener
workingMemory.addEventListener(
new DebugWorkingMemoryEventListener());
//Let the rule engine know about the facts
workingMemory.assertObject(stockToBuy);
//Let the rule engine do its stuff!!
workingMemory.fireAllRules();
}
}

This class now has some important methods:

  • loadRules(), which loads the rules from the BusinessRules.drl file.
  • An updated evaluateStockPurchase(), which evaluates these business rules. Some points to note about this method are:
    • We can reuse the same RuleSet over and over (as business rules in memory are stateless).
    • We use a new WorkingMemory for every evaluation, as this is our knowledge of what we know to be true at this time. We use assertObject() to place known facts (as Java Objects) into this memory.
    • Drools has an event listener model, to allow us to "see" what is going on within the event model. Here we use it to print debug information.
  • The fireAllRules() method on the working memory class causes the rules to be evaluated and updated (in this case, stock offer).

Before we can run the example again, we need to create our BusinessRules.drl file, as follows:


<?xml version="1.0"?>
<rule-set name="BusinessRulesSample"
xmlns="http://drools.org/rules"
xmlns:java="http://drools.org/semantics/java"
xmlns:xs
="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation
="http://drools.org/rules rules.xsd
http://drools.org/semantics/java java.xsd">
<!-- Import the Java Objects that we refer
to in our rules -->
<java:import>
java.lang.Object
</java:import>
<java:import>
java.lang.String
</java:import>
<java:import>
net.firstpartners.rp.StockOffer
</java:import>
<!-- A Java (Utility) function we reference
in our rules-->
<java:functions>
public void printStock(
net.firstpartners.rp.StockOffer stock)
{
System.out.println("Name:"
+stock.getStockName()
+" Price: "+stock.getStockPrice()
+" BUY:"
+stock.getRecommendPurchase());
}
</java:functions>
<rule-set>
<!-- Ensure stock price is not too high-->
<rule name="Stock Price Low Enough">
<!-- Params to pass to business rule -->
<parameter identifier="stockOffer">
<class>StockOffer</class>
</parameter>
<!-- Conditions or 'Left Hand Side'
(LHS) that must be met for
business rule to fire -->
<!-- note markup -->
<java:condition>
stockOffer.getRecommendPurchase() == null
</java:condition>
<java:condition>
stockOffer.getStockPrice() < 100
</java:condition>
<!-- What happens when the business
rule is activated -->
<java:consequence>
stockOffer.setRecommendPurchase(
StockOffer.YES);
printStock(stockOffer);
</java:consequence>
</rule>
</rule-set>

This rules file has several interesting parts:

  • Just after the XML-Schema definitions come the Java objects we reference in our rules. These objects can come from any Java library as required.
  • Next comes our functions, which can incorporate standard Java code. In this case, we incorporate a logging function to help us see what is going on.
  • After that comes our rule set, consisting of one or more rules.
  • Each rule can take parameters (the StockOffer class), one or more conditions that need to be fulfilled, and a consequence that is carried out if and when the conditions are met.

Having modified and compiled our code, we run the JUnit test simulations again. This time, the business rules are called, our logic evaluates correctly, and our tests pass, as seen in Figure 3. Congratulations--you've just built your first rule-based application!

Successful JUnit Test
Figure 3. Successful JUnit test


Smarter Rules

Fresh from building the application, you demonstrate the prototype above to the business users, and they remember a few more rules that they forgot to mention earlier. One of the new rules is that we shouldn't trade stocks where the quantity is a negative number (<0). "No problem," you say, and return to your desk, secure in the knowledge that you can quickly evolve your system.

The first thing you do is to update your simulator, and add the following code to BusinessRuleTest.java:


/**
* Tests the purchase of a stock
* makes sure the system will not accept
* negative numbers.
*/
public void testNegativeStockBuy()
throws Exception{
//Create a Stock with our simulated values
StockOffer testOffer = new StockOffer();
testOffer.setStockName("MEGACORP");
testOffer.setStockPrice(-22);
testOffer.setStockQuantity(1000);
//Run the rules on it
BusinessLayer
.evaluateStockPurchase(testOffer);
//Is it what we expected?
assertTrue("NO".equals(
testOffer.getRecommendPurchase()));
}

This tests for the new rule described by the business users. If we run this JUnit test, our new test fails, as expected. We need to add a new rule to our .drl file, as follows.


<!-- Ensure that negative prices
are not accepted-->
<rule name="Stock Price Not Negative">
<!-- Parameters we can pass into
the business rule -->
<parameter identifier="stockOffer">
<class>StockOffer</class>
</parameter>
<!-- Conditions or 'Left Hand Side' (LHS)
that must be met for rule to fire -->
<java:condition>
stockOffer.getStockPrice() < 0
</java:condition>
<!-- What happens when the business rule
is activated -->
<java:consequence>
stockOffer.setRecommendPurchase(
StockOffer.NO);
printStock(stockOffer);
</java:consequence>
</rule>

This rule is similar in format to the previous one, expect that our <java:condition> is different (testing for negative numbers) and the <java:consequence> sets the recommend purchase to No. We run our unit tests/simulator again, and this time the test passes.

At this point, if you're used to procedural programming (like most Java programmers), you may be scratching your head: here we have a file containing two separate business rules, yet we haven't told the rule engine which is more important. However, our stock price (of -22) satisfies both rules (i.e., it is less than 0 and it is less than 100). Despite this, we get the correct result, even if we swap the order of the rules around. How does this work?

The extract of the console output below helps us to see what is going on. We see that both rules are firing (the [activationfired] line), and that the Recommend Buy is first set to Yes and then to No. How does Drools know to fire these rules in the correct order? If you look at the Stock Price Low Enough rule, you will see that one of the conditions is that recommendPurchase() is null. This is enough for the Drools rule engine to decide that the Stock Price Low Enough rule should be fired before the Stock Price Not Negative rule. This process is called conflict resolution.


FIRE RULES
----------
[ConditionTested: rule=Stock Price Not Negative;
condition=[Condition: stockOffer.getStockPrice()
< 0]; passed=true; tuple={[]}]
[ActivationCreated: rule=Stock Price Not Negative;
tuple={[]}]
[ObjectAsserted: handle=[fid:2];
object=net.firstpartners.rp.StockOffer@16546ef]
[ActivationFired: rule=Stock Price Low Enough;
tuple={[]}]
[ActivationFired: rule=Stock Price Not Negative;
tuple={[]}]
Name:MEGACORP Price: -22 BUY:YES
Name:MEGACORP Price: -22 BUY:NO

If you're a procedural programmer, no matter how clever you think this is, you still may not trust it completely. That is why we have our unit tests/simulator: "hard" JUnit tests (using normal Java code) ensure that the rule engine makes its decisions along the lines we want it to. (And doesn't spend billions on worthless stock!) At the same time, the power and the flexibility of our rule engine allows us to quickly develop the business logic.

Later on, we will see more sophisticated forms of conflict resolution.


Conflict Resolution

Now the folks on the business side are really impressed and are starting to think through the possible options. They've come across a problem with stocks of XYZ Corp and have decided to implement a new rule: Only buy stocks of XYZ Corp if they are less than 10 Euro.

As before, you add the test to our simulator and include the new business rule in our rules file, as per the following listings. First, we add a new method to BusinessRuleTest.java:


/**
* Makes sure the system will buy stocks
* of XYZ corp only if it really cheap
*/
public void testXYZStockBuy() throws Exception{
//Create a Stock with our simulated values
StockOffer testOfferLow = new StockOffer();
StockOffer testOfferHigh = new StockOffer();
testOfferLow.setStockName("XYZ");
testOfferLow.setStockPrice(9);
testOfferLow.setStockQuantity(1000);
testOfferHigh.setStockName("XYZ");
testOfferHigh.setStockPrice(11);
testOfferHigh.setStockQuantity(1000);
//Run the rules on it and test
BusinessLayer.evaluateStockPurchase(
testOfferLow);
assertTrue("YES".equals(
testOfferLow.getRecommendPurchase()));
BusinessLayer.evaluateStockPurchase(
testOfferHigh);
assertTrue("NO".equals(
testOfferHigh.getRecommendPurchase()));
}

Next, we need a new <rule> in BusinessRules.drl:


<rule name="XYZCorp" salience="-1">
<!-- Parameters we pass to rule -->
<parameter identifier="stockOffer">
<class>StockOffer</class>
</parameter>
<java:condition>
stockOffer.getStockName().equals("XYZ")
</java:condition>
<java:condition>
stockOffer.getRecommendPurchase() == null
</java:condition>
<java:condition>
stockOffer.getStockPrice() > 10
</java:condition>
<!-- What happens when the business
rule is activated -->
<java:consequence>
stockOffer.setRecommendPurchase(
StockOffer.NO);
printStock(stockOffer);
</java:consequence>
</rule>

Note that in the business rules file, after the rule name, we set our salience to -1 (i.e., the lowest priority of all of the rules we have specified so far). Most of the rules in our system conflict, meaning Drools must make some decision on the order in which to fire rules, given that the conditions for all of the rules will be met. The default way of deciding is:

  • Salience: A value we assign, as per the above listing.
  • Recency: How many times we have used a rule.
  • Complexity: Specific rules with more complicated values fire first.
  • LoadOrder: The order in which rules are loaded.

If we did not specify the saliency of our rule in this example, what would happen is:

  • The XYZ Corp rule ("Don't buy XYZ if the price is more than 10 Euro") would fire first (the status of the Recommend Buy flag would be set to No).
  • Then the more general rule ("Buy all stock under 100") fires, setting the Recommended Buy flag to yes.

This would give a result that we don't want. However, since our example does set the saliency factor, the test and our business rules work as expected.

While most of the time, writing clear rules and setting the saliency will give enough information to Drools for it to choose the proper order in which to fire rules, sometimes we want to change the entire manner in which rule conflicts are resolved. An example of how to change this is given below, where we tell the rule engine to fire the simplest rules first. A word of warning: be careful when changing conflict resolution, as it can fundamentally change the behavior of the rule engine--a lot of problems can be solved first with clear and well-written rules.


//Generate our list of conflict resolvers
ConflictResolver[] conflictResolvers =
new ConflictResolver[] {
SalienceConflictResolver.getInstance(),
RecencyConflictResolver.getInstance(),
SimplicityConflictResolver.getInstance(),
LoadOrderConflictResolver.getInstance()
};
//Wrap this up into one composite resolver
CompositeConflictResolver resolver =
new CompositeConflictResolver(
conflictResolvers);
//Specify this resolver when we load the rules
businessRules = RuleBaseLoader.loadFromUrl(
BusinessLayer.class.getResource(
BUSINESS_RULE_FILE),resolver);

For our simple application, driven by JUnit tests, we don't need to alter the way the Drools resolves rule conflicts. It is useful to know how conflict resolution works, especially when your application grows to meet more complex and demanding requirements.

Conclusion

This article demonstrated a problem that most programmers have had to face: how to put some order on the complexity of business logic. We demonstrated a simple application using Drools as a solution and introduced the notion of rule-based programming, including how these rules are resolved at runtime. Later on, a follow-up article will take these foundations and show how to use them in an enterprise Java application.

Resources

Paul Browne , based in Dublin, Ireland, has been consulting in enterprise Java with FirstPartners.net for almost seven years.



]]>
Using Drools in Your Enterprise Java Applicationhttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142394.html哼哼哼哼Mon, 03 Sep 2007 09:28:00 GMThttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142394.htmlhttp://www.aygfsteel.com/hengheng123456789/comments/142394.htmlhttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142394.html#Feedback0http://www.aygfsteel.com/hengheng123456789/comments/commentRss/142394.htmlhttp://www.aygfsteel.com/hengheng123456789/services/trackbacks/142394.htmlUsing Drools in Your Enterprise Java Application by Paul Browne
08/24/2005

These days enterprise Java could almost put you to sleep. How many hundreds of J2EE-EJB web applications have been written that capture information from a web page and store it in a database? What really keeps developers awake at night is trying to write and maintain the complex business logic in their applications. This is a problem not only for new applications, but increasingly, for long-lived, business-critical apps whose internal logic needs to change frequently, often at very short notice.

In an earlier article, "Give Your Business Logic a Framework with Drools," I introduced the Drools framework and showed how it could be used to organize complicated business logic. Drools replaced many tangled if ... then statements with a simple set of things known to be true. If you are ever in a meeting with business customers, and your head hurts with the complexity of what they want you to implement, then maybe you should consider a rule engine such as Drools. This article will show you how you can do this in an enterprise Java application.

Frameworks All the Way Down

Most enterprise Java developers already have their favorite frameworks. In no particular order, these include presentation frameworks (Struts, JSF, Cocoon, and Spring), persistence frameworks (JDO, Hibernate, Cayenne, and Entity Beans) and structural frameworks (EJB, Spring again, Pico, and Excalibur), as well as many others. Each framework does one very useful thing (or more), and gives developers a lot of instant "out of the box" functionality. Deploying an application using frameworks means you avoid a lot of the boring bits and concentrate on what is really needed.

Until now, there was a gap in what the frameworks were able to do, in that business logic had no framework. Tools like EJB and Spring are good, but have little to say about how to organize your if ... then statements! Adding Drools to your developer toolbox means that it is now possible to build an application with "frameworks all the way down." Figure 1 shows a diagram of such an application.

Figure 1
Figure 1. Frameworks for Java applications

This article will build on what we already know of the Drools framework and allow us to build such an application.

When Should I Use a Rule Engine?


It's almost a cliche in software engineering to say that "if you have a hammer, everything looks like a nail." While rule engines can solve a lot of problems for us, it is worth considering whether a rule engine is really appropriate for our enterprise Java application. Some questions to ask are:

  • How complex is my application? For applications that shuffle data to and from a database, but not much more, it is probably best not to use a rule engine. However, where there is even a moderate amount of processing implemented in Java, it is worthwhile to consider the use of Drools. This is because most applications develop complexity over time, and Drools will let you cope easily with this.
  • What is the lifetime of my application? The answer to this is often "surprisingly long"--remember the mainframe programmers who thought their applications wouldn't be around for the year 2000? Using a rule engine pays off, especially in the medium to long term. As this article demonstrates, even prototypes can benefit from the combination of Drools and agile methods to take the "prototype" into production.
  • Will my application need to change? The only sure thing about your requirements is that they will change, either during or just after development. Drools helps you cope with this by specifying the business rule in one or more easy-to-configure XML files.

What About Performance?

If you're writing an enterprise application, chances are that it will need to scale to hundreds, if not thousands, of users. You know that existing Java and J2EE applications can do this, but how will a application using Drools cope with this pressure? The answer is "surprisingly well." While most developers hate to "lose control" and rely on other people's code (i.e., a framework), consider the points below--not only should your application be as fast as "traditional" coding methods, but Drools may even make your application run faster:

  • Avoids badly written code: Drools guides developers to do "the right thing." You may be sure the code you are writing is good, but would you say the same for the code of your co-developers? Using a framework makes it easier to write good, fast code.
  • Optimized framework: How often have you seen business logic that repeatedly accesses a database for the same information, slowing down the entire application? Used correctly, Drools can remember not only the information, but also the results of previous tests using this information, giving the entire application a speed boost.
  • Rete algorithm: Many times we apply "if" conditions that we didn't really need. The Rete algorithm, as implemented by Drools, replaces all of the if ... then statements with an optimized network. It is important to note that the Rete algorithm involves a tradeoff between using more memory to reduce delays at run time. While this isn't a factor in most modern servers, we wouldn't yet recommend deploying Drools on your mobile phone!


Where Were We?

In our previous article, we wrote a simple stock trading application based around the Drools engine. We implemented various business rules, showed how we could rapidly change the rules to meet changing business requirements, and wrote JUnit tests to give us a high degree of confidence that the system would act as it was supposed to. However, the application as we left it had little or no user interface, and used hard-coded data instead of a database. To evolve our application into something that is more enterprise level, we need to add two main things:
  • Some sort of user interface, ideally based one of the standard web-presentation frameworks.
  • A Data Access Object (DAO) to let Drools work with a database (or other back end system).

Calling the Rule Engine from a Presentation Framework

Most enterprise Java applications are accessed using a web interface, and one of the most widely adopted web-presentation frameworks is Struts, from Apache. Ideally, we'll write our application so that the presentation layer knows about the business layer underneath, but not the other way around. This has the advantage not only of allowing us to change the presentation framework at a later date (e.g., to an Ajax or web service interface), but also means the code examples give should be readily applicable to other web frameworks like Spring.


The following code snippet demonstrates how to call the business logic tier (using the rule engine) from the web presentation layer. The code uses the results to decide which page to display. In this sample, we use a Struts action, but the code is similar for any other web framework or even a servlet or a JSP page. This snippet works with a supporting struts-config.xml, JSP pages to post/display data, and a way of generating the WAR file for deployment. The snippet shows how to integrate the rule engine with the web framework.


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import BusinessLayer;
/**
* Sample Struts action with Pseudocode
*/
public class SampleStrutsAction extends Action{
/**
* Standard Struts doPerfom method
*/
public ActionForward doPerform(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)
throws InvalidEntryPointException {
//Local Variables
StockOffer userOffer =null;
//Get any previous values from the session
userOffer=(StockOffer)request.getSession()
.getAttribute("PREVIOUS_STOCK_OFFER");
//create this object if it is null
if (null==userOffer){
userOffer = new StockOffer();
}
//Update with the incoming values
//These values match those on the form
userOffer.setStockName(request.
getParameterValue("STOCK_NAME"));
userOffer.setStockPrice(request
.getParameterValue("STOCK_PRICE"));
userOffer.setStockQuantity(request
.getParameterValue("STOCK_QTY"));
//Reset the output value
userOffer.setRecommendPurchase(null);
//Call the Business Layer
BusinessLayer
.evaluateStockPurchase(userOffer);
//Forward to the appropriate page
if ("YES".equals(
testOffer.getRecommendPurchase()){
return mapping.findForward("YES_WEB_PAGE");
}
//otherwise default to the no page
return mapping.findForward("NO_WEB_PAGE");
}
}

There are a couple of things going on this sample. Often, we build up the data we need from the user over several web pages, so this sample shows how we can achieve this by retrieving the StockOffer object that we have previously stored in the web server session. Next, we update the StockOffer with any values that the user may have changed on the web page. We then reset the recommendPurchase flag to clear any previous results before we call the business logic layer. Finally, we take the response of the business logic and use it to decide which page to forward the user to.

In this example, note how we split the business logic (yes/no on whether or not to buy a stock) from the presentation logic (decide which page to go to). This allows us to reuse our business rules across several different applications In addition, take look at how the state information (i.e., things that the user has already told us) is stored in the StockOffer object/web server session, and not in the business layer. By keeping the business layer stateless in this way, we make the entire application much more scalable and performant.


Integrating the Rule Engine with the Database Layer

So far, our application has a web presentation layer and a rules engine for the business layer, but no means of getting data to and from a database. This section gives an example of how to do this. We base our example on the Data Access Object (DAO) pattern, where we encapsulate all code that "talks" to the database (or back-end data source) in one pluggable, configurable class. As such, the example is applicable to other persistence frameworks, such as Hibernate and Cayenne.


Some important points about the way we want to organize the data layer are:

  • Only the business layer should talk to the data layer; if a class in the presentation layer (front end) wants some data, it should pass through the business layer first. This helps makes our code easier to organize and read.
  • As far as possible, we should keep our data layer stateless--we should hold client data elsewhere (e.g., in the server session at the web front end, as per the previous example). This is distinct from caching of data, which we can do at this level. The difference between the two is state information is often user-specific, while data we cache at the data access layer is mainly sharable across the application. Organizing our layer in this way increases performance.
  • We should allow the business logic to decide if data is needed or not--if not needed, the call to get the data should not be made.

To implement our simple Data Access Object, we create three new objects: StockNameDao, DaoImplementation, and DaoFactory.

StockNameDao is an interface that defines two methods: getStockNames() returns a list of the stock names that we deal with, and isOnStockList() checks that a given stock is on the list of stocks that we deal with. Our business layer will call these methods as and when it needs the information.

DaoImplementation is an actual implementation of StockNameDao. In this case the values are hard-coded, but we could have queried a database or accessed an information system like Bloomberg via a web service.

DaoFactory is what we use to create an appropriate instance of StockNameDao. The advantage this approach has over creating the class directly is that it allows us to configure what DAO implementation we use at runtime (frameworks like Spring are especially good at this). One factory can return many types of DAOs (e.g., StockNameDao, StockPriceDao, StockHistoryDao), which means we can pass in our DaoFactory, and let the individual rules decide on the data and DAOs that they require.

Here's what the StockNameDao interface looks like:


/**
* Defines a Data Access Object - a non data
* source specific way of obtaining data.
*/
public interface StockNameDao {
/**
* Get a list of stock names for the application
* @return String[] array of stock names
*/
public String [] getStockNames();
/**
* Check if our stock is on the list
* @param stockName
* @return
*/
public boolean isOnStockList(String stockName);
}

And here's the DaoImplementation:


/**
* Concrete Definition of a Data Access Object
*/
public class DaoImplementation
implements StockNameDao {
/**
* Constructor with package level access only
* to encourage use of factory method
*
*/
DaoImplementation(){}
/**
* Get a list of stock names for the app.
* This is a hard coded sample
* normally we would get this from
* a database or other datasource.
* @return String[] array of stock names
*/
public String[] getStockNames() {
String[] stockNames=
{"XYZ","ABC","MEGACORP","SOMEOTHERCOMPANY"};
return stockNames;
}
/**
* Check if our stock is on the list
* @param stockName
* @return true / false as appropriate
*/
public boolean isOnStockList(String stockName){
//Get our list of stocks
String stockList[] = getStockNames();
//Loop and see if our stock is on it
// done this way for clarity . not speed!
for (int a=0; a<stockList.length;a++){
if(stockList[a].equals(stockName)){
return true;
}
}
//Default return value
return false;
}
}

The simple DaoFactory just returns a DaoImplementation:


package net.firstpartners.rp;
/**
* Factory Method to get the Data Access Object.
* Normally we could replace this with a
* framework like Spring or Hibernate
*/
public class DaoFactory {
/**
* Get the stock name Dao
* This sample is hardcoded - in reality
* we would make this configurable / cache
* instances of the Dao as appropriate
* @return an instance of StockNameDao
*/
public static StockNameDao getStockDao(){
return new DaoImplementation();
}
}


Now that we have our simple DAO implementation to serve as our database layer, how do we integrate it with the Drools business layer? The updated business rules file, BusinessLayer.xml, shows us how.



<?xml version="1.0"?>
<rule-set name="BusinessRulesSample"
xmlns="http://drools.org/rules"
xmlns:java="http://drools.org/semantics/java"
xmlns:xs="
http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="
http://drools.org/rules rules.xsd
http://drools.org/semantics/java java.xsd">
<!-- Import the Java Objects that
we refer to in our rules -->
<java:import>
java.lang.Object
</java:import>
<java:import>
java.lang.String
</java:import>
<java:import>
net.firstpartners.rp.StockOffer
</java:import>
<java:import>
net.firstpartners.rp.DaoFactory
</java:import>
<java:import>
net.firstpartners.rp.StockNameDao
</java:import>
<!-- Application Data not associated -->
<!-- with any particular rule -->
<!-- In this case it's our factory -->
<!-- object which gives us back -->
<!-- a handle to whatever Dao (Data -->
<!-- access object) that we need -->
<application-data
identifier="daoFactory">DaoFactory
</application-data>
<!-- A Java (Utility) function -->
<! we reference in our rules -->
<java:functions>
public void printStock(
net.firstpartners.rp.StockOffer stock)
{
System.out.println(
"Name:"+stock.getStockName()
+" Price: "+stock.getStockPrice()
+" BUY:"+stock.getRecommendPurchase());
}
</java:functions>
<!-- Check for XYZ Corp-->
<rule name="XYZCorp" salience="-1">
<!-- Parameters we can pass into-->
<!-- the business rule -->
<parameter identifier="stockOffer">
<class>StockOffer</class>
</parameter">
<!-- Conditions that must be met for -->
<!-- business rule to fire -->
<java:condition>
stockOffer.getStockName().equals("XYZ")
</java:condition>
<java:condition>
stockOffer.getRecommendPurchase() == null
</java:condition>
<java:condition>
stockOffer.getStockPrice() > 10
</java:condition>
<!-- What happens when the business -->
<!-- rule is activated -->
<java:consequence>
stockOffer.setRecommendPurchase(
StockOffer.NO);
printStock(stockOffer);
</java:consequence>
</rule>
<!-- Ensure that negative prices -->
<!-- are not accepted -->
<rule name="Stock Price Not Negative">
<!-- Parameters we can pass into the -->
<!-- business rule -->
<parameter identifier="stockOffer">
<class>StockOffer</class>
</parameter>
<!-- Conditions for rule to fire -->
<java:condition>
stockOffer.getStockPrice() < 0
</java:condition>
<!--When rule is activated then ... -->
<java:consequence>
stockOffer.setRecommendPurchase
(StockOffer.NO);
printStock(stockOffer);
</java:consequence>
</rule>
<!-- Check for Negative Prices-->
<rule name="Stock Price Low Enough">
<!-- Parameters for the rule -->
<parameter identifier="stockOffer">
<class>StockOffer</class>
</parameter>
<!-- Now uses Dao to get stock list -->
<java:condition>
daoFactory.getStockDao().isOnStockList(
stockOffer.getStockName())
</java:condition>
<java:condition>
stockOffer.getRecommendPurchase() == null
</java:condition>
<java:condition>
stockOffer.getStockPrice() < 100
</java:condition>
<!-- When rule is activated do this -->
<java:consequence>
stockOffer.setRecommendPurchase(
StockOffer.YES);
printStock(stockOffer);
</java:consequence>
</rule>
</rule-set>

There are several changes to this file to integrate the data access layer with our business rules:

  • At the top of the file, we have several new <java:import> statements to reference the StockNameDao, DaoImplementation, and DaoFactory classes that we added to the system.
  • We have a new tag, <application-data>, which assigns an instance of the DaoFactory class to a variable. <application-data> tags are similar to parameters, except they apply to all business rules, and not just one.
  • The Stock Price Low Enough rule has a new condition, which uses the DaoFactory and StockNameDao to check if the stock is on the list of those that we deal with.

We run our BusinessRulesTest (simulator) again. The simulator/unit tests run OK, since even though we have changed the structure of the program, we haven't (yet) changed what it does. From looking at the output logs, we can see that our business rules are using StockNameDao as part of their evaluations, and that DaoImplementation.isOnStockList() is being called.

While this example shows the reading of information from a data source, the principles are the same for writing information, if that is what a rule has decided should be done. The differences would be that our DAO would have a setSomeInformation() method, and that the method would be called in the <java:consequence> part of the business rule, once the specific conditions had been met.

Summary

In this article, we showed that most Java server applications have three tiers: presentation, business logic, and data persistence. While the use of frameworks is widely accepted in the presentation and persistence layers, until now no framework has been available to encapsulate low-level business logic. As we've seen in the examples, Drools and JSR-94 are ideal candidates for reducing the complexity and speeding the development of Java applications. I hope that these examples inspire you to take a closer look at rule engines, and that they save many hours of development and maintenance time in your applications.

Resources

Paul Browne , based in Dublin, Ireland, has been consulting in enterprise Java with FirstPartners.net for almost seven years.



]]>
Implement business logic with the Drools rules enginehttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142392.html哼哼哼哼Mon, 03 Sep 2007 09:24:00 GMThttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142392.htmlhttp://www.aygfsteel.com/hengheng123456789/comments/142392.htmlhttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142392.html#Feedback0http://www.aygfsteel.com/hengheng123456789/comments/commentRss/142392.htmlhttp://www.aygfsteel.com/hengheng123456789/services/trackbacks/142392.html阅读全文

]]>
Drools Documentationhttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142366.html哼哼哼哼Mon, 03 Sep 2007 08:36:00 GMThttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142366.htmlhttp://www.aygfsteel.com/hengheng123456789/comments/142366.htmlhttp://www.aygfsteel.com/hengheng123456789/archive/2007/09/03/142366.html#Feedback0http://www.aygfsteel.com/hengheng123456789/comments/commentRss/142366.htmlhttp://www.aygfsteel.com/hengheng123456789/services/trackbacks/142366.html阅读全文

]]>
BIç›¸å…³çš„å¼€æºå·¥å…øP¼ˆè½¬ï¼‰http://www.aygfsteel.com/hengheng123456789/archive/2006/12/30/90982.html哼哼哼哼Sat, 30 Dec 2006 04:26:00 GMThttp://www.aygfsteel.com/hengheng123456789/archive/2006/12/30/90982.htmlhttp://www.aygfsteel.com/hengheng123456789/comments/90982.htmlhttp://www.aygfsteel.com/hengheng123456789/archive/2006/12/30/90982.html#Feedback0http://www.aygfsteel.com/hengheng123456789/comments/commentRss/90982.htmlhttp://www.aygfsteel.com/hengheng123456789/services/trackbacks/90982.html 转自åQ?a >http://challenger11.blogdriver.com/challenger11/1241587.html

我们都知道“瞎子摸象”的故事。不同的瞎子对大象的认识不同åQŒå› ä¸ÞZ»–们只认识了自己摸到的地方。而企业如果要避免重犯˜q™æ ·çš„错误,那就¼›ÖM¸å¼€å•†åŠ¡æ™ø™ƒ½åQˆBIåQ‰ã€‚专家认为,BI对于企业的重要性就像聪明才智对于个人的重要性。欧¾ŸŽä¼ä¸šçš„¾léªŒä¹Ÿè¯æ˜Žï¼Œä¼ä¸šé¿å…æ— çŸ¥å’Œä¸€çŸ¥åŠè§£å±é™©çš„æœ‰æ•ˆæ‰‹æ®µž®±æ˜¯å•†åŠ¡æ™ø™ƒ½ã€‚商务智能旨在充分利用企业在日常¾lè¥˜q‡ç¨‹ä¸­æ”¶é›†çš„大量数据和资料,òq¶å°†å®ƒä»¬è½¬åŒ–ä¸ÞZ¿¡æ¯å’ŒçŸ¥è¯†æ¥å…é™¤å„¿Uæ— çŸ¥çŠ¶æ€å’ŒçžŽçŒœè¡ŒäØ“(f¨´)ã€?/b> 

支持BI的开源工å…äh•°é‡ä¼—多,但是大多数的工具都是偏重某方面的。例如,CloverETL偏重ETLåQŒJPivot偏重多维分析展现åQŒMondrian是OLAP服务器。而Bee、Pentahoå’ŒSpagoBI½{‰é¡¹ç›®åˆ™é’ˆå¯¹å•†åŠ¡æ™ø™ƒ½é—®é¢˜æä¾›äº†å®Œæ•´çš„解决æ–ÒŽ(gu¨©)¡ˆã€?/font>

ETL 工具

ETL开源工具主要包括CloverETLå’ŒOctupus½{‰ã€?

åQ?åQ‰CloverETL是一个Javaçš„ETL框架åQŒç”¨æ¥è{换结构化的数据,支持多种字符集之间的转换åQˆå¦‚ASCII、UTF-8å’ŒISO-8859-1½{‰ï¼‰åQ›æ”¯æŒJDBCåQŒåŒæ—¶æ”¯æŒdBaseå’ŒFoxPro数据文äšgåQ›æ”¯æŒåŸºäºŽXMLçš„è{换描˜q°ã€?

(2)Octupus是一个基于Javaçš„ETL工具åQŒå®ƒä¹Ÿæ”¯æŒJDBC数据源和åŸÞZºŽXMLçš„è{换定义。Octupus提供通用的方法进行数据è{换,用户可以通过实现转换接口或者ä‹É用Jscript代码来定义è{换流½E‹ã€?

OLAP服务�

(1)Lemur主要面向HOLAPåQŒè™½ç„‰™‡‡ç”¨C++¾~–写åQŒä½†æ˜¯å¯ä»¥è¢«å…¶ä»–语言的程序所调用。Lemur支持基本的操作,如切片、切块和旋è{½{‰åŸºæœ¬æ“ä½œã€?

(2)Mondrian面向ROLAP包含4层:(x¨¬)表示层、计½Ž—层、聚集层、存储层ã€?

â—?表示层:(x¨¬)指最¾lˆå‘ˆçŽ°åœ¨ç”¨æˆ·æ˜„¡¤ºå™¨ä¸Šçš„以å?qi¨¢ng)与用户之间的交互,有许多方法来展现多维数据åQŒåŒ…括数据透视表、饼、柱、线状图ã€?

â—?计算层:(x¨¬)分析、验证、执行MDX查询ã€?

â—?聚集层:(x¨¬)一个聚集指内存中一¾l„计½Ž—å€?cell)åQŒè¿™äº›å€¼é€šè¿‡¾l´åˆ—来限制。计½Ž—层发送单元请求,如果è¯äh±‚不在¾~“存中,或者不能通过旋è{聚集导出的话åQŒé‚£ä¹ˆèšé›†å±‚向存储层发送请求。聚合层是一个数据缓冲层åQŒä»Žæ•°æ®åº“来的单元数据,聚合后提供给计算层。聚合层的主要作用是提高¾pȝ»Ÿçš„æ€§èƒ½ã€?

â—?存储层:(x¨¬)提供聚集单元数据和维表的成员。包括三¿Uéœ€è¦å­˜å‚¨çš„æ•°æ®åQŒåˆ†åˆ«æ˜¯äº‹å®žæ•°æ®ã€èšé›†å’Œ¾l´ã€?

OLAP客户�

JPivot是JSP风格的标½{‘Öº“åQŒç”¨æ¥æ”¯æŒOLAP表,使用户可以执行典型的OLAP操作åQŒå¦‚切片、切块、上钅R€ä¸‹é’ȝ­‰ã€‚JPivot使用Mondrian服务器,分析¾l“果可以导出为Excel或PDFæ–‡äšg格式ã€?

数据库管理系¾l?

主要的开源工具包括MonetDB、MySQL、MaxDBå’ŒPostgreSQL½{‰ã€‚这些数据库都被设计用来支持BI环境。MySQL、MaxDBå’ŒPostgreSQL均支持单向的数据复制。BizGres™å¹ç›®çš„目的在于ä‹ÉPostgreSQLæˆäØ“(f¨´)数据仓库å’?BI的开源标准。BizGres为BI环境构徏专用的完整数据库òq›_°ã€?

完整的BI开源解å†Ïx–¹æ¡?

1.Pentaho 公司的Pentaho BI òq›_°

它是一个以‹¹ç¨‹ä¸ÞZ¸­å¿ƒçš„、面向解å†Ïx–¹æ¡ˆçš„æ¡†æž¶åQŒå…·æœ‰å•†åŠ¡æ™ºèƒ½ç»„ä»¶ã€‚BI òq›_°æ˜¯ä»¥‹¹ç¨‹ä¸ÞZ¸­å¿ƒçš„åQŒå…¶ä¸­æž¢æŽ§åˆ¶å™¨æ˜¯ä¸€ä¸ªå·¥ä½œæµå¼•擎。工作流引擎使用‹¹ç¨‹å®šä¹‰æ¥å®šä¹‰åœ¨ BI òq›_°ä¸Šæ‰§è¡Œçš„å•†åŠ¡æ™ø™ƒ½‹¹ç¨‹ã€‚流½E‹å¯ä»¥å¾ˆå®ÒŽ(gu¨©)˜“被定åˆÓž¼Œä¹Ÿå¯ä»¥æ·»åŠ æ–°çš„æµ½E‹ã€‚BI òq›_°åŒ…含¾l„äšg和报表,用以分析˜q™äº›‹¹ç¨‹çš„æ€§èƒ½ã€‚BI òq›_°æ˜¯é¢å‘è§£å†Ïx–¹æ¡ˆçš„åQŒåã^台的操作是定义在‹¹ç¨‹å®šä¹‰å’ŒæŒ‡å®šæ¯ä¸ªæ´»åŠ¨çš„ action 文档里。这些流½E‹å’Œæ“ä½œå…±åŒå®šä¹‰äº†ä¸€ä¸ªå•†åŠ¡æ™ºèƒ½é—®é¢˜çš„è§£å†³æ–ÒŽ(gu¨©)¡ˆã€‚è¿™ä¸?BI 解决æ–ÒŽ(gu¨©)¡ˆå¯ä»¥å¾ˆå®¹æ˜“地集成到åã^台外部的商业‹¹ç¨‹ã€‚一个解å†Ïx–¹æ¡ˆçš„定义可以包含ä»ÀL„æ•°é‡çš„æµ½E‹å’Œæ“ä½œã€?

BIòq›_°åŒ…括一ä¸?BI 框架、BI ¾l„äšg、一ä¸?BI 工作台和桌面收äšg½Ž±ã€‚BI 工作台是一套设计和½Ž¡ç†å·¥å…·åQŒé›†æˆåˆ°Eclipse环境。这些工具允许商业分析äh员或开发äh员创建报表、äÈA表盘、分析模型、商业规则和 BI ‹¹ç¨‹ã€‚Pentaho BI òq›_°æž„徏于服务器、引擎和¾l„äšg的基¼‹€ä¹‹ä¸ŠåQŒåŒ…括J2EE 服务器、安全与权限控制、portal、工作流、规则引擎、图表、协作、内容管理、数据集成、多¾l´åˆ†æžå’Œ¾pȝ»Ÿå»ºæ¨¡½{‰åŠŸèƒ½ã€‚è¿™äº›ç»„ä»¶çš„å¤§éƒ¨åˆ†æ˜¯åŸÞZºŽæ ‡å‡†çš„,可ä‹É用其他äñ”品替换之ã€?

2.ObjectWeb

该项目近日发布了SpagoBi 1.8版本。SpagoBi 是一‹Æ‘ÖŸºäºŽMondrain+JProvitçš„BIæ–ÒŽ(gu¨©)¡ˆåQŒèƒ½å¤Ÿé€šè¿‡OpenLaszlo产生实时报表åQŒäØ“(f¨´)å•†åŠ¡æ™ø™ƒ½™å¹ç›®æä¾›äº†ä¸€ä¸ªå®Œæ•´å¼€æºçš„解决æ–ÒŽ(gu¨©)¡ˆåQŒå®ƒæ¶ëŠ›–了一个BI¾pȝ»Ÿæ‰€æœ‰æ–¹é¢çš„功能åQŒåŒ…括:(x¨¬)数据挖掘、查询、分析、报告、Dashboard仪表板等½{‰ã€‚SpagoBI使用核心¾pȝ»Ÿä¸ŽåŠŸèƒ½æ¨¡å—é›†æˆçš„æž¶æž„åQŒè¿™æ ·åœ¨¼‹®ä¿òq›_°½E›_®šæ€§ä¸Žåè°ƒæ€§çš„基础上又保证了系¾lŸå…·æœ‰å¾ˆå¼ºçš„æ‰©å±•能力。用æˆäh— éœ€ä½¿ç”¨SpagoBI的所有模块,而是可以只利用其中的一些模块ã€?

SpagoBI使用了许多已有的开源èÊYä»Óž¼Œå¦‚Spagoå’ŒSpagosi½{‰ã€‚因此,SpagoBI集成äº?Spago的特征和技术特点,使用它们½Ž¡ç†å•†åŠ¡æ™ø™ƒ½å¯¹è±¡åQŒå¦‚报表、OLAP分析、äÈA表盘、记分卡以及(qi¨¢ng)数据挖掘模型½{‰ã€‚SpagoBI支持BI¾pȝ»Ÿçš„ç›‘æŽ§ç®¡ç†ï¼ŒåŒ…æ‹¬å•†åŠ¡æ™ø™ƒ½å¯¹è±¡çš„æŽ§åˆ¶ã€æ ¡éªŒã€è®¤è¯å’Œåˆ†é…‹¹ç¨‹ã€‚SpagoBI采用Portalet技术将所有的BIå¯¹è±¡å‘å¸ƒåˆ°ç»ˆç«¯ç”¨æˆøP¼Œå› æ­¤BI对象ž®±å¯ä»¥é›†æˆåˆ°ä¸ºç‰¹å®šçš„企业需求而已¾lé€‰æ‹©å¥½çš„Portal¾pȝ»Ÿä¸­åŽ»ã€?

3.Bee™å¹ç›®

该项目是一套支持商务智能项目实施的工具套äšgåQŒåŒ…括ETL工具和OLAP 服务器。Beeçš„ETL工具使用åŸÞZºŽPerlçš„BEIåQŒé€šè¿‡ç•Œé¢æè¿°‹¹ç¨‹åQŒä»¥XML形式˜q›è¡Œå­˜å‚¨ã€‚用户必™åÕd¯¹è½¬æ¢˜q‡ç¨‹˜q›è¡Œ¾~–码。Beeçš„ROLAP 服务器保证多通SQL 生成和强有力的高速缓存管ç?使用MySQL数据库管理系¾l?。ROLAP服务器通过SOAP应用接口提供丰富的客户应用。Web Portalä½œäØ“(f¨´)主要的用æˆähŽ¥å£ï¼Œé€šè¿‡Web‹¹è§ˆå™¨è¿›è¡ŒæŠ¥è¡¨è®¾è®¡ã€å±•½Cºå’Œ½Ž¡ç†æŽ§åˆ¶åQŒåˆ†æžç»“果可以以Excel、PDF、PNG、PowerPointã€?textå’ŒXML½{‰å¤š¿UåŞ式导出ã€?

Bee™å¹ç›®çš„特点在于:(x¨¬)

â—?½Ž€å•å¿«æïL(f¨¥ng)š„æ•°æ®è®‰K—®åQ?

�支持预先定义报表和实时查询;

â—?通过拖拽方式è½ÀL¾å®žçŽ°æŠ¥è¡¨å®šåˆ¶åQ?

â—?完整报表的轻松控åˆÓž¼›

â—?以表和图˜q›è¡Œé«˜è´¨é‡çš„æ•°æ®å±•示ã€?/p>

]]>
2006åQšä¸­å›½BI市场的十大发展趋åŠ?/title><link>http://www.aygfsteel.com/hengheng123456789/archive/2006/09/08/68509.html</link><dc:creator>哼哼</dc:creator><author>哼哼</author><pubDate>Fri, 08 Sep 2006 06:18:00 GMT</pubDate><guid>http://www.aygfsteel.com/hengheng123456789/archive/2006/09/08/68509.html</guid><wfw:comment>http://www.aygfsteel.com/hengheng123456789/comments/68509.html</wfw:comment><comments>http://www.aygfsteel.com/hengheng123456789/archive/2006/09/08/68509.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/hengheng123456789/comments/commentRss/68509.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/hengheng123456789/services/trackbacks/68509.html</trackback:ping><description><![CDATA[ <p> <font class="font14">    2006òq´çš„BI产品ž®†æŠŠæ•°æ®ä»“库建模以及(qi¨¢ng)数据挖掘½{‰æŠ€æœ¯å®žè´¨æ€§åœ°åº”用˜q›æ¥ã€‚同时BI技术将与ERP、CRM、企业门æˆïL(f¨¥ng)­‰æŠ€æœ¯ç›¸èžåˆåQŒåŞ成集成化的äñ”品ã€?</font> </p> <p> <font class="font14">    ¾lè¿‡2005òq´çš„强劲发展åQŒä¸­å›½å•†ä¸šæ™ºèƒ½ï¼ˆBIåQ‰èÊY件市场销售额辑ֈ°10.15亿元人民币,òq´å¢žé•¿çŽ‡è¾‘Öˆ°54.96åQ…ã€?006òqß_(d¨¢)¼Œéšç€å±¥è¡ŒåŠ å…¥WTO全面开攑ָ‚场承诺时间的临近和中国企业国际化的步伐加快以å?qi¨¢ng)政府职能的全面转变åQŒä¸­å›½é‡‘融、电(sh¨´)信、政府、零售、制造等行业对商业智能技术应用的需求全面爆发。赛˜qªé¡¾é—®é¢„è®?006òq´ä¸­å›½BI软äšg市场规模ž®†è¶…˜q?6亿元人民å¸?见图1)ã€?<br />    <br />    å›½å†…å•†ä¸šæ™ø™ƒ½è½¯äšg市场ž®†å‘ˆçŽ°åå¤§å‘å±•è¶‹åŠÑ€?<br />    <br />    ­‘‹åŠ¿ä¸€:融合多种技术的集成产品出现ã€?<br />    <br />    2006òq´BI产品技术的发展­‘‹åŠ¿æ˜¯ï¼š(x¨¬)ç”ÞqŽ°æœ‰çš„åˆæ­¥åº”ç”¨å¦‚æŠ¥è¡¨åˆ†æžã€æ•°æ®é›†æˆï¼Œå‘æ·±åº¦å’Œòq¿åº¦åº”用发展åQŒæ•°æ®ä»“库徏模和数据挖掘½{‰æŠ€æœ¯çš„应用ž®†å®žè´¨æ€§æŽ¨å¼€ã€?<br />    <br />    2006òq´çš„BI产品ž®†æŠŠæ•°æ®ä»“库建模以及(qi¨¢ng)数据挖掘½{‰æŠ€æœ¯å®žè´¨æ€§åœ°åº”用˜q›æ¥ã€‚同时BI技术将与ERP、CRM、企业门æˆïL(f¨¥ng)­‰æŠ€æœ¯ç›¸èžåˆåQŒåŞ成集成化的äñ”品。尤其在面向中小企业用户的企业管理èÊY件方案中åQŒERP、CRM厂商ä¼?x¨¬)å°†BIæ–ÒŽ(gu¨©)¡ˆåµŒå…¥åˆ°è‡ªå·Þqš„ERP或CRM¾pȝ»Ÿä¸­ã€‚而整合了企业门户的BI产品åQŒåœ¨äºÞZ»¬¾~ºå°‘æ—‰™—´ã€å¿…™åÕd°†æ³¨æ„åŠ›æ”¾åœ¨çœŸæ­£é‡è¦çš„å†³ç­–è§„åˆ™ä¸Šçš„òq´ä»£åQŒå¯ä»¥å‡ž®‘作决策时必™åÕdˆ†æžçš„æ•°æ®é‡ã€?<br />    <br />    ­‘‹åŠ¿äº?BI产品的整体ä­h(hu¨¢n)格在逐步下降ã€?<br />    <br />    在ä­h(hu¨¢n)格方面,BI软äšg一直处于高端ä­h(hu¨¢n)位,提供¾l™ä¿¡æ¯åŒ–廸™®¾â€œè´µæ—â€ä‹É用。而以中小企业ä¸ÞZ»£è¡¨çš„ä¸­ã€ä½Žç«¯å®¢æˆøP¼Œä¹Ÿå¸Œæœ›èŠ±ä¸Šå‡ åä¸‡ž®±å¯ä»¥ä¸Šä¸€å¥—BI软äšg。因此无论是国际BI厂商˜q˜æ˜¯å›½å†…BI企业都针寚w«˜ã€ä¸­ã€ä½Žç«¯ç”¨æˆ·å‘ˆçŽ°å‡ºä¸åŒçš„ä­h(hu¨¢n)格策略,æ€ÖM½“价位呈现下降­‘‹åŠ¿ã€‚è¿™ä¸ºå›½å†…æ›´òq¿å¤§çš„企业应用BI产品提供了可能ã€?<br />    <br />    ­‘‹åŠ¿ä¸?高端市场归属国际åQŒä¸­ä½Žç«¯è½æˆ·å›½å†…ã€?<br />    <br />    中国的BI市场从开始就¾låŽ†äº†ä¸€ä¸ªæ¿€çƒˆç«žäº‰çš„æ—¶æœŸåQŒé«˜ç«¯å¸‚åœø™¢«å›½é™…大厂商所占据åQŒä½Žç«¯å¸‚场是国内的BI厂商å?qi¨¢ng)行业的ISVå?qi¨¢ng)集成商在竞争ã€?006òq´ä¸­å›½çš„BI市场可能在低端市场初步出现像用友、金蝶在财务套装软äšg那样的格局åQŒå‡ ä¸ªå¤§çš„国内BI厂商凭借本地化和销售网¾lœå æ®å¸‚åœ?0åQ…以上的市场份额。而在大的行业市场里,BIž®†ä¼š(x¨¬)与解å†Ïx–¹æ¡ˆèžåˆåœ¨ä¸€èµøP¼Œå¸‚场被行业的ISV所把持ã€?<br />    <br />    ­‘‹åŠ¿å›?在营销½{–略上,整合营销­‘‹åŠ¿å‡¸æ˜¾ã€?<br />    <br />    2006òq´BI厂商ž®†é¢ä¸´æ¿€çƒˆè€ŒçŽ°å®žçš„å¸‚åœºç«žäº‰ã€‚è¥é”€æ‰‹æ®µã€äñ”品研发受到前所未有的重视。更多的软文宣传、研讨会(x¨¬)åQˆåŒ…括行业研讨会(x¨¬)åQ‰ã€æ–°å“å‘布会(x¨¬)、åÙE讲以å?qi¨¢ng)è”åˆã€åÆˆè´­ç­‰ž®†ä¼š(x¨¬)åœ?006òq´ä¸­å›½BI市场里上演。多¿Uå¤šæ ïL(f¨¥ng)š„营销方式ž®†è®©äººç›®ä¸æš‡æŽ¥ã€?<br />    <br />    ­‘‹åŠ¿äº?用户重视效益åQŒå…³æ³¨BPMã€?<br />    <br />    用户之所以投入巨额资金购买BI软äšgåQŒç›®çš„都是希望对˜qè¥æ•°æ®˜q›è¡Œåˆ†æžåQŒä»¥å®žçŽ°å®žæ—¶å“åº”ã€‚å¯¹äºŽä¼ä¸šæ¥è®ÔŒ¼Œ˜q˜å¸Œæœ›BI能够支持企业‹¹ç¨‹ä¼˜åŒ–以及(qi¨¢ng)提高生äñ”力。当然其最¾lˆç›®æ ‡éƒ½æ˜¯å‘¾_„¡›Š½Ž¡ç†è¦æ•ˆç›Šã€‚但是目前的很多¾l„织òq¶æ²¡æœ‰å¾ç«‹èƒ¦åŠ¡æ ‡å‡†æ¥è¡¡é‡æ­¤é¡¹ITæŠ•å…¥çš„æ•ˆç›Šã€‚äØ“(f¨´)此,ž®†BI技术和¾l©æ•ˆ½Ž¡ç†ž®†ç»“合而åŞ成的BPM (企业¾l©æ•ˆ½Ž¡ç†)æˆäØ“(f¨´)BI领域用户的关注点。在应用领域斚w¢åQŒBPM可以深入特定的业务流½E‹æˆ–功能åQ›åœ¨åŠŸèƒ½åˆ’åˆ†æ–šw¢åQŒBPM可按企业业务功能划分åQŒå¦‚财务¾l©æ•ˆ½Ž¡ç†ã€å®¢æˆ·å…³¾pȝ‡W效管理、生产运营ç‡W效管理、交叉业务ç‡W效管理;在系¾lŸæž„造方面,BPM能够协调业务‹zÕdŠ¨ä»¥è¾¾åˆ°ç‰¹å®šçš„¾l“æžœåQŒå¦‚¾~–制预算、评估关键供应商½{‰ã€‚因此,BI软äšg供应商在用BI技术提升企业ç‡W效上面做文章åQŒä¸€å®šä¼š(x¨¬)辑ֈ°ä¸€å®šçš„用户满意度。   Â?/font> </p> <p> <font class="font14">                                                         <img src="http://www.226e.net/upload/2006-3-8/2006389252754100.jpg" border="1" /></font> </p> <p> <font class="font14">    ­‘‹åŠ¿å…?以äñ”品䨓(f¨´)依托åQŒå¢žå€¼æœåŠ¡æˆä¸»è§’ã€?<br />    <br />    目前BI软äšg领域中的多数软äšg供应商,其èÊY件授权收入和服务收入基本持åã^åQŒä½†éšç€æ•°æ®ä»“库和查询、报表工兯‚ÊY件的应用普及(qi¨¢ng)åQŒä¸‹ä¸€æ­¥å¦‚何开展分析型应用ž®†æˆä¸ÞZ¸»å¯û|¼Œä»Žé”€å”®äñ”品中可获得的收入ž®†é€æ¸é™ä½Žã€‚此消彼长,帮助用户建立分析和挖掘模型等应用解决æ–ÒŽ(gu¨©)¡ˆå’Œå’¨è¯¢æœåŠ¡çš„æ”¶å…¥ž®†åœ¨æ˜Žå¹´ä¸Šå‡åQŒæœ€¾lˆå°†­‘…过软äšg产品授权收入。因此,如何在提供增值服务这æ–îC¸€è½®çš„较量中胜出,是BI软äšg供应商现在需要未雨绸¾~ªçš„。   Â?br />    <br />    ­‘‹åŠ¿ä¸?应用范围不断扩展åQŒåŒºåŸŸè¾¹ç•Œæ—¥­‘‹æ¨¡¾pŠã€?<br />    <br />    目前åQŒåŽåŒ—、华东和华南地区BI软äšg占据了绝大部分的市场份额åQŒè€Œå…¶å®ƒå››åœ°åŒºçš„市åœÞZ†¾é¢ç›¸å¯¹åä½Žã€‚但华北、华东、华南地区由于电(sh¨´)信、金融、政府等行业信息化水òqŒ™¾ƒé«˜ï¼Œ¿U¯ç¯äº†å¤§é‡æ•°æ®ï¼Œæ¸´æœ›ä»Žè¿™äº›æ•°æ®ä¸­èŽïL(f¨¥ng)›ŠåQŒå› æ­¤ï¼Œ2006òq´å†…ž®†ä»æ˜¯BI软äšg的主要应用领域。但随着BI软äšg应用范围的不断扩大和用户认知度的提升åQŒå„BI软äšg供应商将致力于开拓其它区域的市场。另å¤?006òq´å›½å®¶çš„“西部大开发”和“振兴东北老工业基地”两大战略的深入推进和实施,ž®†ä¿ƒ˜q›è¥¿éƒ¨å’Œä¸œåŒ—地区对于交通、能源、电(sh¨´)信、电(sh¨´)å­æ”¿åŠ¡çš„å»ø™®¾åQŒè¿™ž®†åœ¨ä¸€å®šç¨‹åº¦ä¸Šå¸¦åŠ¨è¥‰Kƒ¨å’Œä¸œåŒ—地区对于BI软äšg产品å?qi¨¢ng)åº”ç”¨çš„éœ€æ±‚ï¼Œä»Žè€ŒäØ“(f¨´)BI软äšg的推òq¿å’Œåº”用带来新的发展机遇。(见图2åQ?/font> </p> <p> <font class="font14">                                                       <img src="http://www.226e.net/upload/2006-3-8/2006389252810298.jpg" border="1" /></font> </p> <p> <font class="font14">    ­‘‹åŠ¿å…?中小企业的BI应用市场份额ž®†é€æ¸æ‰©å¤§ã€?<br />    <br />    虽然在垂直市åœÞZ¸ŠåQŒå¤§åž‹ä¼ä¸šä¾ç„¶æ˜¯BI的应用主体,但是中小企业的BI应用需求开始释放ã€?<br />    <br />    中小企业­‘Šæ¥­‘Šæ³¨é‡è‡ªíw«å¾è®¾ï¼Œå·²ç»æ„è¯†åˆîC¿¡æ¯åŒ–的重要性和˜q«åˆ‡æ€§ã€‚因此,国内òq¿å¤§çš„中ž®ä¼ä¸šé€æ¸å‘ˆçŽ°å¯¹ç®¡ç†èÊY件旺盛的需求态势åQŒå¿…ž®†æˆä¸?006òq´å›½å†?BI市场重要¾l„成部分。国际一‹¹çš„BI厂商BO公司和国内BI领域ä½ég½¼è€…菲奈特公司已经开发出适合中小企业应用的BI解决æ–ÒŽ(gu¨©)¡ˆã€?<br />    <br />    èµ›èé_™åùN—®é¢„计2006òq´å›½å†…中ž®ä¼ä¸šå¯¹BI的应用需求将快速增长,市场份额ž®†ç”±2005òq´çš„32.7%上升åˆ?2.5%åQŒæˆä¸ºBI市场上新的增长亮炏V€‚(见图3åQ‰Â?/font> </p> <p> <font class="font14">                                                        <img src="http://www.226e.net/upload/2006-3-8/2006389252972074.jpg" border="1" /></font> </p> <p> <font class="font14">    ­‘‹åŠ¿ä¹?优势行业åœîC½ä¸å‡åQŒè¡Œä¸šé›†æˆå’Œè§£å†³æ–ÒŽ(gu¨©)¡ˆæˆäØ“(f¨´)ä¸ÀLµã€?<br />    <br />    从行业应用来看,中国的金融业、电(sh¨´)信业åœ?006òq´ä»ž®†å æ®ç€BI应用的优势行业地位。另外政府和消费品制造业å?qi¨¢ng)é›¶å”®ä¸?如百货企业及(qi¨¢ng)˜qžé”ä¼ä¸š)对BI的需求也不容忽视。由于BI的分析型应用ž®†åœ¨æœªæ¥å ä¸»å¯¼åœ°ä½ï¼Œæ¯ä¸ªè¡Œä¸šåˆéƒ½éœ€è¦ä¸åŒçš„行业知识åQŒå› æ­¤ç”µ(sh¨´)信及(qi¨¢ng)金融的BI业务ž®†ä¼š(x¨¬)被行业的集成å?qi¨¢ng)ISV占据一定的市场份额。(见图4åQ‰Â?/font> </p> <p> <font class="font14">                                                        <img src="http://www.226e.net/upload/2006-3-8/2006389253080974.jpg" border="1" /></font> </p> <font class="font14">    ­‘‹åŠ¿å?ä¸ÕdŠ›åŽ‚å•†ç«žäº‰ä»Žâ€œç¾¤é›„é€é¹¿â€åˆ°â€œä¸‰­‘³é¼Žç«‹â€ã€?<br />    <br />    2006òq´ä¸»åŠ›åŽ‚å•†çš„ç«žäº‰ž®†ç”±â€œç¾¤é›„逐鹿”态势转变到“三­‘³é¼Žç«‹â€çš„æ ¼å±€ã€‚高端市åœÞZ¼ ¾lŸå›½é™…大厂商占有明显优势åQ›ä¸­ä½Žç«¯å¸‚场仍然是国内的BI厂家å?qi¨¢ng)行业çš?ISVåQˆç‹¬ç«‹èÊY件开发商åQ‰åŠ(qi¨¢ng)集成商的地盘åQ›æ–°å…´çš„厂商后来居上åQŒè¿…速抢占高、中、底端市åœÞZ»Žè€Œåœ¨BI市场里åŞ成新çš?“三­‘³é¼Žç«‹â€æ€åŠ¿ç«žäº‰æ ¼å±€ã€?<br />    <br />    高端市场上BO、Hyperion、NCR、IBM 、甲骨文、微软、SAS½{‰ä¼ ¾lŸçš„国际专业BI厂商ž®†ç‘ô¾l­å æ®é«˜ç«¯å¸‚场相当䆾额ã€?<br />    <br />    国内的专业BI厂商å?qi¨¢ng)行业的ISVåQŒä¸“业BI厂商菲奈特,åœ?006òq´å°†¾l§ç®‹ä½œäØ“(f¨´)国内BI厂商领先代表扛è“v国äñ”化大旗,而用友、金蝶、博¿U‘等软äšg企业的市场潜力正逐步昄¡Ž°ã€?006òq´å¸‚åœÞZ†¾é¢å°†å¿«é€Ÿä¸Šå‡ã€?<br />    <br />    2005òq´æ¶Œå…¥å›½å†…BI市场的新兴力量,如三èÞq”µ(sh¨´)æœÞZ¿¡æ¯æŠ€æœ¯æœ‰é™å…¬å¸ï¼ˆMDITåQ‰ã€ä¸Š‹¹äh¶¦ç™„¡­‰ä¼ä¸šã€‚å°†ä¼?x¨¬)成ä?006òq´ä¸­å›½BI市场的黑马。传¾lŸå›½é™…厂商、国内BI企业和新˜q›å…¥ä¼ä¸šž®†åÅžæˆ?006òq´ä¸­å›½BI市场“三­‘³é¼Žç«‹â€ä¹‹åŠÑ€?/font> <img src ="http://www.aygfsteel.com/hengheng123456789/aggbug/68509.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/hengheng123456789/" target="_blank">哼哼</a> 2006-09-08 14:18 <a href="http://www.aygfsteel.com/hengheng123456789/archive/2006/09/08/68509.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> Ö÷Õ¾Ö©Öë³ØÄ£°å£º <a href="http://" target="_blank">ÖîôßÊÐ</a>| <a href="http://" target="_blank">³¯ÑôÊÐ</a>| <a href="http://" target="_blank">ÉÛÑôÊÐ</a>| <a href="http://" target="_blank">º£³ÇÊÐ</a>| <a href="http://" target="_blank">ÌìÌ¨ÏØ</a>| <a href="http://" target="_blank">Ì«¹ÈÏØ</a>| <a href="http://" target="_blank">µÂÁî¹þÊÐ</a>| <a href="http://" target="_blank">ƽÄÏÏØ</a>| <a href="http://" target="_blank">ÎÚÉóÆì</a>| <a href="http://" target="_blank">À³ÖÝÊÐ</a>| <a href="http://" target="_blank">°ÙÉ«ÊÐ</a>| <a href="http://" target="_blank">²©°×ÏØ</a>| <a href="http://" target="_blank">½­ÃÅÊÐ</a>| <a href="http://" target="_blank">ÌïÁÖÏØ</a>| <a href="http://" target="_blank">´óÆÒÏØ</a>| <a href="http://" target="_blank">ÏØ¼¶ÊÐ</a>| <a href="http://" target="_blank">׿×ÊÏØ</a>| <a href="http://" target="_blank">¡»¯ÏØ</a>| <a href="http://" target="_blank">˼éÊÐ</a>| <a href="http://" target="_blank">ÃöºîÏØ</a>| <a href="http://" target="_blank">¸§Ë³ÊÐ</a>| <a href="http://" target="_blank">ÌÒÔ°ÏØ</a>| <a href="http://" target="_blank">´ó»¯</a>| <a href="http://" target="_blank">ƽÎäÏØ</a>| <a href="http://" target="_blank">ÓÀ¼ªÏØ</a>| <a href="http://" target="_blank">ÆÕ¸ñÏØ</a>| <a href="http://" target="_blank">ÎߺþÊÐ</a>| <a href="http://" target="_blank">°ºÈÊÏØ</a>| <a href="http://" target="_blank">¹àÄÏÏØ</a>| <a href="http://" target="_blank">ÂíÉ½ÏØ</a>| <a href="http://" target="_blank">·±ÖÅÏØ</a>| <a href="http://" target="_blank">´óÐÂÏØ</a>| <a href="http://" target="_blank">ÎÞ¼«ÏØ</a>| <a href="http://" target="_blank">°²ÑôÏØ</a>| <a href="http://" target="_blank">ÕѾõÏØ</a>| <a href="http://" target="_blank">ÂÐÄÏÏØ</a>| <a href="http://" target="_blank">Á¬ÔƸÛÊÐ</a>| <a href="http://" target="_blank">ãÏÖÐÊÐ</a>| <a href="http://" target="_blank">ãå´¨ÏØ</a>| <a href="http://" target="_blank">ÌÚ³åÏØ</a>| <a href="http://" target="_blank">üɽÊÐ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>