Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

CIF initial processing

  • start the initial processing after the crcReady event is fired
    • process the cubbles in root and create child component elements. (Details of processing components are presented in the next section.)
  • after all pending tags are created in component trees and all of them are ready, the cifAllComponentsReady event is fired
  • start the pocessing after all components are ready
    • create all connection tags
    • parse the connection tags and register the connections in the relevant context
    • create the slot init tags
    • fire the cifInitStart event
      • parse,
      • sort and
      • process the init tags
    • fire the cifInitReady event
    • if this process is called from initial processing: create mutation summary observer

Drawio
baseUrlhttps://cubbles.atlassian.net/wiki
diagramNameCIF_process
width2596
pageId19306966
height1274.362323835228
revision6



Process components

The processing of components is shown using an example, and is composed by the steps presented below:

  • process Elementary1
    • create some required attributes, check correct runtimeId, etc.

      Info
      titleHint

      By processing existing elements: Some required attributes will be created  and  some existing attribute values will be checked and adjusted.


  • process Compound1
    • create some required attributes, check correct runtimeId, etc.
    • register that pending components for Compound1 exist
    • create and attach subelment Elementary2
    • create and attach subelement Compound2
    • register that no pending component for Compound1 exists anymore
    • fire componentReady event
  • process Compound2
    • create some required attributes, check correct runtimeId etc.
    • register that pending components for Compound2  exist
    • create and attach sublelement Elementary3
    • create and attach subelementElementary4
    • register that no pending component for Compound2 exists anymore
    • fire componentReady event

Each of the components Elementary1, Elementary2Elementary3 and Elementary4 fires the componenReady event. The cif registers all components first as unready. After the components fired the  componentReady event, the register will changed to ready.  The cif registers the pending elements (not yet created subelements) for each component too. If all components are ready and no pending components exists anymore, the cifAllComponentsReady event will be fired. 


Info
titleHints

The member elements will created be in the order in which they appear in members definition in manifest; or if a template exists members will be imported and processed in the order in which they were included within the template.





Example of processing components in CIF

Anchor
components-processing-example
components-processing-example

Component structure

The following example included

  • a component tree with 3 levels
  • 2 nested compound

Drawio
baseUrlhttps://cubbles.atlassian.net/wiki
diagramNameexample
width777
pageId19306966
height341
revision1

Processing components

Drawio
baseUrlhttps://cubbles.atlassian.net/wiki
diagramNamecif_component_process
width1486.5
pageId19306966
height1216.126901781541
revision2