Shoes

Once again, a work by _why is feature on this blog. He just doesn’t stop creating awesome tools and frameworks with is favorite language. Now he even has his own icecream ipscream flavor (see the last one on the list).


Presenting Shoes

This time, the development of Hackety Hack was stopped in favor of Shoes, which why calls the soul of the programmer starter kit’s new version. It’s basically a cross-platform toolkit to create simple GUIs. It gives you elements from HTML for your desktop application interface. It works well under Windows, OSX and GTK without changing one line of code. It’s main feature is how the otherwise tedious task of creating buttons and layouts gets simpler, using the characteristics of the ruby language.


Download instructions

The toolkit is still under development and you can find out where to download it from here. It comes already with ruby inside, in case you don’t have it on your machine.


An example

Now it’s time for an example gently ripped of (and slightly changed) from Hackety’s blog.

A GUI example

name, phone, address = nil

Shoes.app do

  background "rgb(240, 245, 220)" 

  stack do
    stack :margin => 10 do

      text "Name" 
      name = list_box :items => 
            ["Philarp Tremaine", "Dirk Hockeybranch"]

      text "Address" 
      address = edit_line

      text "Phone" 
      phone = edit_line

      button "Save" do
        Shoes.p [name.text, address.text, phone.text]
      end

    end
  end
end

As you can see, besides not doing something actually useful, the code is very readable and easy to understand. You can encapsulate elements inside Stacks and flows. The text can get actual HTML elements in the string like span tags. You can find more examples here, as well on Hackety where _why presents the latest features.

Disclamer (by _why): Shoes isn’t an acronym. It’s just a name. And the name is Shoes. Its pronounced just like normal shoes. Except it’s spelled Shoes. It’s not spelled in any other way. If you are Charles Dickens, you have permission to call it Shuse. But UNLESS YOU ARE CHARLES DICKENS, I beg you. Shoes. Trust me, I know what I’m doing this time!


Other toolkits

If you didn’t liked this toolkit, you can also try others available for Ruby: If you enjoyed this post, consider subscribing to my RSS Feed RSS feed icon

Leave a Comment

Follow this post comments with this RSS feed.