As shown at right, building a Rest Server is actually several projects: a Web Services Layer, a Data Access Layer, and the Business Logic for security and integrity. Products are starting to emerge to provide support for the first two, with only framework support
for Business Logic.
That is, they provide a convenient way to deploy and invoke your script / code (e.g., as events), but it is still up to you to write the code. But framework support falls far short of automation.
This is important, since Business Logic can represent up to half the effort for a database oriented transaction. Automation can therefore have a dramatic impact on the time and cost to deliver a project.
Espresso Logic provides full automation for business logic, reducing time and cost by literally orders of magnitude. Our simple example illustrates that 5 rules can replace 500 lines of code
. The impact is striking:
And code reduction is only part of the story.
- Enforcement is active - the Espresso Logic Server automatically executes your logic on every Rest-based transaction. Database integrity is not dependent on remembering to invoke the logic before updating the database.
- Re-use is automatic, so, for example, the rules conceived for Place Order are automatically applied to Change Order Line Items, Re-assign Order, etc. Logic is defined for "base resources", so is automatically applied for all resources defined above.
- Multi-table dependency management is automatic, so maintenance is simply changing the logic. Unlike manual code, the system recomputes a correct order of operations based on dependencies.
- Optimizations are automatic, so logic is pruned based on actual updated data. SQLs are optimized for aggregate operations by using 1 row "adjustment" updates, rather than expensive aggregates which may be chained.
While this example is simplified for communication, logic is quite powerful. For example, it requires only a few specifications to perform auditing, or even complex logic such as a deep copy, or a bill of materials explosion - see more examples here.
Finally, logic is also extensible
. You can use Java Script to handle events, or to define new functions or rule types.