Philippe Normand | 6 Nov 2007 19:07

First flow of changes in the MVC architecture

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'
(Continue reading)


Gmane