RE: Translators (Re: State of the X clipboard, and perhaps a solution)



>How about implementing a translator framework, a bit like known from BeOS?

That would actually be a great idea, I hope someone could do something like
that for Gnome/KDE... Maybe a new freedesktop.org project could do this?

I remember third party developers creating translators, or apps could
include the formats they were supporting as translators and install them
during their application installation. After that point, every other
application was supporting the same formats.
For example, if you would install a stand-alone translator or a "Painting
application", and then this "Painting Application" would install the formats
that it supports as "translators" (which are special libraries really), then
ANY other "panting" application that support the translator architecture
would automatically support these formats as well. Samples here:
http://www.bebits.com/browse/28

Don't confuse "xxx libraries" with "translators" though. The difference is
that when an image viewer says that it supports 10 image formats, it means
that it needs these 10 libraries in the system and it needs to have special
code to "bind" to them. With Translators, any Translator that is marked as
"image type" will work with that image viewer automatically. The developer
of the image viewer only needs to be able to bind to the translator
architecture, not to the individual image libraries themeselves. It is just
a form of abstraction of course, but the idea worked incredibly well and it
was "new functionality for free" when a new translator was out there.

I was behind the initiation of the PSD translator development for BeOS back
in April 2000. We had no PSD support on any of the 3-4 image manipulation
apps and the 8 image viewers for BeOS available back then and the next day,
you had ALL these apps supporting the importing of PSD files. Cool stuff.

The only problems were when two applications were installing translators for
the same format... Sometimes this was handled correctly (they need to have a
unique name somehow) but sometimes the new translator was overwriting the
system one and then it exposed new bugs and stuff, and so sometimes that was
messy (the number of PNG translators for BeOS for example are messy). But
overall it was a great "trick". :-)

Eugenia



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]