Shoes GUI Toolkit Demonstration Apps
A collection of small apps for demonstrating the features of Shoes GUI toolkit.
Suitable for presentation at lectures, user group meetings, etc. Fits in under one hour .)
Basics: drawing shapes on screen. Shoes as domain-specific language (DSL).
2/ Shapes and Colors
Drawing with colors. More DSL. Programming as inventing and implementing API.
animate method. Calculations. Programming as a "recipe".
Basics: clicking invokes associated block. Ruby + Shoes = very, very succinct code.
5/ Interactivity with objects
Shoes::Widget extends Shoes' DSL with our own methods. Work with sound. Handle
Forms are as easy in Shoes as in HTML. Very, very easy.
8/ Live Interface
Let's send the form data to a Rails application running at
http://localhost:3000 and display the response status. See the simple Rails app in
rails_people directory. Run with
script/server to have an endpoint for Shoes app.
Simple "uploader" sending one or more files with
Net::HTTP to a Sinatra application (see
sinatra_upload_service.rb), which receives the files and saves them to
More complex interface, working with progress bars in Shoes, using threads. Run Sinatra endpoint with
ruby sinatra_upload_service.rb. Possible "homework": refactor the
(Obviously, in real world application you would do multipart requests, proxy the uploading webservice, etc. This is not production code.)
Released under MIT license in 2009 by Karel Minarik. Use anything in whatever manner you like.