wiki:CORE_MVC_BASE_R0
Last modified 13 years ago Last modified on 01/23/09 11:13:08

Analysis

Overview

  • The Model-View-Controller(MVC) pattern will be used in the development process of Sophie 2. All the necessary rules about MVC in the development process should be defined.

Task requirements

  • The document should provide:
    • General rules about MVC.
    • List of the base classes needed.(class diagrams can be made)
    • Docs and tutorials about implementing MVC (especially in Sophie 2).
    • Rules to check whether the code complies to the pattern.

Task Result

  • The result of this task should be a wiki page where all of the rules are written.

Implementation idea

-

How to demo

  • Open the wiki page where the rules are written (it can be called "CORE_MVC_BASE" for example).
  • Look if all of the analysis points are took into consideration.
  • Make sure that nothing important is dropped.

Design

  • Be sure you understand MVC and Singleton. Since these will be the patterns used for the base design and implementation of the MVC.
  • Model and View - represented by App, Book, Page, Frame, TextFrame, ImageFrame, MediaFrame, AppView, BookView, PageView, FrameView, ImageFrameView, TextFrameView and MediaFrameView.
  • Logic - singleton (instantiated the first time it is called.)
  • This is sensible because:
    • We need to have multiple books with pages and frames as well as multiple views to display the model.
    • We need to control the model by the view. This means that the Controller must have only functions implemented and called. It SHOULD NOT HAVE STATE. That is why singleton pattern will be used to instantiate it.
  • View will be automatically updated on model change.
  • View will commit data to model on user intervention by the corresponding logic.

Implementation

The implementation is based upon the requirements. List of the base classes and their class diagrams are added. We don't need rules to implement the MVC since it is relatively simple at this point. Though rules about its usage will be provided.

CORE_MVC_BASE

Testing

Log

  • Analyzing : Pap - done(30 min)
    • Refactor : Tanya - 40 min
  • Designing : Peko 1.5 h
  • Implementing : Peko 1.5h
  • Testing :
  • FAILED