An Introduction To Shoes


Published on

(please download and use libreoffice, the slides look slightly messed up here)

An introduction to the Shoes GUI toolkit for Ruby. These slides are from a talk I gave at the Ruby User Group Berlin (rug-b) on the 5th of July 2012.

So what is so special about Shoes? It is simple and inspired by the web, go check it out! =)

Shoes on!

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

An Introduction To Shoes

  1. 1. TracketyTrack Screenshot We know that we can use Ruby for Web Applications...   
  2. 2. Console Screen shot Or Console Applications...   
  3. 3. What about GUI? What about GUI Applications?   
  4. 4. Shoes Past, present, future and introduction Tobias Pfeiffer @PragTob   
  5. 5. No! Isnt shoes dead?   
  6. 6. What is shoes? GUI DSL/toolkit for Ruby Inspired by the web All ruby all the time Cross-platform and packaging Simple Feels like Ruby Many different implementations   
  7. 7. I ♥ Shoes   
  8. 8. Applications   
  9. 9. Quick History Walkthrough   
  10. 10. Who knows who this guy is?  why the lucky stiff
  11. 11. New maintainer  Steve Klabnik
  12. 12. Many different colors of shoes   
  13. 13. Shoes problems Many different implementations, but none fully working... “official” red shoes rather a C-project and a ruby interpreter of its own Packaging and installer of red shoes (partially) broken unstableness It isnt a gem  There is no official “Shoes spec”  
  14. 14. Shoes 4 Concentrate efforts on one implementation Make the gui backend pluggable TDD implementation Based on brown shoes JRuby and SWT as a start (Qt?)   
  15. 15. The pluggable backend The Shoes DSL The GUI backend SWT Qt GTK ...   
  16. 16. The Shoes DSL (with huge thanks to Nobody Knows Shoes)   
  17. 17. do para "This is a simple paragraph"end   
  18. 18. Flow   
  19. 19. do flow do para "This flows nicely..." para "until we hit the border..." para "we continue to flow!" endend   
  20. 20. Stack   
  21. 21. do stack do para "We all" para "stack pretty well" para "dont we?" endend   
  22. 22. More complex layouts   
  23. 23. More complex do flow do title "A nice title" end flow do stack width: 150 do para "This could be" para "Your menu" end stack width: -150 do para "This could be your main content!" para "With many items." para "It goes on and on..." end end flow do inscription "a footer" endend   
  24. 24. do button "Click me!" do alert "Good job!" endend   
  25. 25. width: 270, height: 610 do image " Rug-b-ruby-user-groupberlin.jpg", click: ""end    
  26. 26. Editline & do para "Your text:" @edit = edit_line button "Ok" do text = @edit.text @slot.append do para "You entered:#{text}" end @edit.text = "" end @slot = stack do ; endend   
  27. 27. do para "Press a button!" @slot = stack do ; end keypress do |key| @slot.clear do para key end endend   
  28. 28. Background & do background gradient("#0F0", "#00F")end   
  29. 29. do fill goldenrod stroke tomato strokewidth 6 @oval = oval 0, 0, 50 animate 24 do |frame| @oval.move frame, frame endend   
  30. 30. Using gems with red shoes Shoes.setup do gem twitter gem oauth gem launchy end require launchy (...) do (...) end   
  31. 31. Now you know Shoes!   
  32. 32. Wrap-up   
  33. 33. Wrap-up Shoes is a nice Ruby GUI-toolkit There are many colors of Shoes Super cool for small applications Pro-Tip: Open the red shoes console with Alt + /   
  34. 34. Wait a second! How do I test my Shoes apps? Only test your models until weve got a Shoes mocking backend!   
  35. 35. Further information #shoes on freenode @shoooesrb ← We could use some help! The Return of Shoes by Steve Klabnik   
  36. 36. Thank you Team shoes!steveklabnik ashbb wasnotrice pjfitzgibbons jrgifford mpapis davorb ccoupe lljk _why  And all the ones I forgot...   (All pictures and names taken from github)
  37. 37. Shoes on! Tobias Pfeiffer @PragTob