Working with structured data
So far, our custom expression language has only supported very simple variables-numbers and Boolean values. However, in real applications, this is often not so simple. When using an expression language to offer programmable business rules, you will often be working with structured data. For example, consider an e-commerce system in which a back-office user has the possibility to define under which conditions a discount should be offered to a user and what amount of a purchase should be discounted (the following figure shows a hypothetical example of how such a feature might actually look in an application).
Typically, you do not know beforehand how a user is going to use this feature. Using only numerical variables, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access