Controllers and WorkItems

Topics: CAB & Smart Client Software Factory
Jun 29, 2005 at 7:48 PM
originally posted by: ptorrsmith

In the bankteller example, the bankTeller customerBrowseList click event is:
private void listCustomers_Click(object sender, EventArgs e)
{
CustomerReference c = (CustomerReference)listCustomers.SelectedItem;
-----> myController.WorkWithCustomer(c.ID);
}

which is the correct MVC behaviour, view user action event calls its controller to take action.

But then we have the controller simply calling a method on the workitem:
public void WorkWithCustomer(int customerID)
{
-----> workItem.WorkWithCustomer(customerID);
}

Is this because the controller "must" pass responsibility for creating new workitems back to the bankTellerWorkItem?

I guess I'm trying to define a pattern/guide as to where to place process logic, which in an MVC approach I thought normally resided in the controller.

Does the WorkItem act like a supercontroller (but is not called directly by view events, but only by controllers?)