Observations and Questions

Topics: CAB & Smart Client Software Factory
Aug 11, 2005 at 4:35 AM
originally posted by: JGlynn

General observations and a couple of questions:

1. There seems to be a lack of exception handling. I keep getting invocation exceptions bubbling all the way back up to Application.Run. These are totally meaningless exceptions. CAB should be catching these exceptions, adding some relevent information and then tossing them back up. At present I can't hardly tell where the exception occured.
2. State seems very inconsistent. Use the attribute to get the initial reference, but then you're on your own. Doesn't feel right. Not sure what the answer is here, but it feels like it's half baked.
3. Getting references in the controller classes is difficult. The view has a reference to the controller class through the use of the Controller attribute, but the controller does not have a reference to the view.
4. The Workitem doesn't seem to have an easy way to get the reference to the controller as well. In this cas the controller has easy reference to the Workitem, but where does the workitem get a reference to the controller?

Because of items 3 and 4, the controller class has been rendered virtually useless. The only thing that it is really capable of at the moment is to broker some events back up the food chain. To me it seems more natural to have the controller created first and it then creates the view. This way the controller can manage how the view is instantiated and it would be easy to have a reference to the controller in both the view and the workitem. Currently the role of controller is greatly reduced. The natural thing to do is put more of the logic in the Workitem. The controller doesn't really control the view, the Workitem does.

At the CAB session in Redmond a couple of weeks ago the one thing that kept coming back up is that this may change or that is still being worked on etc etc. It is getting very close to release of .NET 2.0. At what point does the CAB group feel that they will be feature complete. If I am going to use the CAB on a large scale application, I need to know what the API is going to look like. I've been told several times tha the Command process is goint to change. Change to what? What is the timeline? Having early looks at stuff is great, but at what point are you going to nail down the features and API?
Aug 30, 2005 at 1:37 PM
originally posted by: ChrisHolmes

"The Workitem doesn't seem to have an easy way to get the reference to the controller as well. In this cas the controller has easy reference to the Workitem, but where does the workitem get a reference to the controller?"

In MVC, the model (workitem) should never have a reference to the controller. It doesn't need to know anything about the controller.


"The controller doesn't really control the view, the Workitem does."

That is another aspect of MVC (http://www.c-sharpcorner.com/Code/2003/Feb/MVCDesign.asp).

Personally, I don't like that part. To me, it seems like a coupling between the model and view that shouldn't be there. I tend to view MVC more like the Gang of Four's Mediator pattern. The Controller being the Mediator, thus completely decoupling the View from the Model. But...
Aug 30, 2005 at 1:59 PM
originally posted by: dcazzulino

It may help to think of the WorkItem as the application controller for a particular use case instead. It's certainly not the model in MVC, a role played by the State in the WorkItem.
Aug 31, 2005 at 12:15 AM
originally posted by: primozs

invocation exceptions,
look in inner exceptions
Primoz
Aug 31, 2005 at 6:42 AM
originally posted by: JGlynn

"In MVC, the model (workitem) should never have a reference to the controller. It doesn't need to know anything about the controller"

But in CAB the Workitem is NOT the model. State in the Workitem is the model. I may be way off base, but it appears to me that there are 2 controllers, the workitem and the controller. If you look, they both serve the same purpose, the workitem at a higher level perhaps, but the same purpose.

I see a benefit to having workitem and controller, but there should be an easy way for the 2 to work together without having to rely on events etc.
Aug 31, 2005 at 6:43 AM
originally posted by: JGlynn

"invocation exceptions,
look in inner exceptions "

Most of the time it is either null or contains the same message.
Sep 3, 2005 at 8:44 AM
originally posted by: eugeniop

Our main focus since the last CTP is usability, simplicity and overall improvement the development experience.

The CTP 2 planned for September 23rd. will stabilize the final API. THere might be still some changes, but we don't expect any very significant till RTW (on November).

CAB CTP2 will also be based on .NET 2.0 August CTP, something that was frequently mentioned (and requested).

That should give you a decent starting point for your app. Feel free to drop me an e-mail if you have further questions (eugeniop @ microsoft.com).

Thanks!