Project

sirens

0.0
No commit activity in last 3 years
No release in over 3 years
Interactive utilities to develop in Ruby, implemented in Ruby and GTK3.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 3.0
 Project Readme

Sirens

Sirens gives Ruby developers some simple and interactive utilities to ease development, testing and learning Ruby.

These utilities are written in Ruby and use gtk3 as its GUI support.

Installation

Pre requisites

apt install libglib2.0-dev

In the project Gemfile add the following gem:

group :test, :development do
    gem 'sirens'
end

and install the bundles with:

bundle install

Usage

First require the gem:

require 'rubygems'
require 'bundler/setup'

require 'sirens'

then open a browser in any part of the application or in a test with:

Sirens.browse(object: user)

Browsing objects

Testing

Run the tests with

bundle exec rspec

References

These utilities are heavily based in the Smalltalk browsers, in particular in the Object Arts implementation named Dolphin Smalltalk, which I fancy for its outstanding beauty.

I started a similar framework some years ago implementing a custom GTK+ GUI framework inspired in Shoes and Dolphin's MVP framework but then I dropped the project.

I recently learned React and I liked very much its simplicity and its declarative DSL.

I decided to re-implement these utilities from scratch using a DSL similar to Shoes (which also resembles React JSX) but bringing back the models to it, adding a custom layer of composable models to handle most of the information updates between components instead of lifting up the state to a common ancestor.

I think the final result is both very simple to use and highly adaptable and its worth looking at it.

The graphics code remains in the View layer, so it would be possible to switch to any graphics library, be it GTK+ or QT.

I like this implementation much better than the previous one I did several years ago and it could be spin-off to a GTK+ gem on its own, but currently there are no plans to do that.