Lambda Template is a revolutionary idea. It brings ultimate flexibility and user-friendlyness to Visual Lambda.
In QWFIX, Visual Lambda is used everywhere, message validation and transformation, query filter, gateway route calculation and GUI display string customization.
Visual Lambda is also so programmer friendly that new applications for Visual Lambda can be implemented on demand in hours.
Applying Lambda Template is simple. QWFIX provides uniform graphic user interface for Visual Lambda operations. When choose a Visual Lambda module, if the module contains any template, the list of templates will be displayed so that user can customize their own template values.
For example, user can add a "New Order Handler" to the FIX Order Manager Visual Lambda rules in the "Order Manager Settings Editor" in "FIX Engine Editor". A uniform GUI interface with all qualified Visual Lambda modules will be displayed. Users can choose the module they want.
If the module contains Lambda Template, the template will be listed in the lower panel and users are required to specify the values for the lambda templates, as demonstrated below.
When adding the Lambda Template, user can specify an additional parameter called "Template Class", in addition to the template name.
Template Classes are pre-defined names that specify the type of the parameter. Once the TemplateClass of a template is defined, a special GUI will be used to further facilitate the customization and validation of the value.
For example, in the default repository, we defined a modyule to handle dynamic routing calculation in QWFIX Order Gateway. The module can re-route all message flows originally to destination A to new destination B.
In the module, we use Lambda Template to represent those two destinations, the "OrigSession" and "NewSession", as shown below.
When defines the Lambda Template, we assign a "TemplateClass" of "Session".
When applying the Lambda rule, the uniform module chooser GUI will pop up. User is required to supply values for both "OrigSession" and "NewSession".
Because the template has a "Template Class", user can no longer directly input the constant value in the lower panel. In stead, every time user highlights a template item, a button will show up, as shown below. User must click the button to choose the value.
Once the button is clicked, a "FIXSession Chooser" dialog will pop up for user to choose the session.
Currently Defined Template Classes
Below is the list of currently defined template classes:
More template classes may be added in the future.
Even though we have made Visual Lambda very user friendly, some people may still find it hard to grasp. Lambda Template greatly extended the flexibility of Visual Lambda. Programmers can use Lambda Template to build customizable modules that define day-to-day operations. Ordinary users only need to use those modules with uniform GUI. All they need to do is to fill in the custom values of the templates.
Visual Lambda modules are dynamically compiled into machine code before they are executed. The template values will be substituted into constants during compilation. No performance is sacrificed whatsoever.