IOC Lenovo to rule engine

xiaoxiao2021-03-05  22

I have taken time to study IOC recently, which is indeed a good stuff. The concept of IOC is very suspended (mainly explained by the domestic compatriots), just started to have a head, and later saw the most popular explanation in a human brother: It is to generate an object through the XML file definition.

There is another alias for IOC: Dependence INJECTION. It means that it is dependent on injection, it looks better than IOC, but in general, it is still the above explanation!

This explanation is really clear, but also let me really enter the IOC. With the deepening, I prefer him; and his theoretical idea and the actual application field, let me first think about the rules engine.

The rule engine must define the logical rules through the rule description file, then parsing the execution through the engine mechanism, allowing the actual code to be bound by countless variable rules. I think of it, he is very similar to the IOC mechanism, but it is not the same.

The IOC processes functional components or can be said to be class-level objects, while rule engine processing is based on objects that implement logic or method internal levels. IOC allows applications to be functionally independent, separated on code; the rules engine makes the code detail independently. It is a purpose, reducing coupling, increasing flexibility.

There is also a very similar place for IOC and rule engines: hot deployment. IOC Modify the definition file to be dynamically deployed into applications, if new classes, etc., can complete the entire modified thermal deployment through the type of thermal deployment; the rule engine can also re-read the modified profile To achieve new rule description, there is a new logic. In the secondary sense, it can be said that they all have a good management mechanism.

In fact, any of the emergence of techniques is to help developers reduce unnecessary labor. IOC and rule engines can think of these problems, which is indeed a successful technology, but also solves many practical problems. If they continue to develop, ultimately unify a more mature technology, that will be another feature of the Java world!

转载请注明原文地址:https://www.9cbs.com/read-38441.html

New Post(0)