What's the purpose for a controller class?

Feb 19, 2009 at 1:43 AM
I created a sample with WCSF. But I don't know what's the purpose of a controller class, and what should the class contain?
Feb 19, 2009 at 12:43 PM


Some time ago, I answered a similar question about controllers in the following thread:

·         Why do you need a controller?


Below, I copied an abstract of it. Perhaps, you may want to read the entire thread to find more information and useful links:

“[…] The controller “layer” is not always necessary and, if you want, you can write all the code in presenter classes. The controllers are used as a common place to define shared functionality/methods between your presenters to avoid code duplication. Additionally, controllers are useful to manage and centralize the page flow and screen navigation logic. If you have the page flow logic and screen navigation implemented in views’ code-behind and/or presenters , you must change the source code of all the views/presenters to change the page flow. […]”


Please, let me know if this helps.


Ezequiel Sculli