FEF Facade

The FEF Facade is the main code point for application development on the Front End Framework. All work to be done in the behavior.js files of your Fef application that inject behavior into the Fef UI cycle, manipulates remote data, customizes core-components, etc uses the Facade and its exposed methods. The file Facade.js, within the /fef/core/services folder, exposes the publicly accessible APIs.

Below, we describe the different exposed API's within the Facade that allow a Fef developer to apply business logic to their application

General and Layout
  • Facade.Components

    User interface element behaviors. A list of common core-components can be viewed here.

  • Facade.Constants

    Static values often used to define the range of modes or flag state values.

    For more information, go here
  • Facade.Filters

    Creating FilterConstraints for use on TransformListData and list components.

  • Facade.Globals

    Flavor specific values passed from the server, e.g. Type|Id, UserId, User.Locale, DataKey

  • Facade.MessageLog

    Captures request/response pairs, including message results.

  • Facade.Promises

    Represents the result of an asynchronous operation.

  • Facade.Prompts

    Labeled input captures used to 'prompt' the end user. Powers filter and search controls.

  • Facade.Prototypes

    Defines the FEF type/class system. All FEF elements define a prototype as their functional type. In other languages this is often called a 'class'. The prototype servers as the elements public contract.

    For more information, go here
  • Facade.RadioSets

    Creating custom radio-button sets; defines custom radio button values.

  • Facade.Sorting

    Defines the list of sort-field objects representing the path+sort-direction tuples for a named sort set.

Services and Utilities

Services and Utilities assist with common efforts often by providing reusable constructs to leverage up.

  • Facade.API

    The raw remote API service wrapper also used by the Resolver

  • Facade.Localization

    Localization and internationalization services

  • Facade.Resolver

    Data resolving service; handles remote calls when data is not local; normalizes (via promises) the gap between local and remote data.

    For more information, go here
  • Facade.UrlBuilder

    Assists with proper url and link assembly

  • Facade.Utils

    Various utilities to perform common operations.

Registries

Registries bind things by name for lookup of and usage or callback into at a later time. Registries are the basis of customization and extension by allowing programmatic manipulation of what is bound.

  • Facade.DataRegistry

    Registers data model instances, binds by application uniqueness identifier, usually, the type|id tuple (data)

    For more information, go here
  • Facade.DesignRegistry

    Registers type dictionary meta-information for each type in scope (meta-data)

    For more information, go here
  • Facade.FunctionRegistry

    Registers the behavior functions (behavior)

    For more information, go here
  • Facade.PageRegistry

    Registers the page templates (layout)

    For more information, go here
  • Facade.PicklistRegistry

    Registers the pick list data (meta-data)

  • Facade.TriggerRegistry

    Registers trigger callbacks (behavior)

    For more information, go here
Reading Source Code

*** Reading the source code is encouraged. ***

The best way to read this file is to start at the bottom where you see the "return" statement...

return {
$initialize: $initialize,

API: _API,
App: undefined, // see $initialize
Behaviors: _Behaviors,
Builders: _Builders,
Components: _Components,
Constants: _Constants,
DataRegistry: _DataRegistry,
DesignRegistry: _DesignRegistry,
Filters: _Filters,
FunctionRegistry: _FunctionRegistry,
Globals: $Globals,
Localization: _Localization,
MessageLog: _MessageLog,
PageRegistry: _PageRegistry,
PicklistRegistry: _PicklistRegistry,
Promises: _Promises,
Prompts: _Prompts,
Prototypes: _Prototypes,
Resolver: _Resolver,
RadioSets: _RadioSets,
Sorting: _Sorting,
TriggerRegistry: _TriggerRegistry,
Types: undefined, // see $initialize
UrlBuilder: _UrlBuilder,
Utils: _Utils,
VirtualFieldRegistry: _VirtualFieldRegistry
};

These are all accessed by Facade.X For example, Facade.Components.

In this return statement, you'll see values like _DataRegistry and _Prototypes on the right hand side. Search this page for these to get to the next level.

At the next level, you will find functions and accessors, but you might have to dig another level down as well.

Each accessor is found in another file. For example Facade.DataRegistry.register maps to $DataRegistry.set.

var _DataRegistry = {
get: $DataRegistry.get,
deregister: $DataRegistry.remove,
index: $DataRegistry.idx,
register: $DataRegistry.set
};

You can probably guess the file name by using dash notation. Here it is data-registry.js. This file can be found in /fef/core/registries/data-registry.js.

Once you're in the other file you can search for your accessor method (set in the above example). You can then see the method signature and possibly comments describing its use.

/**
* Store the given Data node with the given index.
*/
function set(index, node) {
...
Have Questions?

Have any questions? Ask a developer evangelist a question here. Your question will be forwarded directly to the Evangelism team at Infor Nexus and will be answered imminently. The answer to your question will be emailed to you, as well as possibly posted on the site as a reference for other AppXpress Developers.