Shoul we have local variables to store workspaces?

Topics: CAB & Smart Client Software Factory
Aug 4, 2006 at 5:40 PM
originally posted by: kgreed

I notice that the bankteller sample application creates local variables for workspaces and passes them as parameters

I find it easier to think of there being a workspace collection out there available to grab any time and to write code like the following


Can anyone tell me if there is a disadvantage to doing this?
Aug 4, 2006 at 10:00 PM
originally posted by: askew

No disadvantage, in my opinion.

The SCSF reference implementations both use your described style.

Workspaces are very flexible. You can nest them on themselves, and Views can embed them. They certainly can be used as parameters or be more statically used.

The CAB example BankTeller seems to use a more fine-grained use-case or task approach with WorkItems than the SCSF BankBranchWorkbench example. The CAB BankTeller approach lets WorkItems manage Workspaces as local variables and parameters for methods. The SCSF approach seems to have Workspaces statically defined and laid out.

Workspaces can be dynamically created, but there's nothing wrong with having them all be statically defined.

There is so much to learn.