13. Refactoring to a Controller
The last step in the reengineering journey is to refactor the forms in our application that have business logic buried inside them to either a controller or view pair or a ViewModel and View pair. The process is similar, so we are going to assume you are refactoring to use the Model-View-Controller architecture and call everything a controller.
Note
We assume MVC instead of MVVM to avoid the binding process that goes along with MVVM- and WPF -based applications. The binding engine in WPF-based applications is powerful and hides a lot of the plumbing that is necessary to connect a view and view model. In day-to-day development, this is advantageous, but when trying to demonstrate how to refactor for a controller ...
Get Reengineering .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.