From: Massimiliano Mirra Date: 2002-01-22T09:30:30+09:00 Subject: Re: RANT: Ruby GUI API On Tue, Jan 22, 2002 at 08:58:06AM +0900, Horacio L�pez wrote: > Too much wheel reinvention.... > Too much effort duplication... > > What you don't resolve at framework level, you have to do it > at application level. > In FreeRID we have picked the Fox toolkit *for now*, and we will have > to provide some abstraction layer that allows us to make the GUI an > interchangeable plug-in. I did exactly that with a small instant messaging system, a typing tutor tool, and with a minimal spread sheet. The first uses GTK, the second a basic curses wrap, the third the command line. They all keep the interface code in a separate file, and are designed so that one just has to require a different file to get a different interface. In a way, this is also about writing an abstraction layer, but you do it on a per-program basis, and then implement the interface based on that layer. (None of this code is distributed yet, but I'd gladly share it.) Another idea. What about a meta-language to describe interfaces (much like Glade uses XML, though Glade is limited to GTK) and then have a program produce specific code for the various toolkits? This way we wouldn't need Yet Another Library and people could use the toolkit they like most. Massimiliano