Versions Compared

Key

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

...

Imagine you had a department list view defined in the repository as a reusable part:Image Removed

Image Added

Imagine that it publishes a property named uCurrentDept (which tells you the department code currently selected) and it signals an event named uDeptChanged (which tells you that a department selection has been made).
Imagine that in all other respects it looks after itself. It loads the list, handles the selection and deselection logic etc.
To you, a user of this reusable part, it is simply a black box (in other words an encapsulation) that creates a list of departments on your form, tells you when a department is selected (via the uDeptChanged event) and lets you query what the department code of the currently selected department is (via the uCurrentDep property).  
Wouldn't this making designing and coding any application that needed to present a list of departments to the user much quicker, easier, more consistent and easier to maintain?
Finally imagine you have a large library of reusable parts and can assemble many of the things on your forms simply by drawing together pre-assembled and pre-tested components (reusable parts). The only code you need to write is to "glue" the reusable parts together in a logical manner.
&<img src="../resources/images/opentoc-dark.png" title="Open Contents List" border="0"&>