Shoes 4 – a progress report

17 Jul

My Google Summer of Code has been going on for one month now. The first commit on the shoes4 repository is almost one year and two months old. I think this is a good time to introduce shoes4 to more people and take a look and see what we have accomplished so far.

Shoes?

Shoes is a multi-platform gui toolkit for Ruby aimed at simplicity. The probably most well-known Shoes program is Hacketyhack, a tool to teach programming to beginners. Shoes truly is one of a kind, for instance with its very own layout mechanisms “stack” and “flow”. Personally I always wanted to write little GUI applications but always found it to be too cumbersome and frustrating. Until I met shoes. See how simple it is:

Shoes. app title: 'Hello Shoes' do
  background gradient limegreen..blue
  para 'This is just a very basic app'
  button 'Click me' do alert 'Hello there!' end
  image 'http://shoesrb.com/img/shoes-icon.png'
end

Screenshot from 2013-07-17 21:14:29

But this is not the only great feature of shoes, although it’s certainly one of the reasons why I have fallen in love with shoes. Another feature is packaging: You can package your shoes applications as standalone applications for the different operating systems.

Shoes 4?

Shoes4 is a complete rewrite of its predecessor keeping its features and enhancing the DSL here ant there.  “Why rewrite?”, you might ask. Well Shoes3 (or red shoes) is more of a C-project than a Ruby project. It has separate backends for each one of the major three operating systems. It’s really hard to maintain. Unfortunately there are some bugs that make the install fail on some systems, a shot at a dependency upgrade was basically a frustrating story for everybody involved, packaging (sadly) is mostly broken etc. Also there always was the dream, that shoes could be a gem. That was just hard to accomplish with shoes3, so it is an executable embedding a ruby interpreter.

Over time people have also started writing their own Shoes versions. There are a lot of them out there, by our count it’s 9 versions of shoes right now. Shoes4 is an effort for all implementers to join forces and work together so shoes can be shiny and new again. To accommodate the apparent desire of people to build their own pair of shoes we now use a new architecture.

Basically there is a DSL layer with all the elements that the user will interact with. This layer already implements quite some of the logic. However an exchangeable backend does the real heavy lifting of drawing etc. . So almost every DSL class has a matching backend implementation. For now the default backend implementation uses JRuby + SWT, but there also is a proof of concept backend in Qt. One of the advantages of SWT is that it aims to have a native look and feel, which is in the spirit of the original shoes. And already using a cross-platform GUI library takes a lot of load from our shoulders.

Screenshot from 2013-07-17 21:23:27

A very basic and yet to be polished graphic illustrating the DSL + backend approach.

Where are we at?

Here are some numbers to give you a feeling of where we are at right now:

  • we are closing in on the 1000 commits mark
  • Code coverage is at 92%
  • 62 samples (little scripts to test things, some of them real shoes programs) are known to work
  • 30 samples are not yet working / for many of them only tiny bids of implementation are missing to make them work and some of them are not scheduled to ship with 4.0 (e.g. video support)
  • 21 people have contributed code and a lot more have helped with reporting issues, trying stuff out, being helpful etc. – THANK YOU ALL! :-)

As mentioned in the beginning there is a Google Summer of Code going on: Faraaz and me (with the help of our mentor Davor) are working hard to push Shoes4 forward. Here are some numbers concerning the first month of Google Summer of Code, we…

  • closed 46 issues
  • opened 18 issues
  • pushed 193 commits…
  • ..changing 202 files.
  • Code Climate score has improved from 3.1 to 3.3 (and there is a continued effort to refactor the other offenders)

And since we are talking about graphical things, here are some screenshots of working samples with shoes4 as of now:

The shoes4 builtin manual

A little tank game

There are a lot more samples… you can play pong, watch some fancy animations, a simple to do list etc…

One of the apparent questions is: “Can I use shoes4 right now?” The answer is: “Not yet.” We are in pre-alpha stage. While a lot of things work, some don’t. We will let you know when we release an alpha release or a release candidate for you to check out. However if you’re adventurous you can check out the master on github no matter what, feedback and reports about bugs are highly appreciated!

So what is missing? Here are a couple of bigger things that are missing as of now:

  • The span element to style parts of a text (used in a lot of samples)
  • Reliable packaging for all platforms (there is basic .jar and Mac packaging though)
  • quite some styling options for the different elements
  • The shoes console and the methods that go with it

Contributing

In general the shoes community is really nice and helpful, so if you want to take a swing at something we’re happy to help and even happier about your contribution! We also have a new “Newcomer Friendly” tag to show the way to potentially good issues to get started on. Otherwise just look at the issues and comment there if you’re interested in helping out. However just trying shoes4 out, fooling around or running a couple of samples is highly appreciated and helpful as well. Just refer to the README of the shoes4 repository to get started.

Lastly I want to thank the JRuby organization and Google for giving me the opportunity to work on an open source project I love full-time.

Screenshot from 2013-07-17 21:02:08Furthermore, if you want to know more about shoes you might consider going to JRuby Conf 2013 – I will be speaking there about shoes and there are lots of other great talks as well!

Shoes on!

Tobi

About these ads

8 Responses to “Shoes 4 – a progress report”

  1. stungeye July 20, 2013 at 00:46 #

    Well done Shoes team and thanks for the update Tobi!

    I’m a long time fan of Shoes. Time for me to install Shoes 4 and start testing my existing Shoes apps. :D

  2. BarefootFord July 21, 2013 at 00:05 #

    Ah I love it. Shoes was one of the first Ruby apps I looked at. I loved the idea of it, but it was too buggy at the time to be fun. I am really looking forward to a stable new build. Lots of fun stuff could be written in Shoes.

  3. Jason July 23, 2013 at 03:39 #

    Now we only miss source code obfuscation and we’ll have a decent way to pack up and distribute ruby apps, till rubinius or some other compiled implementation is ready.

  4. PragTob July 24, 2013 at 01:54 #

    Thank you for your comments and encouragement :-) Surely working to make Shoes4 as stable and usable as possible – hope you all can enjoy Shoes to its fullest when it’s ready :-)

  5. HappyShoesUser October 8, 2013 at 20:30 #

    Great to see it’s still being improved. Good Job!

    In my school days i really disliked programming, till i encountered Ruby Shoes and now i’m still making little programs just for fun. Because of shoes i’m now able to write and understand programming in general a lot better, and more importantly..it’s fun to do it!

    I think the big issue with people that start programming is like looking up unto a mountain, where do i begin? And with shoes you realize that when you understand Ruby, you can read and understand almost all programming languages a little bit, and than you can takeoff. That’s the key thing i think, making a language fun and see the end result in a more graphical manner right away with little code.

    I hope you guys advertise a bit more with shoes on this aspect, so others like myself have fun getting into programming. Like youtube video’s that say: “Programming hard? You haven’t tried Shoes!” i think it will work just nicely :)

    • PragTob October 15, 2013 at 23:55 #

      Thank you so much for sharing your story. Stories like this is why we do shoes and quite honestly it’s what keeps me going!

      Also thanks for sharing that idea – it sounds really good. Once we release a new version of shoes that sounds like a good thing to do! =)

      Shoes on!
      Tobi

Trackbacks/Pingbacks

  1. This Month in Ruby: PeepCode Acquired, A Free Rails 4.0 Book, Rails 3.2.14, And More - July 25, 2013

    […] Shoes 4 – A Progress Report Shoes was a graphical toolkit put together by Why the Lucky Stiff that made it simple to create GUI apps in Ruby. Since Why disappeared, others have picked up work on it, and Shoes 4 is set to be a complete rewrite. […]

  2. Books about developing » Blog Archive » This Month in Ruby: PeepCode Acquired, Rails 3.2.14, And More - July 30, 2013

    […] Shoes 4 – A Progress Report Shoes was a graphical toolkit put together by Why the Lucky Stiff that made it simple to create GUI apps in Ruby. Since Why disappeared, others have picked up work on it, and Shoes 4 is set to be a complete rewrite. […]

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 756 other followers

%d bloggers like this: