Hi,

During the last few days we've starting some architecture changes on the
MVC framework in a branch (mvc_mappings). This branch has just been
merged back to trunk. 

So this is what Frontend developers need to know about this new step in
the MVC architecture evolution. Previously, the Model<->Controller
associations were defined in the View implementations. That was painful
because adding a new Frontend would potentially require to update the
code of these View implementations. Moreover it wasn't allowing flexible
definition of the UI (for instance I want to have a special View when
browsing the "audio" menu). This is also explained in ticket #748.

Now in trunk you'll find some mvc mappings config files (ex:
elisa/plugins/bad/poblenou_frontend/data/poblenou_mvc_mappings.conf). In
these files, for each model type created by the Elisa activities, you
need to define:

- the supported controllers (not used yet)
- the controller responsible to handle the model
- the supported views (not used yet)
- the view responsible to render the model

Then depending of your Backend/Frontend setup (see examples in
sample_config), you'll need define which mvc mappings config file(s) to
use. Example (from poblenou.conf):

[backend1]
activity = 'base:elisa_activity'
mvc_mappings = 'poblenou:data/poblenou_mvc_mappings.conf'
input_providers = ['input_good:lirc_input', 'input_bad:bluetooth_input']

the value of "mvc_mappings" option can be either a path relative to one
plugin (like in example above), or a path relative to the directory of
the elisa config file (handy when testing new mappings).

The "default_association" of View implementations is not used anymore
and its contents should be transfered to MVC mappings config files. That
has been done for the gtk, classic and poblenou frontends. 

Mickael, let us know if you have any issues to adapt your LCD frontend
to the new system!

More MVC changes will follow in the coming days, like dynamic switch of
controllers/views and fancy stuff like that :)

Philippe

Reply via email to