Shoes 4 – a progress report

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

12 thoughts on “Shoes 4 – a progress report

  1. 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. πŸ˜€

  2. 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. 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. 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. 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 πŸ™‚

    1. 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

  6. Hey @ProgTob, I have started using Red shoes and am having pretty much fun with it. I am definitely looking forward to use it for my future projects. But all I am concerned about is the notion running around that Shoes is a tiny gui toolkit not build for production or any bigger project. Is this really true, and more importantly will that be true for Shoes4 too (when its is on a stable release)?

    1. Hi there!

      Glad you are having fun with red shoes – that is what they are for, really πŸ™‚

      So about Shoes and big projects my general view is this: Shoes abstracts a lot of things away, which is why it is so pleasant to use. At the same time this leads to performance overhead. Also a bit of loss of control (although we try hard to make users able to set a lot of options through styles). Also at the same time Ruby isn’t exactly the fastest programming language. So if you’d want to write an IDE or something in shoes I doubt you’d get to a useful performance. Same goes for more complex games (although basic games work surprisingly well).

      Also Shoes really is a small GUI toolkit, some abstractions are missing that are needed for building bigger applications. When I do bigger shoes apps I build some abstractions (a menu and the different views it manages for instance, like tabs) myself. Those are needed imo for big applications.

      In general I’d love it if shoes could be used for way bigger applications – I don’t want to stop it from that πŸ™‚ I don’t see it being ready at that point. Also because we got a relatively small team and we all work on it in our limited free time. For instance for Shoes 4 the performance right now is way too bad.

      Don’t get me wrong – an interface is totally doable. But when there are a ton of elements and a lot is happening then I don’t thing it’ll hold. But of course we want to improve performance and I hope to get to work on that in the coming months to improve it. But then there is still the need for good packaging so you can distribute it, all on the todo… but time.

      Also big always lies in the eye of the beholder. Right now my personal main goal is a shoes 4.0 release and making hacketyhack run with it again. Help kids program and have fun. Help devs make little helper programs. If we take it further than this – I’d be more than happy! =) Even more so I’d be happy to develop libraries that allow for more abstractions so building bigger applications gets easier. Or incorporate some of them in shoes itself. Time πŸ™‚

      (I hope what I wrote kind of makes sense and answers your questions – thanks for using shoes)

      1. Thanx PragTob for replying so quickly. I am glad that people like you are contributing so much to Shoes4, so that people like me can take advantage of it :). And I just hope that Shoes4 goes bigger and better with time. My love for Ruby has just multiplied with Shoes! I so much want to contribute in this project, but I am in middle lots and lots of things now and for few months to come yet… But I would be glad to help Shoes4 any way I can asap… Hope that comes soon πŸ™‚ πŸ™‚

Leave a reply to HappyShoesUser Cancel reply