On Thursday, 16 August 2012 at 16:25:01 UTC, R Grocott wrote:
All of these are relatively minor issues, but taken together,
they make library development quite difficult. For example, I
think it would be almost impossible to develop a COM GUI
toolkit.
And yet that is what DirectX and WinRT are all about.
When you use programming models like COM, you are programming
against interfaces, this is also know as component model
programming
in the CS papers.
Your GUI toolkit just needs to expose interfaces for the different
types of events it is required to handle, and you give via API
calls
objects whose instances implement said interfaces.
To avoid too much code rewrite, some component systems, COM
included,
support a form of delegation where you can implement just a part
of the
interface, while delegating the remaining calls to a contained
object.
--
Paulo