From: Michael Davis Date: 2003-02-07T10:43:01+09:00 Subject: Re: locana, SVG, cross-platform GUI meanderings... I have been working vigorously on the next release of Locana. A lot of very nice features are coming. I felt I needed to optimize the relationship between Locana and the native GUI with the next release. As a result, I had to rewrite of a lot of code and this took longer than expected. The next release will be much more efficient and much more object oriented. My goal is to release ASAP but it will likely take me a few weeks to get everything cleaned up. I have the Tk binding mostly working again. My goal with Locana was to write the best GUI interface I could (easy and fun to work with) and then port that interface to any platform that I wanted my software (applets) to run on. The second goal was to be able to install only Ruby with Locana and have my applications run on any GUI/toolkit that is currently installed or native to the platform so that the end user does not need to install a GUI toolkit unless they want to take advantage of what that toolkit has to offer. As a result, I implemented a binding for MS Windows that calls DLL's directly. I implemented a Tk binding because I felt it covered the most other possible platforms. I plan to write a binding for GTK for linux and FreeBSD because I feel it is the most widely used GUI toolkit for linux. I also implemented an HTML binding (this will not be a part of the next release because it needs to be rewritten) because I wanted to allow end users the ability to run my applets without installing Locana or Ruby. Hopefully the binding interface will be documented enough to allow new bindings to be easily added. I hope this helps, Michael Phil Tomson wrote: > Hold on, this post takes a few twists and turns. Consider it an exercise > in non-linear thinking or perhaps web-based thinking where you end up > following links to pages and finding other interesting links which you > then follow to other pages not knowing quite where you'll end > up...brainstorming. > > Has anyone used Locana? (http://www.locana.org/) > There haven't been any updates lately... > > For those not familiar with it: > > It's a Ruby based cross platform GUI builder/toolkit - where 'platform' > here includes Windows (using native DLL calls), Linux (using Tk) and web > browsers. The same code can be used to target all three which is > interesting... There are other cross-platform GUI toolkits out there > (like Tk, WxWindows and to some extent Qt) but I don't think any of these > others include the ability to run your GUI in a browser. > > There was a recent thread of discussion on my local Linux user's group > mailing list about what the best programming language for teaching new > programmers would be (specifically the originator of the thread was asking > if PHP would be a good beginner's language) - I of course jumped in with > Ruby, but the PHP contingent offered a compelling reason for their > language (I really don't think PHP _would_ be a good first language, but > leaving the language issues aside) by making the point that it's very easy > to create GUIs in PHP where the GUI runs in a browser. Their point being > that new programmers would like to be able to easily create GUI elements > like buttons, etc (I don't totally agree, but their argument does seem to > have some merit) so they can quickly see some interesting results and of > course they felt that PHP was the quickest route to get there because you > don't have to worry about having some specific GUI library installed, the > GUI is composed of HTML and it 'runs' in the browser. > > Now this got me to thinking about Locana since it is apparently easy to > create a browser-based GUI with it. > > ....then, the other day I read something about how KDE and GNOME are now > using SVG to produce their icons - the advantage being that they can make > their icons any size (scalable)... and of course that got me to looking a > bit at SVG. So would it be possible to create SVG-based GUIs that 'run' > in a browser and have this SVG-based toolkit as one of Ruby's built-in GUI > toolkits? Would this be a coup for Ruby in the web-space? (could > this sort of thing be considered a 'killer app' for Ruby? - I truely don't > know, I'm looking for opinions. I kind of think it would be very > powerful, but I don't have enough in-depth knowledge about SVG yet to > know for sure). > > Phil