SlideShare a Scribd company logo
TracketyTrack Screenshot




           We know that we can use
           Ruby for Web
           Applications...


                  
Console Screen shot




          Or Console Applications...




                 
What about GUI?



                What about GUI
                Applications?




             
Shoes
    Past, present, future and introduction

              Tobias Pfeiffer
                @PragTob
          pragtob.wordpress.com

                       
No!



    Isn't shoes dead?




                   
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

                             
I ♥ Shoes

         
Applications




           
Quick History Walkthrough




                 
Who knows who this guy
             is?




 
             why the lucky stiff
                       

       https://en.wikipedia.org/wiki/File:Whytheluckystiff.jpg
New maintainer




 
                        Steve Klabnik
                                
    http://25.media.tumblr.com/tumblr_lxlhv9OUO01qmjkado1_500.jpg
Many different colors of
             shoes




                 
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 isn't a gem
    There is no official “Shoes spec”
                            
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?)




                          
The pluggable backend



               The Shoes
                  DSL
            The GUI backend


      SWT     Qt   GTK     ...


                     
The Shoes DSL
    (with huge thanks to Nobody Knows Shoes)




                          
Para


Shoes.app do
  para "This is a simple paragraph"
end




                               
Flow




      
Flow


Shoes.app do
  flow do
    para "This flows nicely..."
    para "until we hit the border..."
    para "we continue to flow!"
  end
end




                               
Stack




       
Stack


Shoes.app do
  stack do
    para "We all"
    para "stack pretty well"
    para "don't we?"
  end
end




                                
More complex layouts




               
More complex layouts
Shoes.app 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" end
end


                              
Button


Shoes.app do
  button "Click me!" do
    alert "Good job!"
  end
end




                              
Image


Shoes.app width: 270, height: 610 do
  image "http://www.rug-b.de/Images/
         Rug-b-ruby-user-groupberlin.jpg",
         click: "http://www.rug-b.de/"
end




                                
Editline & Slots
Shoes.app 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 ; end
end




                               
Keypresses


Shoes.app do
  para "Press a button!"
  @slot = stack do ; end

  keypress do |key|
    @slot.clear do para key end
  end
end




                               
Background & gradient


Shoes.app do
  background gradient("#0F0", "#00F")
end




                               
Animate


Shoes.app do
  fill goldenrod
  stroke tomato
  strokewidth 6
  @oval = oval 0, 0, 50
  animate 24 do |frame|
    @oval.move frame, frame
  end
end




                               
Using gems with red shoes

    Shoes.setup do
     gem 'twitter'
     gem 'oauth'
     gem 'launchy'
    end

    require 'launchy'
    (...)

    Shoes.app do
      (...)
    end



                         
Now you know Shoes!
              
Wrap-up




        
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 + /




                          
Wait a
      second!
    How do I test
     my Shoes
       apps?
          Only test your
               models
         until we've got a
               Shoes
        mocking backend!

         
Further information
    http://shoesrb.com
    http://shoesrb.com/manual/Hello.html
    shoes@librelist.com
    #shoes on freenode
    @shoooesrb
    http://github.com/shoes/shoes4 ← We could
     use some help!
    The Return of Shoes by Steve Klabnik
                           
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)
Shoes on!
    Tobias Pfeiffer
      @PragTob




               

More Related Content

An Introduction To Shoes

  • 1. TracketyTrack Screenshot We know that we can use Ruby for Web Applications...    
  • 2. Console Screen shot Or Console Applications...    
  • 3. What about GUI? What about GUI Applications?    
  • 4. Shoes Past, present, future and introduction Tobias Pfeiffer @PragTob pragtob.wordpress.com    
  • 5. No! Isn't shoes dead?    
  • 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    
  • 10. Who knows who this guy is?   why the lucky stiff   https://en.wikipedia.org/wiki/File:Whytheluckystiff.jpg
  • 11. New maintainer   Steve Klabnik   http://25.media.tumblr.com/tumblr_lxlhv9OUO01qmjkado1_500.jpg
  • 12. Many different colors of shoes    
  • 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 isn't a gem   There is no official “Shoes spec”  
  • 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. The pluggable backend The Shoes DSL The GUI backend SWT Qt GTK ...    
  • 16. The Shoes DSL (with huge thanks to Nobody Knows Shoes)    
  • 17. Para Shoes.app do para "This is a simple paragraph" end    
  • 18. Flow    
  • 19. Flow Shoes.app do flow do para "This flows nicely..." para "until we hit the border..." para "we continue to flow!" end end    
  • 20. Stack    
  • 21. Stack Shoes.app do stack do para "We all" para "stack pretty well" para "don't we?" end end    
  • 23. More complex layouts Shoes.app 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" end end    
  • 24. Button Shoes.app do button "Click me!" do alert "Good job!" end end    
  • 25. Image Shoes.app width: 270, height: 610 do image "http://www.rug-b.de/Images/ Rug-b-ruby-user-groupberlin.jpg", click: "http://www.rug-b.de/" end    
  • 26. Editline & Slots Shoes.app 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 ; end end    
  • 27. Keypresses Shoes.app do para "Press a button!" @slot = stack do ; end keypress do |key| @slot.clear do para key end end end    
  • 28. Background & gradient Shoes.app do background gradient("#0F0", "#00F") end    
  • 29. Animate Shoes.app do fill goldenrod stroke tomato strokewidth 6 @oval = oval 0, 0, 50 animate 24 do |frame| @oval.move frame, frame end end    
  • 30. Using gems with red shoes Shoes.setup do gem 'twitter' gem 'oauth' gem 'launchy' end require 'launchy' (...) Shoes.app do (...) end    
  • 31. Now you know Shoes!    
  • 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. Wait a second! How do I test my Shoes apps? Only test your models until we've got a Shoes mocking backend!    
  • 35. Further information http://shoesrb.com http://shoesrb.com/manual/Hello.html shoes@librelist.com #shoes on freenode @shoooesrb http://github.com/shoes/shoes4 ← We could use some help! The Return of Shoes by Steve Klabnik    
  • 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. Shoes on! Tobias Pfeiffer @PragTob