Tutorial Review

This tutorial gives you an overview of how to create a customized component using a Knockout Component Factory.

The main purpose of this tutorial is that using this pattern, you can create any custom component by just updating the SampleComponentViewModel and sampleComponentTemplate JavaScript objects. The sampleComponentFactory and SampleComponentImpl objects haven't changed as you went through the tutorial. You were able to implement these changes without having to deal with communicating with the page, and were able to perform these tasks:

  • Communicate changes from your Settings panel to your component, and have those changes persisted.

  • Execute triggers and actions, and interact with other components on the page.

  • Create layouts and leverage nested components.

  • Define component-specific styles.

While this example split out the custom component into a number of files, this was for clarity of the tutorial. For optimization, you should consider appropriately packaging your files to avoid multiple downloads.

Finally, while this tutorial is suitable for Knockout based components, if you want to create custom components using another JavaScript technology stack such as AngularJS, you must re-implement the SampleComponentImpl object to create the corresponding communication with that framework along with a technology specific implementation of the actual component. This work is beyond the scope of this tutorial.