RuGUI
RuGUI is a framework which aims to help building desktop applications. RuGUI was mostly inspired by the *Ruby on Rails* framework, taking most of its features from it.
RuGUI approach is to provide a MVC design for the application, separating business logic from application presentation, making it easy to maintain and evolve the application.
Also, a Observer/Observable pattern is implemented so that you can define observable properties in your model which are observed by controllers that should react to changes in the model. This makes the application code even more clean when dealing with applications that have multiple data entry points. For example, when receiving data from a network one may update a value in a model, and the controller will update all needed widgets (progress bars, labels, status bar, etc).
The initial framework was based on the great Ruby/GTK API, but RuGUI has evolved so that you may use other GUI frameworks with it. Since version 1.1.x it has placed all functionality specific for GTK wrapped in a framework adapter. This has made it possible to write a QT adapter and now it is possible to use all of the RuGUI features together with QT. As the framework evolve other framework adapters may be written, enabling the use of RuGUI with any other GUI frameworks.
A basic support for building Rubygame applications was also added. It is still missing some functionality like signal connections and widget creation but it is usable. By using RuGUI you will gain a template directory structure as well some of the features of RuGUI, like configuration, a shell script for running your game, support for rspec and test-unit, etc.
Instalation
Install the gem:
gem install rugui
To check if the installation was successful type in a console:
rugui -v
Dependencies
RuGUI depends, of course, on the Ruby binding for the GUI framework that you’ll use. It is known to work on Linux and Windows plataforms. Currently it depends on the ActiveSupport gem, which can be installed by:
gem install activesupport
Also the rugui generator uses thor, so you will also need to install it:
gem install thor
Both gems should be installed when installing rugui gem, so you probably won’t need to do this.
Generating an Application
To generate an application, go to the directory where you want to create the application and type:
rugui <app_name>
For more options type:
rugui -h
Testing
Your application may use Test::Unit or RSpec as the testing framework. If you have RSpec gem installed, ‘rake -T’ will list RSpec related tasks as well. Otherwise only Test::Unit tasks will be displayed.
Using Active Support 3.0
When using with Active Support 3.0 you’ll need to install two gems that are needed by it:
sudo gem install tzinfo i18n