Wednesday, December 5, 2018

Without contract / with contract in components

1) Masters 1.0 (Now deprecated)
  • No controllers
2) Components without contract
  • Always has controller
  • Instances always show complete widget hierarchy as in source
  • No custom events
  • All properties can be overwritten in instance
3) Components with contract
  • Always has controller
  • Instance doesn't show any hierarchy (unless explicitly exposed)
  • Custom events
  • Control over what properties can be overwritten in instance (by making them pass-through)

So if you want to build you own calculator component and expose selected custom events for any user, you should choose components with contract.

1 comment: