Version 8 (modified by peko, 17 years ago) (diff) |
---|
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
- Old wiki can be useful.
- http://asteasolutions.net/mediawiki/index.php/Sophie-JR-MVC-Pattern Sophie-JR-MVC-Pattern
- http://asteasolutions.net/mediawiki/index.php/Sophie-JR-MVC-Refactoring Sophie-JR-MVC-Refactoring
- http://asteasolutions.net/mediawiki/index.php/Sophie-JR-MVC-Design Sophie-JR-MVC-Design
- http://asteasolutions.net/mediawiki/index.php/Veda-Design-Refactor2#MVC Veda-Design-Refactor2#MVC
Related
-
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.
- see http://en.wikipedia.org/wiki/Model-view-controller - MVC Pattern.
- see http://en.wikipedia.org/wiki/Singleton_pattern - Singleton Pattern.
- see http://en.wikipedia.org/wiki/Model-view-controller - MVC Pattern.
- 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 implement it.
- View will be automatically updated on model change.
- View will commit data to model on user intervention by the corresponding logic.
Implementation
MVC is based upon the MVC pattern. Our Model consists of Apps with Books with Pages with Frames. Frames have variation like TextFrames, ImageFrames and MediaFrames. Out View is the AppView, BookView, PageView and FrameView. FrameViews are devided in three - TextFrameView, ImageFrameView, MediaFrameView The Controller part is represented by the Logics. We have AppLogic, BookLogic, PageLogic and FrameLogic. While one can create instances of the model and view (Books, Pages, Frames, AppViews, BookViews, PageViews etc.), the Logics are singletons.
Testing
Log
- Analyzing : Pap - done(30 min)
- Refactor : Tanya - 40 min
- Designing : Peko 1.5 h
- Implementing : Peko 1.5h
- Testing :
- FAILED