Building a Winforms View

Topics: Web Client Software Factory
Jan 29, 2007 at 6:49 PM
Hi all,

I'd like to reuse my service layer in a winforms application. But I don't know how to set up the configuration, since now CompositeWeb does not apply. If I use the CreateNew attribute in a winforms app the code is never called:

public ManageAdminFoldersPresenter Presenter
return _presenter;
_presenter = value;
_presenter.View = this;

Any ideas?

Jan 29, 2007 at 7:01 PM
Check out CAB software factory or more specifically the Smart Client Software Factory (SCSF). That is more specifically designed for winforms.

I hope this help.

Jan 29, 2007 at 7:24 PM
Thanks. I did take a look at the Smart Client Framework. However it seems complicated and doesn't seem to use the same View Presenter model. I'm really just trying to build a simple utility in Winforms and was trying to avoid having to learn a whole new framework. There should be a simple way to set up the configuration so that ObjectBuilder knows to create my dependent objects.

Jan 29, 2007 at 8:35 PM
Yes, I will say this for me the SCSF is a difficult framework to get your head wrapped around. And thats the biggest problem, its not the technical aspect but the way you need to think about it. (At least for me.)

However, at a minimum you can still use the SCSF at its most basic level to just create a new module or view and then use the object builder block to create the instances.
Jan 29, 2007 at 8:53 PM
OK. Installing it now. Will give it a go.
Jan 29, 2007 at 8:56 PM
Hmmm. I get the error "Installed version of the GAX is incorrect or the GAX is not installed.

I've never heard of a GAX before!

I'm installing the June version of the SCSF from MSDN. I didn't find any download on codeplex/smartclient

Any ideas?
Jan 29, 2007 at 9:52 PM
You will have to install this first

Jan 30, 2007 at 11:25 AM
I think this is fairly important.
Surely one of the benifits of MVP is that only your
P is implementation specific.
I can see huge benifits in having this work a lot more smoothly or
maybe it would be indanger of falling into the UIP trap.

Sorry for calling you surely...

Jan 30, 2007 at 12:15 PM
I would say that the Presenter is implementation-agnostic, as is the Model and indeed the View's contract/definition.

It is the concrete implementation of a View that is tightly coupled to a presentation architecture.

What is your specific concern (re: your "working more smoothly" comment)? Is it that you cannot directly reuse classes between the SCSF and WCSF?

You can reuse the view definition, the "model" components, much of the presenter (although with a couple of tweaks) and much of the controller... obviously though much of this will need to be copy-and-paste rather than assembly/type level reuse. Perhaps guidance on this subject is an area that would be appreciated in future releases?

If so you could create an issue for us to vote on...