Model view controller

Back to outline

  • MVC Is popular object-orientated programming pattern.
  • Separates business logic from presentation logic.
  • Allows application logic to work with different interfaces.
  • Model - contains system information, links to the database.
  • View - manages interaction with the user (I/O).
  • Controller - the main processor of the system.

Existing Frameworks

Java JButton Example

  • Click JButton: the controller puts model in pressed state, which changes its outward appearance (view).
  • Pluggable look and feel.
  • Combines Controller and View into BasicButtonUI class.

References