MVC for MP's GUI? (1 Viewer)

niekh

Portal Member
October 19, 2004
17
0
Hi everyone!

Disclaimer: Firstly I must confess that I haven't read a single line of MP's source code so forgive me if this proves to be a moot point.

I've been thinking about adding an LCD and some accompanying navigational buttons to my HTPC. Having read the LCD thread it seems like implementing support for LCDs (and other devices) isn't quite straightforward.

Then a thought popped up! Have you, the developers of MP, considered using the Model-View-Controller (MVC) design pattern for MP's GUI? Using MVC would facilitate implementing support for several input devices and output devices. An output device can be provided with one default view and several, possibly user defined, alternative views.

Examples of input devices:
- Keyboard
- Remote control
- (case) Buttons

Examples of output devices:
- Screen
- LCD
- LEDs

An Excel spreadsheet for example has underlying data (the model) and several views (editing grid, bar graphs etc.). Updates made to the underlying data is automatically reflected in all open views. I'm not saying that Excel implements MVC (have no clue really!) but the principle is the same.

It is my belief that implementing MVC would ease the tasks of implementing new input/output devices as well as enabling user customization of MP's GUI.

For a primer on MVC visit http://ootips.org/mvc-pattern.html.

Regards,
Nils.
 

Frodo

Retired Team Member
  • Premium Supporter
  • April 22, 2004
    1,518
    121
    51
    The Netherlands
    Home Country
    Netherlands Netherlands
    MVC is nice if you have a single model (data) and want multiple views on that data
    like your example with the excel sheet
    However MP does NOT have a single data model

    Frodo
     

    Users who are viewing this thread

    Top Bottom