Welcome to the second article about our new features that we just released. Last time we detailed the UI enhancements that we rolled out and this installment will focus on the improvements that we made to our back-end rules engine called Snap.
Here are a few of our favorite under-the-hood programming updates that will make your Snap code even more scalable and easier to maintain.
Enhanced Administrative Interface
We want to deliver the most user-friendly interface for writing and maintaining rules for our KBMax Administrators. Here are the main updates we've made to the admin interface.
Admins now have a preview pane.
While working with all of these new element types, wouldn't it be nice to have a preview of what your configurator is going to look like while you're building it? Well, we took care of that for you. When designing a form by creating elements in the configurator tree (the left pane) and editing those elements in the center pane, you now get immediate feedback from an example form shown in the new right pane. The preview highlights the element you have selected, and can also be used to set default values of your fields.This pane is adjustable: resizing it is an easy way to learn how your responsive form will respond to different screen sizes.
The configurator tree is easier to use.
The menus for adding UI components are re-organized, with elements, buttons, and layout controls grouped into sections for easy scanning.
Snap errors are easier to find, more clearly defined, and some can fix themselves.
As a KBMax administrator, you know you write your business logic by dragging blocks of code that “snap” together. Previously, if your Snap code block had an error with one of its slots, that entire block was highlighted with a red color. For blocks with many slots, it could be hard to find which slot was the source of the problem.
In version 3.3, the specific troublesome slot in the block is highlighted in red. Furthermore, details on the error appear when the red slot is clicked. And, in some cases, intelligent assistance appears next to the error if Snap can predict the most likely ways to resolve the error. It’s like the “fix me” feature your users enjoy… only now it’s for administrators, too.
New configurator rule type: the Field Rule.
A new rule type, called a field rule, will run its code only when a specific field was changed by the user in the UI. Furthermore, field rules run before any other code, even option filters. For example, these rules can help you strip whitespace, reformat, or otherwise manipulate the input before it's used to drive logic elsewhere.
New Configurator Snap Blocks
Regex Snap blocks for matching string patterns
Now, matching user input with important keywords is even easier. Regular Expressions can now be used for matching strings. You can ensure input text contains certain data, or conforms to a certain structure.
New rule triggers
Now, you can trigger a rule when an expander changes state, or when a tab changes state. For example, you may have media in the viewer change depending on which tab or expander is on display.
Arrays now support more query blocks
Query blocks are Snap’s SQL-like way to gather results from a source of data rows like a table, database, function, or array. Previously, query blocks could not insert or delete elements of an array the same way you could entries in a table or database. Now, query blocks can manipulate arrays the same way you do tables or databases.
We hope you enjoy these new enhancements to our back-end experience! Visit our online documentation for details on these features at any time by clicking the help bubble always shown in the lower-left corner of your Administration Interface.