Singpolyma

Archive of "Research"

Archive for the "Research" Category

Researching GUI Patterns

Posted on

I’ve been complaining about the state of GUI toolkits and standards, etc, for some time now. Even (and especially) in the FLOSS world we have so many incompatible ways to do GUIs, it’s crazy. No one can bother to write a GUI in every possible toolkit (or usually even in more than one!) so we end up with multiple projects all working on the same thing, but “in X toolkit/style”.

I was looking at the output of the Qt Designer (GUI drag-n-drop tool for the Qt toolkit) a couple weeks ago and realised something: the output is very hackable! In fact, many of the GUI designer tools out there have text or XML files that can be processed. To convert between them, all it would take is mapping the classes, properties, and events between the different toolkits.

Of course, that got me thinking. Mapping Qt to Gtk and Tk etc al, then mapping Gtk to Qt and Tk et al would be a rediculous proposition. Each toolkit or format would add an increasing number of bidirectional mapping requirements to any software.

The solution was pretty obvious. Create an intermediate data model that can represent GUIs from any toolkit and just write input/output filters. The strategy has a side-benefit too: such a data model could form the basis for discussion between different toolkits and formats on their similarities and where they could be brought closer together. Ideally, very simple GUI programs could be source-compatible between, say, Qt and Gtk.

So, how to determine the best way to model this data? Research and a wiki of course! Document existing toolkits and formats and what widgets/properties/events/layout stragegies they have, and see what the common patterns are.

So far I have at least widgets documented for Gtk, Qt, HTML forms, XForms, XUL, and wxWidgets. I have identified common widget and property patterns and common layout patterns. I have already started writing software to read and write GladeXML and should start on Qt Designer output soon.

New Calendar

Posted on

Richard Conn Henry has a potentially revolutionary new idea, with a few bugs…

Richard Conn Henry (he credits others on the site, but I will just mention his name here) has created a new calendar system so that every date is the same weekday, every year. The idea is similar to the one familiar to any huge LotR buffs as the calendar of the hobbits. The difference is that instead of having days that are not part of the year, you end up with a whole extra week in its own ‘mini-month’ ever 5 or 6 years. The whole thing is worked out, except for a few quibbles I have with it, listed below as taken from an email I sent him. I may have thought of other stuff, but this is my main analysis:

– You mention the problem of people born on Jauray 31, etc. You solution (just celebrate on the new last day of the month) is very good, but there is the other option of celebrating when your birthday WOULD be, according to the Gregorian calendar date (i.e., the first of the next month)

– Most of the point of C&T is convenience, however you suggest the elimination of time zones… how is this convenient? I, for one, think waking up at midnight being normal is just plain inconvenient. Everyone already uses UTC for international dealings, why change how it is done locally?

– I really like the idea of going to 24hr time everywhere.

– The idea that everyone born on a Newton week should celebrate their birthday on the 4th of July is, in my opinion, a bigoted American idea. It would be the same situation as someone born on leap-day according to the current calendar. They would probably just move to the closest day.

– I like the idea of removing daylight savings time, however changing working hours in its place may be a problem. Most employers would simply refuse to do it.

– Although yyyy-mm-dd is ISO standard, I don’t see the problem with using the worldwide (excluding north america) standard of dd-mm-yyyy, it is just the same thing backward.

– Moving Christmas to a Sunday is not such a hot idea, for two reasons. One, it ceases to be a real holiday and is just a special weekend. Two, we Christians (who pretty much invented the original holdiay) will no longer be able to have a special Christmas service to celebrate the birth of Our Lord. We will be required to ‘specialise’ the normal Sunday service, thus degrading the holdiday.

– Are you aware that JRR Tolkein created a calandar based on a similar idea for use by the hobbits in LotR?

I found the original article on it at: http://www.signonsandiego.com/uniontrib/20041222/news_1c22singular.html
and the site for the calendar itself is at: http://henry.pha.jhu.edu/calendar.html

Tags: