gutopia-dev
[Top][All Lists]
Advanced

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

Re: [rgui-dev] RE: Backend Debouch


From: Tom Sawyer
Subject: Re: [rgui-dev] RE: Backend Debouch
Date: 27 Aug 2002 01:54:59 -0600

Laurent,

that had occured to me. personally i have no idea what a JNI for Ruby
API would entail. but despite that there are still some things to
consider:

creating some sort of C-JNI to C-Ruby translator would lock us into Sun.
i don't know that exact licensing of JNI technology, perhaps you do, but
my hunch is that its not pure open source. also we would then have to
subsequently keep up with the changes to JNI, as well as SWT. (i assume
SWT is open source) but perhaps you are suggesting that we not actually
tie in with JNI, but simply steal the SWT C code and convert the JNI
parts of the Java code into equivelant Ruby code? like i said i don't
know too much about doing something like that. i also wonder if we would
then be left to support our own fork of the SWT C code? do we want to do
that? these questions i am unclear about. but there was some interesting
talk about doing the same sort of thing with EJB the last few days on
ruby-talk. the general opinion was that the Ruby community should do
their own rendition, borrowing from EJB, but not actually harnessing any
of that code straight out. food for thought.

more importantly, by using the C SWT code instead of the current
existing Ruby bindings to the various platforms, i.e. Ruby-Gnome,
SWin/VRuby, and RubyCocoa/RubyAEOSA, we are abondoning valuable Ruby
developers that could be of great help to our project. The C SWT code
may be very good, i will grant you that, but is it worth loosing the
support of great ruby coders like of Masao Mutoh, FUJIMOTO Hisakuni, and
a number of others? if they see just how good GUtopIa is, and knowing
that their toolkits are being used for it, i am certain that they will
be very ready to lend a hand and even become the maintainers of their
respective backends. if i am not mistaken, Leon and Kero are already set
to do this for there particular API's. which brings me to my next
thought.

C SWT in no way helps us with bindings to Ruby-Wise or ParaGUI. you may
think these unimportant and i won't argue that getting a good
multi-platform gui for ruby asap isn't more import then supporting
eiterh of these particular backends. certainly it is. but if we can do
so such that we still have these potential backends as well, wouldn't
that be even better?

finally, and my largest concern, by doing what you suggest, i am worried
that we'd be locking ourselves into doing things the SWT way, rather
then the Ruby Way or the GUtopIa Way, and thus would have limited
freedom to do things BETTER. take for instance the idea of Component
Textual Markup which i am planning for GUtopIa. with it one can add text
to a Text widget with various styles much more easily than you can using
SWT. For example this code in SWT:

        widget.setText("This is the StyledText widget.");
        // create the Colors
        Color orange = new Color(display, 255, 127, 0);
        Color lime = new Color(display, 127, 255, 127);

        // make "This" bold and orange
        StyleRange styleRange = new StyleRange();
        styleRange.start = 0
        styleRange.length = 4;
        styleRange.fontStyle = SWT.BOLD;
        styleRange.foreground = orange;
        widget.setStyleRange(styleRange);

        // make "StyledText" bold and lime
        styleRange = new StyleRange();
        styleRange.start = 12;
        styleRange.length = 10;
        styleRange.fontStyle = SWT.BOLD;
        styleRange.foreground = lime;
        widget.setStyleRange(styleRange);

translates into something like this in GUtopIa:

  widget.text = "<#FF7F00><b>This</b></#FF7F00> is the " \
                "<#7FFF7F><b>StyledText</b></#7FFF7F> widget."

which do you prefer?

please consider all this carefully. i can tell you are very psyched
about the idea of having a "SWT for Ruby" and that certainly has merit.
perhaps too, you believe by lifting the SWT code we can get this done
faster. i can understand both these thoughts. but be reassured, while
our work may not be as refined as SWT for awhile, we will actually have
a basic working system of extrodinary capability beyond that of SWT in
rather short order.

~tom



On Tue, 2002-08-27 at 00:29, Laurent Julliard wrote:
> Actually when the same kind of discussion was raging on the Rouge 
> mailing list and after spending several days in the low level C code of 
> SWT , I remember that I came to the exact same conclusion. The guy in 
> SWT have done a remarkable job and the best approach would probably to 
> write a sort of C-JNI to C-Ruby translator to leverage their work. This 
> tool go do 95% of the job and then things could be finalized by hand.
> 
> Laurent






reply via email to

[Prev in Thread] Current Thread [Next in Thread]