I subscribe to Martin's MVP pattern. If you are new to it, please have a read. It's a variation of Model-view-controller that puts more behavior in the controller and less in the view. I have tended to vary the amount of logic that belongs in the view depending on the scenario. Martin has split the pattern into two: one part leans toward balancing the logic and putting UI-specific behavior in the view and application behavior in the controller. Read it here. The other seeks to make the view as thin as possible and renders the view very passive. In this case, the controller has every bit of behavior, including setting every single field. Read it here.
I'm glad he made the split because it really is two different ways to do it. I tend to throw a domain object at the view and say "here, show this", whereas PassiveView would say to set each field individually and not to let the view know about the domain object. In Supervising controller (which I favor), the view can know about the domain object and how to bind it to it's GUI elements.
As with all patterns, they have advantages and drawbacks. The worst thing we can do is be dogmatic about one and declare its applicability to all scenarios. I've used Supervising Controller in ASP.NET and WinForms, and I like the way it separates behavior from visual goo. I also like how it pulls behavior into a class that's easily tested.
Can you give a (or spend a blog post on it) small sample about how you use the Supervisoing COntroler in asp.net?
Thanks
Marco
Hi Jeff
First I came to Know MVP from your architecture post and wrote the
following post
http://vikasnetdev.blogspot.com/2006/07/soa-friendly-architecture-version-of.html
http://vikasnetdev.blogspot.com/2006/07/soa-friendly-architecture-version-of_25.html
Feel free to criticize it.
Recently we had discussion on asp.net why MVC is so confusing.
http://vikasnetdev.blogspot.com/2006/08/is-3-layered-architecture-mvc.html