O'Reilly logo

AngularJS Services by Jim Lavin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Validating complex data with a rules engine

Business rules within an application can sometimes become very complex, so complex that writing them in code can become a maintenance nightmare. This is where rules engines can help. Rules engines are computational services that can use dynamic rules to evaluate data and act on it. However, instead of using fixed code to implement the rules, rules engines can use different sets of rules to evaluate data in different ways as the conditions of the application dictate.

The business rules engine we are going to look at uses a forward-chaining algorithm to walk through a set of rules and execute them by evaluating the facts passed into the execute method of the service.

For those not familiar with rules engines, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required