[Mono-list] Native Mono UI widgets

Jonathan Pryor jonpryor at vt.edu
Wed Jul 11 14:17:11 EDT 2007

On Wed, 2007-07-11 at 13:21 -0400, Ernesto Bascon wrote:
> Having a Mono specific UI library, maybe built on top of the current
> implementation of SWF but feeling free to implement new things [not
> necessarily compatible with Microsoft's SWF implementation] could add
> a lot of value and richness to the Mono library [theming, KDE and
> Gnome interoperability, etc.]
> Yes, I know that it is like reinvent the wheel, but also means turning
> Mono in a more independent (and thus, complete) platform.

Independent != Complete.

Stop thinking about things from the developer perspective, and think
about them from the User perspective for a moment.

What do you want as a user?


You want all your apps to look similar, behave similarly, *be* similar.

For instance, on OS X all apps should use the top menu bar, should
properly consume and expose system services (Application Name ->
Services, iirc), use the system's appropriate contacts, email, web
backends, etc.

The same is true for KDE, Gnome, Windows, and every other platform.

In theory, you can provide this level of integration with any new
toolkit you dream of.

In practice, it's a *lot* of work to do this level of integration.

So much work that cross-platform toolkits (Qt, GTK+, etc.) will delegate
some things to the native platform whenever possible (e.g. instead of
custom-drawing a button, asking the OS to custom-draw the button on the
app's behalf).

(Aside: as an example, previous Java Swing implementations did custom
drawing for *everything*.  Result: non-native File selection dialog on
Windows, applications that wouldn't resize "live" (it would instead
redraw when you released the mouse when resizing the app), buttons that
wouldn't match your current theme....  Newer versions do more delegate
to Windows now, precisely for Integration.)

So go ahead and create your new toolkit.  Just be prepared to do *lots*
of work trying to integrate nicely with all of the existing platforms,
OR in never gaining users by ignoring these integration requests.  (And
realize that this will be an ongoing process, as OS X, Gnome, KDE, and
Windows are *constantly* adding new functionality.)

It's far easier to NOT create new toolkits at this point, and re-use an
existing toolkit.  Your users will thank you.

(For bonus points, support *multiple* toolkits within your app, so that
your app looks native on all platforms.  More work, but potentially
worthwhile for your user base.)

 - Jon

More information about the Mono-list mailing list