Make GUI Apps with Shoes

Brian Hogan
Brian HoganProgrammer and writer.
Make GUI Apps with Shoes
         Brian Hogan
Shoes?
simple GUI toolkit
why ruby?
• Highly dynamic
• Very high level
• 100% object oriented
• 100% open-source
• Really easy to learn
simple code.
age = 42
first_name = "Homer"
start_date = Date.new 1980, 06, 05
annual_salary = 100000.00
Ruby is dynamically
       typed
but strong-typed!
so a string and a
  number can be
declared without a
      type...
...but you can’t just add
  a number to a string
 without converting it.
age = 25
"you are " + age.to_s + " years old!"
there’s a shortcut for
building strings though:

  age = 25
  "you are #{age} years old."
#{} embeds an
 expression in a string,
converting the result to
       a string!
Ruby has simple logic.
 if on_probation(start_date)
   puts "Yes"
 else
   puts "no"
 end
Methods (functions) are
     simple too.
  # if start date + 6 months is > today
  def on_probation?(start_date)
      (start_date >> 6 > Date.today)
  end
Classes can be boring...
class Person
  @first_name
  @last_name

  def first_name=(f)
    @first_name = f
  end

  def first_name
    @first_name
  end

  def last_name=(l)
    @last_name = l
  end

  def last_name
    @last_name
  end
end
...or awesome!
class User
  attr_accessor :first_name, :last_name
end
Everything is an
object... even integers
     and strings!
Arrays

colors = ["Red", "Green", "Blue"]
Hashes (dictionaries)
attributes = {:age => 25,
              :first_name => "Homer",
              :last_name => "Simpson"}
=>
Hashes as parameters
for methods are very
     common.
Blocks
some_method do
  some_code_you_wrote
end
Blocks can iterate...
@colors = ["red", "green", "blue"]

@colors.each do |color|
  puts color
end
and encapsulate code
create_table :products do |t|
  t.string :name
  t.text :description
  t.boolean :visible
  t.integer :price
end
You use them all the
   time in Ruby.
in fact, every method
   can take a block.
     5.times do
       puts "Hello!"
     end
Blocks make it easy to
   write your own
      language.
DSL - Domain Specific
      Language
Shoes is a DSL for
making GUI apps.
A Shoes app is an
     object.
You use blocks to
   define the user
interface and trigger
       events,
Shoes.app :title => "Hello World" do
  alert "Hello World"
end
Shoes.app :title => "Hello World" do
  button "Click me" do
    alert "Hello World"
  end
end
Shoes.app :title => "Hello World",
          :width => 320,
          :height => 240 do

  background red

end
Shoes.app :title => "Hello World",
          :width => 320,
          :height => 240 do

  background red..black

end
stacks
Shoes.app :title => "Hello World",
          :width => 320,
          :height => 240 do

  stack do
    para "Hello"
    para "World"
  end
end
flows
Shoes.app :title => "Hello World",
          :width => 320,
          :height => 240 do

  flow do
    para "Hello"
    para "World"
  end
end
Combine stacks and
     flows.
Shoes.app :title => "Hello World",
          :width => 320,
          :height => 240 do

  stack :width => "100%" do
    background gray
    title "Hello World"
  end

  stack :width => "50%" do
    flow :width => "100%" do
      para "Left side has some text"
    end
  end

  stack :width => "50%" do
    background white
    para "Right side has some text"
    para "without an inner flow."
  end

end
Shoes.app :title => "Hello World" do
  stack do
    banner "Hello there."
    title "The quick"
    subtitle "brown fox"
    tagline "jumped"
    caption "over"
    para "the"
    inscription "lazy dog"
  end
end
edit_line
Shoes.app :title => "Hello World" do
  para "Enter your name"
  @name = edit_line
end
edit_line
Shoes.app :title => "text boxes" do
  para "Password"
  @pass = edit_line(:secret => true)
end
edit_box
Shoes.app :title => "text boxes" do
  para "About Me"
  @about = edit_box
end
list_box
Shoes.app :title => "text boxes" do
  para "Colors"
  @color = list_box :items => ["green", "red", "blue"]
end
Use .text to grab the
        values in the boxes.
Shoes.app :title => "Hello World" do
  para "Enter your name"
  @name = edit_line
  button "Go" do
    name = @name.text
    alert "Hello #{name}"
  end
end
Since everything is an
object, you can work
 with it... even stacks
      and flows!
Shoes.app do
  para "add name"
  button "Add" do
    @names.append do
      para @name.text
    end
    @name.text = ""
  end
  @names = stack
end
Ooooh.. windows!
Shoes.app do
  button "Open window" do
    window :title => "Child" do
      para "Hello!"
    end
  end
end
Shoes can load images,
 play music, and play
       movies.
You can use and embed
  almost every Ruby
        library
Make GUI Apps with Shoes
Make GUI Apps with Shoes
It can open browser
      windows...
..and hook into the
OS’s open, save, fonts,
  and color pickers.
Make games with
    Shoes!
You can build installers
for Windows, Linux, and
         Mac.
What makes Shoes so
      great?
It lets you build things
          fast...
...and have fun doing it.
http://github.com/napcs/shoes_demo_apps/
           http://the-shoebox.org/
    http://github.com/whymirror/shoes/
questions?
brianhogan@napcs.com
   twitter: bphogan
http://www.napcs.com/
1 of 62

Recommended

Shoes by
ShoesShoes
Shoeslvrubygroup
917 views23 slides
Playing with Elixir/Phoenix by
Playing with Elixir/PhoenixPlaying with Elixir/Phoenix
Playing with Elixir/PhoenixAnton Sakharov
87 views51 slides
Rubyconf Bangladesh 2017 - Lets start coding in Ruby by
Rubyconf Bangladesh 2017 - Lets start coding in RubyRubyconf Bangladesh 2017 - Lets start coding in Ruby
Rubyconf Bangladesh 2017 - Lets start coding in RubyRuby Bangladesh
147 views40 slides
Level 5 by
Level 5Level 5
Level 5Chris Castaldi
343 views17 slides
Canvas & Canvas - Presentation to NYC.js by
Canvas & Canvas - Presentation to NYC.js Canvas & Canvas - Presentation to NYC.js
Canvas & Canvas - Presentation to NYC.js Henry Poydar
681 views33 slides
Developing cross platform desktop application with Ruby by
Developing cross platform desktop application with RubyDeveloping cross platform desktop application with Ruby
Developing cross platform desktop application with RubyAnis Ahmad
18.9K views54 slides

More Related Content

Viewers also liked

MVC for Desktop Application - Part 4 by
MVC for Desktop Application - Part 4MVC for Desktop Application - Part 4
MVC for Desktop Application - Part 4晟 沈
1.2K views26 slides
MVC for Desktop Application - Part 1 by
MVC for Desktop Application - Part 1MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1晟 沈
5.1K views21 slides
MVC for Desktop Application - Part 2 by
MVC for Desktop Application - Part  2MVC for Desktop Application - Part  2
MVC for Desktop Application - Part 2晟 沈
1.6K views13 slides
Request-Response Cycle of Ruby on Rails App by
Request-Response Cycle of Ruby on Rails AppRequest-Response Cycle of Ruby on Rails App
Request-Response Cycle of Ruby on Rails AppNathalie Steinmetz
3.8K views5 slides
Cross-platform Desktop application with AngularJS and build with Node-webkit by
Cross-platform Desktop application with AngularJS and build with Node-webkitCross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkitWittawas Wisarnkanchana
8.6K views12 slides
Web : Request-Response Lifecycle (Ruby on Rails) by
Web : Request-Response Lifecycle (Ruby on Rails)Web : Request-Response Lifecycle (Ruby on Rails)
Web : Request-Response Lifecycle (Ruby on Rails)Rakesh Jha
1.5K views14 slides

Viewers also liked(18)

MVC for Desktop Application - Part 4 by 晟 沈
MVC for Desktop Application - Part 4MVC for Desktop Application - Part 4
MVC for Desktop Application - Part 4
晟 沈1.2K views
MVC for Desktop Application - Part 1 by 晟 沈
MVC for Desktop Application - Part 1MVC for Desktop Application - Part 1
MVC for Desktop Application - Part 1
晟 沈5.1K views
MVC for Desktop Application - Part 2 by 晟 沈
MVC for Desktop Application - Part  2MVC for Desktop Application - Part  2
MVC for Desktop Application - Part 2
晟 沈1.6K views
Request-Response Cycle of Ruby on Rails App by Nathalie Steinmetz
Request-Response Cycle of Ruby on Rails AppRequest-Response Cycle of Ruby on Rails App
Request-Response Cycle of Ruby on Rails App
Nathalie Steinmetz3.8K views
Cross-platform Desktop application with AngularJS and build with Node-webkit by Wittawas Wisarnkanchana
Cross-platform Desktop application with AngularJS and build with Node-webkitCross-platform Desktop application with AngularJS and build with Node-webkit
Cross-platform Desktop application with AngularJS and build with Node-webkit
Web : Request-Response Lifecycle (Ruby on Rails) by Rakesh Jha
Web : Request-Response Lifecycle (Ruby on Rails)Web : Request-Response Lifecycle (Ruby on Rails)
Web : Request-Response Lifecycle (Ruby on Rails)
Rakesh Jha1.5K views
React.js & Om: A hands-on walkthrough of better ways to build web UIs by Adam Solove
React.js & Om: A hands-on walkthrough of better ways to build web UIsReact.js & Om: A hands-on walkthrough of better ways to build web UIs
React.js & Om: A hands-on walkthrough of better ways to build web UIs
Adam Solove5.9K views
How We Do DevOps at Walmart: OneOps OSS Application Lifecycle Management Plat... by WalmartLabs
How We Do DevOps at Walmart: OneOps OSS Application Lifecycle Management Plat...How We Do DevOps at Walmart: OneOps OSS Application Lifecycle Management Plat...
How We Do DevOps at Walmart: OneOps OSS Application Lifecycle Management Plat...
WalmartLabs2.9K views
Ruby application based on http by Richard Huang
Ruby application based on httpRuby application based on http
Ruby application based on http
Richard Huang2.5K views
An introduction to the ruby ecosystem by Geison Goes
An introduction to the ruby ecosystemAn introduction to the ruby ecosystem
An introduction to the ruby ecosystem
Geison Goes1.8K views
The Top 10 Reasons The Ruby Programming Language Sucks by Vishnu Gopal
The Top 10 Reasons The Ruby Programming Language SucksThe Top 10 Reasons The Ruby Programming Language Sucks
The Top 10 Reasons The Ruby Programming Language Sucks
Vishnu Gopal33.6K views
Deployment with Ruby on Rails by Jonathan Weiss
Deployment with Ruby on RailsDeployment with Ruby on Rails
Deployment with Ruby on Rails
Jonathan Weiss4.2K views
MVC for Desktop Application - Part 3 by 晟 沈
MVC for Desktop Application - Part 3MVC for Desktop Application - Part 3
MVC for Desktop Application - Part 3
晟 沈1.4K views
Software Requirements Specification for restaurant management system by SM. Aurnob
Software Requirements Specification for restaurant management systemSoftware Requirements Specification for restaurant management system
Software Requirements Specification for restaurant management system
SM. Aurnob83.9K views
Software Requirement Specification by Niraj Kumar
Software Requirement SpecificationSoftware Requirement Specification
Software Requirement Specification
Niraj Kumar12.6K views
Project Plan And Srs Final by guest24783f
Project Plan And Srs FinalProject Plan And Srs Final
Project Plan And Srs Final
guest24783f8K views
SRS for student database management system by Suman Saurabh
SRS for student database management systemSRS for student database management system
SRS for student database management system
Suman Saurabh62.9K views
Software Requirement Specification by Vishal Singh
Software Requirement SpecificationSoftware Requirement Specification
Software Requirement Specification
Vishal Singh19.2K views

Similar to Make GUI Apps with Shoes

Ruby on Rails by
Ruby on RailsRuby on Rails
Ruby on Railsbryanbibat
2.2K views94 slides
Intro to Ruby - Twin Cities Code Camp 7 by
Intro to Ruby - Twin Cities Code Camp 7Intro to Ruby - Twin Cities Code Camp 7
Intro to Ruby - Twin Cities Code Camp 7Brian Hogan
2.2K views88 slides
An introduction to Ruby by
An introduction to RubyAn introduction to Ruby
An introduction to RubyWes Oldenbeuving
1.1K views61 slides
Ruby by
RubyRuby
RubyKerry Buckley
1.2K views75 slides
The Why Of Ruby by
The Why Of RubyThe Why Of Ruby
The Why Of RubyBrian Hogan
942 views26 slides
NUS iOS Swift Talk by
NUS iOS Swift TalkNUS iOS Swift Talk
NUS iOS Swift TalkGabriel Lim
2.2K views88 slides

Similar to Make GUI Apps with Shoes(20)

Ruby on Rails by bryanbibat
Ruby on RailsRuby on Rails
Ruby on Rails
bryanbibat2.2K views
Intro to Ruby - Twin Cities Code Camp 7 by Brian Hogan
Intro to Ruby - Twin Cities Code Camp 7Intro to Ruby - Twin Cities Code Camp 7
Intro to Ruby - Twin Cities Code Camp 7
Brian Hogan2.2K views
NUS iOS Swift Talk by Gabriel Lim
NUS iOS Swift TalkNUS iOS Swift Talk
NUS iOS Swift Talk
Gabriel Lim2.2K views
Ruby and Rails by Example (GeekCamp edition) by bryanbibat
Ruby and Rails by Example (GeekCamp edition)Ruby and Rails by Example (GeekCamp edition)
Ruby and Rails by Example (GeekCamp edition)
bryanbibat2.5K views
Rails 2010 Workshop by dtsadok
Rails 2010 WorkshopRails 2010 Workshop
Rails 2010 Workshop
dtsadok627 views
Learning To Walk In Shoes by Brian Hogan
Learning To Walk In ShoesLearning To Walk In Shoes
Learning To Walk In Shoes
Brian Hogan1.4K views
Desarrollando aplicaciones web en minutos by Edgar J. Suárez
Desarrollando aplicaciones web en minutosDesarrollando aplicaciones web en minutos
Desarrollando aplicaciones web en minutos
Edgar J. Suárez756 views
Building an e:commerce site with PHP by webhostingguy
Building an e:commerce site with PHPBuilding an e:commerce site with PHP
Building an e:commerce site with PHP
webhostingguy914 views
Introduction to Perl by Dave Cross
Introduction to PerlIntroduction to Perl
Introduction to Perl
Dave Cross3.3K views
Writing Apps the Google-y Way (Brisbane) by Pamela Fox
Writing Apps the Google-y Way (Brisbane)Writing Apps the Google-y Way (Brisbane)
Writing Apps the Google-y Way (Brisbane)
Pamela Fox1.9K views
Python quickstart for programmers: Python Kung Fu by climatewarrior
Python quickstart for programmers: Python Kung FuPython quickstart for programmers: Python Kung Fu
Python quickstart for programmers: Python Kung Fu
climatewarrior7.4K views
Getting Started with Microsoft Bot Framework by Sarah Sexton
Getting Started with Microsoft Bot FrameworkGetting Started with Microsoft Bot Framework
Getting Started with Microsoft Bot Framework
Sarah Sexton1.1K views
Design Patterns the Ruby way - ConFoo 2015 by Fred Heath
Design Patterns the Ruby way - ConFoo 2015Design Patterns the Ruby way - ConFoo 2015
Design Patterns the Ruby way - ConFoo 2015
Fred Heath663 views

More from Brian Hogan

Creating and Deploying Static Sites with Hugo by
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with HugoBrian Hogan
1.2K views65 slides
Automating the Cloud with Terraform, and Ansible by
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and AnsibleBrian Hogan
1.8K views80 slides
Create Development and Production Environments with Vagrant by
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with VagrantBrian Hogan
3.5K views43 slides
Docker by
DockerDocker
DockerBrian Hogan
1.2K views86 slides
Getting Started Contributing To Open Source by
Getting Started Contributing To Open SourceGetting Started Contributing To Open Source
Getting Started Contributing To Open SourceBrian Hogan
867 views34 slides
Rethink Frontend Development With Elm by
Rethink Frontend Development With ElmRethink Frontend Development With Elm
Rethink Frontend Development With ElmBrian Hogan
4.3K views64 slides

More from Brian Hogan(19)

Creating and Deploying Static Sites with Hugo by Brian Hogan
Creating and Deploying Static Sites with HugoCreating and Deploying Static Sites with Hugo
Creating and Deploying Static Sites with Hugo
Brian Hogan1.2K views
Automating the Cloud with Terraform, and Ansible by Brian Hogan
Automating the Cloud with Terraform, and AnsibleAutomating the Cloud with Terraform, and Ansible
Automating the Cloud with Terraform, and Ansible
Brian Hogan1.8K views
Create Development and Production Environments with Vagrant by Brian Hogan
Create Development and Production Environments with VagrantCreate Development and Production Environments with Vagrant
Create Development and Production Environments with Vagrant
Brian Hogan3.5K views
Getting Started Contributing To Open Source by Brian Hogan
Getting Started Contributing To Open SourceGetting Started Contributing To Open Source
Getting Started Contributing To Open Source
Brian Hogan867 views
Rethink Frontend Development With Elm by Brian Hogan
Rethink Frontend Development With ElmRethink Frontend Development With Elm
Rethink Frontend Development With Elm
Brian Hogan4.3K views
Testing Client-side Code with Jasmine and CoffeeScript by Brian Hogan
Testing Client-side Code with Jasmine and CoffeeScriptTesting Client-side Code with Jasmine and CoffeeScript
Testing Client-side Code with Jasmine and CoffeeScript
Brian Hogan4.9K views
FUD-Free Accessibility for Web Developers - Also, Cake. by Brian Hogan
FUD-Free Accessibility for Web Developers - Also, Cake.FUD-Free Accessibility for Web Developers - Also, Cake.
FUD-Free Accessibility for Web Developers - Also, Cake.
Brian Hogan3.2K views
Responsive Web Design by Brian Hogan
Responsive Web DesignResponsive Web Design
Responsive Web Design
Brian Hogan1.3K views
Web Development with CoffeeScript and Sass by Brian Hogan
Web Development with CoffeeScript and SassWeb Development with CoffeeScript and Sass
Web Development with CoffeeScript and Sass
Brian Hogan9.3K views
Building A Gem From Scratch by Brian Hogan
Building A Gem From ScratchBuilding A Gem From Scratch
Building A Gem From Scratch
Brian Hogan1.4K views
Intro To Advanced Ruby by Brian Hogan
Intro To Advanced RubyIntro To Advanced Ruby
Intro To Advanced Ruby
Brian Hogan2.5K views
Turning Passion Into Words by Brian Hogan
Turning Passion Into WordsTurning Passion Into Words
Turning Passion Into Words
Brian Hogan1.1K views
HTML5 and CSS3 Today by Brian Hogan
HTML5 and CSS3 TodayHTML5 and CSS3 Today
HTML5 and CSS3 Today
Brian Hogan2.2K views
Web Development With Ruby - From Simple To Complex by Brian Hogan
Web Development With Ruby - From Simple To ComplexWeb Development With Ruby - From Simple To Complex
Web Development With Ruby - From Simple To Complex
Brian Hogan4.8K views
Stop Reinventing The Wheel - The Ruby Standard Library by Brian Hogan
Stop Reinventing The Wheel - The Ruby Standard LibraryStop Reinventing The Wheel - The Ruby Standard Library
Stop Reinventing The Wheel - The Ruby Standard Library
Brian Hogan9.8K views
Intro to Ruby by Brian Hogan
Intro to RubyIntro to Ruby
Intro to Ruby
Brian Hogan1.7K views
Story-driven Testing by Brian Hogan
Story-driven TestingStory-driven Testing
Story-driven Testing
Brian Hogan1.2K views
Rails and Legacy Databases - RailsConf 2009 by Brian Hogan
Rails and Legacy Databases - RailsConf 2009Rails and Legacy Databases - RailsConf 2009
Rails and Legacy Databases - RailsConf 2009
Brian Hogan6.8K views

Recently uploaded

Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...NUS-ISS
28 views70 slides
PharoJS - Zürich Smalltalk Group Meetup November 2023 by
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023Noury Bouraqadi
120 views17 slides
Special_edition_innovator_2023.pdf by
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdfWillDavies22
16 views6 slides
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica... by
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...NUS-ISS
16 views28 slides
Uni Systems for Power Platform.pptx by
Uni Systems for Power Platform.pptxUni Systems for Power Platform.pptx
Uni Systems for Power Platform.pptxUni Systems S.M.S.A.
50 views21 slides
Top 10 Strategic Technologies in 2024: AI and Automation by
Top 10 Strategic Technologies in 2024: AI and AutomationTop 10 Strategic Technologies in 2024: AI and Automation
Top 10 Strategic Technologies in 2024: AI and AutomationAutomationEdge Technologies
14 views14 slides

Recently uploaded(20)

Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen... by NUS-ISS
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
Upskilling the Evolving Workforce with Digital Fluency for Tomorrow's Challen...
NUS-ISS28 views
PharoJS - Zürich Smalltalk Group Meetup November 2023 by Noury Bouraqadi
PharoJS - Zürich Smalltalk Group Meetup November 2023PharoJS - Zürich Smalltalk Group Meetup November 2023
PharoJS - Zürich Smalltalk Group Meetup November 2023
Noury Bouraqadi120 views
Special_edition_innovator_2023.pdf by WillDavies22
Special_edition_innovator_2023.pdfSpecial_edition_innovator_2023.pdf
Special_edition_innovator_2023.pdf
WillDavies2216 views
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica... by NUS-ISS
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
Emerging & Future Technology - How to Prepare for the Next 10 Years of Radica...
NUS-ISS16 views
Future of Learning - Khoong Chan Meng by NUS-ISS
Future of Learning - Khoong Chan MengFuture of Learning - Khoong Chan Meng
Future of Learning - Khoong Chan Meng
NUS-ISS33 views
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze by NUS-ISS
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng TszeDigital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
Digital Product-Centric Enterprise and Enterprise Architecture - Tan Eng Tsze
NUS-ISS19 views
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu... by NUS-ISS
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
NUS-ISS37 views
.conf Go 2023 - Data analysis as a routine by Splunk
.conf Go 2023 - Data analysis as a routine.conf Go 2023 - Data analysis as a routine
.conf Go 2023 - Data analysis as a routine
Splunk93 views
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors by sugiuralab
TouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective SensorsTouchLog: Finger Micro Gesture Recognition  Using Photo-Reflective Sensors
TouchLog: Finger Micro Gesture Recognition Using Photo-Reflective Sensors
sugiuralab15 views
SAP Automation Using Bar Code and FIORI.pdf by Virendra Rai, PMP
SAP Automation Using Bar Code and FIORI.pdfSAP Automation Using Bar Code and FIORI.pdf
SAP Automation Using Bar Code and FIORI.pdf
Black and White Modern Science Presentation.pptx by maryamkhalid2916
Black and White Modern Science Presentation.pptxBlack and White Modern Science Presentation.pptx
Black and White Modern Science Presentation.pptx
maryamkhalid291614 views
DALI Basics Course 2023 by Ivory Egg
DALI Basics Course  2023DALI Basics Course  2023
DALI Basics Course 2023
Ivory Egg14 views
Web Dev - 1 PPT.pdf by gdsczhcet
Web Dev - 1 PPT.pdfWeb Dev - 1 PPT.pdf
Web Dev - 1 PPT.pdf
gdsczhcet55 views
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor... by Vadym Kazulkin
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
Vadym Kazulkin75 views
Igniting Next Level Productivity with AI-Infused Data Integration Workflows by Safe Software
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Safe Software225 views

Make GUI Apps with Shoes

Editor's Notes

  1. Hi, I’m Brian, and I’m gonna talk to you about Shoes.
  2. No, not THOSE kind of shoes..
  3. This kind of Shoes. A simple framework for writing graphical apps in Ruby. You can use it to write fun stuff like games, or serious stuff like database viewers or a full-blown point-of-sale system.
  4. Highly dynamic, high level, 100% object oriented, 100% open source, and really easy to learn.
  5. The syntax is simple - no unnecessary semicolons or curly braces. The interpreter knows when lines end.
  6. so the type is set when you assign something to the variable.
  7. but once it’s set, it’s set.
  8. here we use the to_s method to turn the integer 25 into the string 25.
  9. This is pretty common though, so Ruby handles it.
  10. It even handles nils gracefully.
  11. Note that the parameters you pass in aren’t typed.
  12. This is a common pattern you see in Java, .Net, PHP, and other object oriented languages. You create instance bariables but you use getters and setters to access them.
  13. Ruby has a built-in way of handling this pattern. It’s a huge time-saver.
  14. Square brackets means array.
  15. Hashes are lookups. You have the curly braces surrounding the hash’s contents.
  16. HashRocket.
  17. Remember... everything is an object.
  18. The simplest Shoes app ever.
  19. Here we can make an alert pop up when we click the button. Notice how easy it is to read that code?
  20. Some methods set colors. Also notice that when we use hashes as parameters, it’s extremely clear to the reader of the code what’s configured. And the order doesn’t matter.
  21. You can create gradients if you create a range
  22. Shoes uses stacks to line elements on top of eachother. If you’ve done HTML, you can think of Stacks as block elements... each one starts on a new line.
  23. Flows simply align next to eachother.
  24. Shoes has helpers for various types of text.
  25. You can grab user input easily
  26. and you can make that input secret. It’s not encrypted in your code though.
  27. You can use a edit box instead of an edit line if you want a multiline input box
  28. You create dropdown lists by passing an array to the list box.
  29. The @names section contains the names we add, and names get added when we click the button.
  30. A window is just another Shoes app. There are some tricks you can use to pass data between the windows, too.
  31. The video player plays mp3s, oggs, avis, movs, flvs and more.
  32. When the app starts, these libraries get installed to the user’s home directory.
  33. This searches YouTube and displays thumbnails of videos it finds that match the search. Clicking a video plays the clip.
  34. This is a simple MP3 player.
  35. So you can load files, save files, and choose colors.
  36. Lots of people make games with Shoes, and it’s a great way to get your kids or younger siblings interested in programmin.g Since the code is open-source, you can learn from it.
  37. You can grab the sample apps you saw here from my repository on GitHub, and you can grab Shoes there too.