Abdelrazak Younes wrote:
> Andre Poenitz wrote:
>> On Thu, Sep 07, 2006 at 09:39:13AM +0200, Abdelrazak Younes wrote:
>>>> Shouldn't there be a lyxkernel.dll and the frontend  using this?
>>> The frontend virtual interface yes. The qt4 frontend will just be an
>>> implementation of this interface and could entirely be in a single
>>> dll. This way the lyx-executable would not even have to link to Qt4,
>>> only the qt4 frontend dll.
>>
>> I am not sure there needs to be a virtual frontend interface at all.
> 
> If we want to support multiple frontends with a seemingly consistent
> behaviour, I'm afraid that's the only way to go for now. Besides, the
> virtual interface is accompanied with methods that allow to encapsulate
> code that should be common to all frontends (WorkArea, Clipboard).
> 

Yes, we need a virtual frontend interface to support multiple toolkits,
but the virtual functions are not needed by the kernel, it doesn't know
the frontend (in a mvc design).

>>
>> In theory, ther kernel could be completely ignorant of any frontend and
>> just signal internal changes.
> 
> In theory yes ;-) At least we should head to this behaviour.
> 
> 
>>
>> A frontend would directly call into the kernel to make things happen and
>> adjust afterwards by listening to the signals.
>>
>> IMO a common frontend base is a design mistake that puts things downside
>> up: The kernel tells the frontend to draw and listen to events from the
>> frontend. No good.
> 
> FWIW, I agree on the principle. In practice, I see this virtual
> interface as a temporary measure to clean up the code progressively.
> During my cleanup activities I deleted a lot of virtual interfaces
> because they were not needed any more. At the end, the virtual interface
> would just be a mean to have consistent behaviour across frontends and
> to share code. It's also a nice way to separate real GUI programming (as
> in model and view) and controllers.
> 
> Abdel.
> 
> 


-- 
Peter Kümmel

Reply via email to