Abdelrazak Younes wrote:
> On 02/03/2010 12:17 PM, Peter Kümmel wrote:
>> Peter Kümmel wrote:
>>    
>>> Originally it was the Model-View-Controller pattern, so isn't a
>>> controller the perfect candidate for the central dispatcher?
>>>
>>>      
> 
> If we proceed as I suggested then that would be the result indeed:
> 
> model: everything in src/, src/inset/ and src/math/

Here I would move model relevant code from src to src/model,
then the binary would become a smaller project which onlx
links to the essential parts.

I would also introduce shared libraries which help to avoild
circular dependencies between the libraries, especially when building
Dlls on Windows, but maybe there is also a GCC flag to forbid such
dependencies .

> 
> view: all the different dialogs, including GuiView
> 
> controller: GuiApp mainly, but also GuiView::dispatch(), as well Dialog, 
> GuiDialog and DialogView classes.

I would not distribute the controller functionality to several classes.

> 
>> Wouldn't it be best to completely unlink the model and view like in
>> attached image, found as figue 4-6 in
>> http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/CocoaDesignPatterns.html
>>    
> 
> At this point, this is becoming academic. What is especially important 
> is that the model is free of any GUI code. Then we can always cleanup 
> progressively the source code to have clearer separation between the 
> views and the controllers, but that is of lesser importance.

Having several views (GUI/non-GUI) it is better to also send model's
notifications through the controller.

> 
> Abdel
> 

Reply via email to