Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Include Page
sneak peek warning
sneak peek warning
{div:class=floatRight} {panel:title= On This Page| borderStyle=solid| borderColor=#ccc| bgColor=#fff} {toc:minLevel=2|maxLevel=5} {panel} {div}
Wiki Markup
Div
classfloatRight
Panel
borderColor#ccc
bgColor#fff
borderStylesolid
titleOn This Page
Table of Contents
maxLevel5
minLevel2

Overview

The core of the Infusion IoC is the ability for a function call to resolve differently in a particular context. One way of thinking of this resolution is in terms of Aspect-Oriented Programming - the matching of the context specification could be seen as a kind of joinpoint, and the transformation of the original caller's function call, to resolve as the execution of a different function call, as a form of advice. One can set up configuration for this resolution by making calls to the function fluid.demands(), which accepts three parameters:

...

It is important not to play "tricks" with demands blocks. That is, they should not be combined with any code whatsoever - that is, they should not be invoked from inside functions (except the global closure used to guard the scope of a file), they should not contain function calls or variable references from the Javascript language, but should be written exactly as they appear here - with three, literal concrete arguments taken from the JSON dialect of JavaScript. This is essential in order to enable interpretation of the structure of demands blocks throughout an file or entire application by development support tools (which are currently yet to be written). Demands blocks should never be "conditionally included" - except through either including or not including the files in which they appear into an application or web page. They should be properly scoped to appear in the same files as the components and functions they refer to - that is, they should not violate dependency rules by appearing in unrelated files.
Wiki Markup{html} <center style="font-size:1.4em"><b>TNT</b> - Try No Tricks!</center> {html}