User Tools

Site Tools


dynamic-loading

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
dynamic-loading [2018/02/09 04:45]
barryfp Adding search tutorial
dynamic-loading [2018/02/09 04:49]
barryfp
Line 188: Line 188:
 </​code>​ </​code>​
  
-Our helper function uses a feature of Dana's compiled component file format, in which we store meta data in "​information sections"​ of the file. Dana uses a standard information section named "​DNIL"​ which lists the interfaces that are both provided and required by the component, represented in a JSON structure. Interfaces in this structure have a "​package"​ and an "​alias"​ along with structured type information; the package is the full path to the interface, while the alias is the name by which we can dynamically query the interface on the component. Internally, Dana does not care whether the package or alias of a required and provided interface match upinstead only checking ​that the two interface types are structurally compatible.+Our helper function uses a feature of Dana's compiled component file format, in which we store meta data in "​information sections"​ of the file. Dana uses a standard information section named "​DNIL"​ which lists the interfaces that are both provided and required by the component, represented in a JSON structure. Interfaces in this structure have a "​package"​ and an "​alias"​ along with structured type information. The //package// is the full path to the interface, while the //alias// is the name by which we can dynamically query the interface on the component. Internally, ​note that Dana does not care whether the package or alias of a required and provided interface match up in order to be able to connect them together; ​instead ​Dana only checks ​that the two interface types are structurally compatible.
  
 In the main method, the array ''​results''​ now contains a list of relative file paths to components that implement each required interface, searching both locally and in the standard library. You can also use the ''​composition.Search''​ API to search in specific directories. In the main method, the array ''​results''​ now contains a list of relative file paths to components that implement each required interface, searching both locally and in the standard library. You can also use the ''​composition.Search''​ API to search in specific directories.
dynamic-loading.txt ยท Last modified: 2019/07/24 13:17 by barryfp