The Framework Bootstrap

Traditionally SmartComponent Library based applications have used startup procedures to initialize the framework environment and settings before starting the startup form.  While we cannot completely avoid the usage of a startup procedure (it’s the only way to launch an ABL client application using the –p parameter) there are three major drawbacks:

  1. Duplication of initialization code in every startup procedure
  2. Might require changes to the startup procedures of Consultingwerk tools like the Business Entity Tester or Business Entity Designer
  3. Framework initialization not executed when forms are started directly from the OpenEdge Architect/Progress Developer Studio for OpenEdge Visual Designer

For these reasons we have implement the framework bootstrap as a process to initialize the framework environment and settings outside and independent from code executed in the startup procedure.

Note: As the framework bootstrap relies on the JsonParser in the ABL, the process is only supported from OpenEdge 11 on. Customers requiring this feature on OpenEdge 10.2B should file an enhancement request with us.

Using the framework bootstrap

The framework bootstrap consists of two parts: The first part is a service implementing the Interface Consultingwerk.Framework.IFrameworkBootstrap. This service interface is by default implemented using the class Consultingwerk.Framework.FrameworkBootstrap. Customers should usually be o.k. with using the service implementation delivered by Consultingwerk. Customers may use an alternative implementation of the IFrameworkBootstrap interface by registering it in the default SerivceContainer before starting the first form (which usually would require code in the startup procedure).
In the constructor of the first launched SmartWindowForm derived form the IFrameworkBootstrap verifies if the bootstrap has already initialized the framework. If this is not the case, then the bootstrap will initialize the framework one time only.

Using the framework loader

The Consultingwerk FrameworkBootstrap implementation uses a Configuration Provider based on the .applicationsettings file. This JSON File should have an entry called frameworkLoader.
Using this setting, customers may register their own class implementing the Consultingwerk.Framework.IFrameworkLoader interface.

The bootstrap process will start an instance of this class and call the Initialize method enforced by the IFrameworkLoader) interface. The bootstrap will also pass the instance of the Configuration Provider created from the .applicationsettings file to initialize the method of the framework loader class.