Javascript Object KDFActionGroups

From KallestadWiki

Jump to: navigation, search

Contents

Notice

This terminology will likely change as I gain a true understanding of what I'm trying to do. For now, putting it down in writing is the best way for me to move forward.

Action Groups

Action Groups are sets of client side actions that can be defined within a data driven structure in order to provide rich client side functionality.

Each Action Group has a unique identifier (id), a tie string (tie) which identifies which elements the functionality is tied to, and an Action Set which defines the functionality to be performed.

Action Group Ties

Action Group ties are two-fold, there is a CSS based definition for tying the action groups to specific elements, and also an event trigger.

CSS Ties

An Action Group can be tied to html elements based on a CSS Query string. This means that action groups can be tied to elements based on ID, a CSS Class, an HTML tag (such as div, a, p, span, table, etc.), or a complex selection such as "all even rows within all table bodies".

Action Groups can also be tied to nothing at all css-wise. This is the case when creating groups of actions that are triggered as time based functionality, or on generic DOM events that are not associated with nodes such as page load and page exit.

Event Ties

Event Ties are not an alternative to CSS Ties, but are meant to be used in combination with CSS Ties. While the two are not mutually exclusive, they are also not 'necessarily' co-dependant - as noticed in my reference above to Page Load and Page Exit triggers.

Supported Events are DOM events, and for safety/cross-browser compatibility you really should stick with DOM Level 2 events as defined in the W3C DOM recommendation.

This is not a complete list of event possibilities, but it does give a starting point HTML Events

  • load
  • unload
  • abort
  • error
  • select
  • change
  • submit
  • reset
  • focus
  • blur
  • resize
  • scroll

DOM Mutation Events

  • DOMSubtreeModified
  • DOMNodeInserted
  • DOMNodeRemoved
  • DOMNodeRemovedFromDocument
  • DOMNodeInsertedIntoDocument
  • DOMAttrModified
  • DOMCharacterDataModified

User Interface Events

  • DOMFocusIn
  • DOMFocusOut
  • DOMActivate

Mouse Events

  • click
  • mousedown
  • mouseup
  • mouseover
  • mousemove
  • mouseout

Keyboard Events (not sure if these are really events, or if they are just defined strings I need to tie to keyboard events such as change)

  • KEY_BACKSPACE
  • KEY_TAB
  • KEY_RETURN
  • KEY_ESC
  • KEY_LEFT
  • KEY_UP
  • KEY_RIGHT
  • KEY_DOWN
  • KEY_DELETE
  • KEY_HOME
  • KEY_END
  • KEY_PAGEUP
  • KEY_PAGEDOWN

Whether events get triggered is truly based on browser support. Testing is necessary to define the true characteristics of individual events from within a particular browser. Keeping functionality simple will allow for cross browser compatibility without any hacking.

Identification

Each Action Group object has an id property. To make things easier on me, let's just avoid the subject of wide open id names and keep things simple - no spaces, no special characters, and always keep the id property populated.

Order

Multiple Action Groups can be defined with the same ties and triggers. The Order is an integer property that defines the order in which things happen. Order is not necessarily sequential - you can leave open space between action groups for future expansion. Lower numbers are executed first. Negative numbers are allowed.

Function Sets

This is the real meat of the action groups - the functionality. These are not pointers to the actual functions themselves, but instead another nested layer of groupings tied together with qualification statements and ordered functionality.

Detail on Function Sets can be found by following the link.

Kallestad Development Framework Topics

Personal tools