KastroNYC wrote:
The MVP pattern can also be used in a WinForms environment and yes, Fowler has moved it to two separate patterns, Passive View and Supervising Controller.
As he always does...
When I mention testing the UI without the UI i meant so using TDD as in using NUnit and Rhino Mocks. You can create a PresenterTest test class and actually ensure that the generic functionality of your UI is intact as in Properties change when expected, events are raised etc. Of course you cannot truly test some things such as ViewState in an asp.net application and this pattern does add complexity and does not play nice with databinding controls either so I do understand why it may not interest you to create these templates.
Ah I see. I didn't have any intention to create the templates that way, so if I want to do it that way, I think I have to re-architect some parts of the templates. Now, I focussed on re-using code, so grouped functionality into controls which in turn used the datasourcecontrols a lot to minimize the code to generate.
Also is there any chance of having some Manager Templates which ARE instance classes rather than a grouping of static methods?
You mean more around aggregators/repositories? (DDD - Evans)
I guess my lack of Template Studio knowledge is holding me back from making some of these on my own. Any tutorials in the works?
There's a small tutorial in the manual, but it's pretty small, however that's all there is to learn really. It takes a couple of steps:
1) create your templatebindings or alter an existing one
2) edit the template file from one of the templatebindings files
and then you enter the environment of either .lpt templates or TDL templates. I'd go for .lpt templates as these are the most flexible. A key thing to use is the project inspector in the templatestudio ide, together with the reference manual in the SDK. With these, you can browse your complete project's object model in the project, and with the ref. manual you understand what these elements mean. Then, in the template you simply write code to read the data in these objects and control the output, like with the good ol' ASP 3.0 code in the early days.