A WorkItem is a run-time container for components that are working together to fulfill a use case. These components may consist of SmartParts, controllers, services, UIElements, views, controllers, and other components. Applications built using a consistent set of patterns. One of the default patterns is the Model-View-Controller (MVC) pattern.
These types of applications generally consist of:
- Initialization code.
- State shared between components in the use case.
- Controller classes that act on the state and other resources.
- View classes that interact with their controller and read state.
- Disposal code.
By default, the WorkItem class provides a Run method that causes the protected and virtual OnRunStarted method to execute, and fires the RunStarted event.
When activating a SmartPart in a WorkItem, that WorkItem is automatically activated and any other WorkItem that was previously active is deactivated.
A WorkItem has a State property, which enables all the components in that WorkItem to access shared state.
You can iterate through that WorkItem instance to find components that you need.
A WorkItem extension allows you to write code that will run during the crucial events of WorkItem life cycle.
No comments:
Post a Comment