Project Description
Play chess against yourself in WinForms or WPF: A demonstration of Strict MVC architecture.


DotChess is a pair of applications that are an exercise intended to:

1. Serve as a demonstration for the Strict Model-View-Controller architectural pattern.
2. Model the game of chess as a demonstration of object oriented design.

What DotChess is not:

- It is not intended to be used to play chess competitively. You can't play against the computer and you can't play over a network (although network play could easily be added).
- It is NOT a demonstration of amazing GUI graphics. This project was not intended to compete with games such as Microsoft's Chess Titans and I do not anticipate spending the time that would require.


DotChess ultimately consists of two installers: One installs a WinForms version of DotChess and the other installs a WPF version. The codebase has been factored so that any commonality between the two programs is programmed only once. That is where Strict MVC architecture comes in.

Strict MVC architecture

Strict MVC is a variation of the popular MVC architectural design pattern that has been around since the early days of Smalltalk. This pattern establishes a separation of concerns. It consists of:
  • Model (M): The application domain that is is updated by the controller.
  • View (V): The presentation interface which processes domain changes and shows them on the user interface.
  • Controller (C): The visible controls and user input. Each GUI has its own view.

The Strict MVC variation of MVC introduces one more concern:
  • Model base: A read-only subset of the domain that is accessed by the view.

The C# language provides the constructs necessary to implement such a pattern. The model base provides accessors along with events that will notify the view when it needs to be updated while denying any attempt by the controller to update the model. The controller provides its user interface to the view for updating while hiding its own knowledge of the model. The model provides an API to the application domain while hiding the model base's indirect knowledge of the view.

Below is the class diagram of the WinForms version of DotChess. The model consists of ChessModel with its base ChessModelBase. The view is named ChessView. The controller is named ChessController.


Last edited Jan 9, 2013 at 4:50 PM by KaseWick, version 12