A simple tic tac toe app, to illustrate the use of MVC, MVP, and MVVM architectures to organize the application.
Clone or download
Latest commit 2becea8 Mar 3, 2018

README.md

ticTacToe

A simple tic tac toe app, to illustrate the use of MVC, MVP, and MVVM architectures to organize the application.

The master branch contains just the model - The brains & state of the tic tac toe game.

Other branches contain the model, plus a User Interface following:

  • mvc - Is an example of using Model View Controller to model the UI / Model Interaction.
  • mvp - Example of Model View Presenter
  • mvvm - Example of Model View ViewModel with Databinding

Notes

  • This project is the companion project to a post I authored at https://academy.realm.io/posts/eric-maxwell-mvc-mvp-and-mvvm-on-android/.

  • It is intended to be a reference to show the concepts of MVC, MVVM, and MVP on Android.

  • This post and project was created before the GoogleIO 2017 announcment of Android ViewModels and the Android Architecture Components, which changes the way we think about ViewModels in the Android Lifecycle.

  • Finally, there are several additional things I would do to these example if I were releasing this Tic Tac Toe app to production, including providing a landscape UI and handling rotation, an app icon, more tests, etc. My goal in this project is to illustrate the concepts of MVC, MVP and MVVM in a simple consice manner.

I hope this project/post is useful to you! Thank you for reading.

Eric