Behaviors
From KallestadWiki
Contents |
Behaviors
Behaviors are a child element of function sets which are in turn a child element of action groups.
Behaviors are essentially the heart of the client side functionality beast. It is within behaviors that most client side functionality is defined.
Behaviors are ordered lists of various functions, and include parameters or references pointing to where parametric values can be pulled from. The decisions for when to fire functions and under what circumstances have been defined within the parent elements of behavior objects, so really all we have to concern ourselves with is the desired client side functionality.
While behaviors can be very useful in creating a rich client side user interface, under no circumstances should a developer take it for granted that behaviors have executed properly. In a web interface, clients can come from many directions, from a number of browsers and platforms. They also have the ability to turn off javascript support all together. For this reason, behaviors, action groups, and function sets are all to be considered "bonuses". When they work, which should be most often, they create great interfaces. If and when they don't work, server side functionality should be defined to manage any data discrepancies and anomalies.
Blocking Functionality
While behaviors fire sequentially based on order, there is the possibility of asynchronous completion. This is most evident with the use of any desired behavior which makes use of AJAX. My solution for this is called Upset Toe. There was an actual acronym, but when you tried to sound it out it mostly sounded like "Upset Toe", so I'm going with that.
Upset Toe
The Upset Toe goes as follows. If a behavior executes and it is defined as a blocking behavior, all behavior processing is paused until such time as the behavior elects to either continue execution or push forth an error.
Variable Definition, Extensibility
Behaviors are variable in definition and are arbitrarily extensible. KDF ships with a variety of behaviors defined out of the box. Just because I didn't have the forethought to build in a client side behavior you need doesn't mean that you can't take full advantage of the KDF platform. You simply define a template for behavior definition, add the template and it's underlying code base to the collection, and bada bing, bada boom, KDF can all of a sudden do what you wanted it to.
This is the true beauty and power of the KDF framework, and it's also a bit of a security and code management downturn as well. If you extend KDF, be sure that your code is solid. Extensions are powerful enough that they can break KDF functionality client side if they are not well defined.
Kallestad Development Framework Topics
- KDF Home
- Project Overview
- Technical Information
- Licensing
