Tying Your Shoes

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

42 comments

Comments 1 - 10 of 42 previous next Post a comment

  • + staryueng staryueng 2 years ago
    prety nice
  • + hlame Murray Steele 2 years ago
    Presenter Notes for Slide 42:
    All the images I used came from Flickr. Thanks to these photographers for making my terrible content look good.
  • + hlame Murray Steele 2 years ago
    Presenter Notes for Slide 41:
    So, that’s it.

    Hopefully I’ve whetted your appetite for Shoes, if you want to know more there are excellent resources out there about shoes. First is the shoes manual, which is built into every shoes app. Press cmd m to make it appear. Then go and get a copy of “nobody knows shoes” (the most superb manual for a programming library, ever). Then explore the rest.

    I really recommend it.
  • + hlame Murray Steele 2 years ago
    Presenter Notes for Slide 40:
    Shoes has an excellent in built packaging feature. From the “Package” menu of any Shoes app you can bundle up your Shoes code, along with Shoes and dependencies, as a Windows, OS X, Linux or Shoes application. Shoes has a cross-platform bundle called SHY which you can use instead.

    It’s a really simple and nice way of bundling your code, much easier than any other mechanism I’ve used in the past, and it’s awesome that it’s built in.
  • + hlame Murray Steele 2 years ago
    Presenter Notes for Slide 39:
    You can extend Shoes itself and this lets you define url endpoints which are methods in your Shoes class that you can then visit with the “visit” method. Visit takes a url, relative or absolute. You can have regexp’s in the URL and the groups become args to the methods called. The main advantage here is then being able to put your Shoes code into multiple files.

    It’s not clear to me the full power of advantage of this, except for the fact that the urls you visit can be absolute, and thus you can put shoes apps online to perhaps combine the power of a desktop app with the simplicity of updating via a central web app.

    (Note, this example code came from a sample app that ships with Shoes)
  • + hlame Murray Steele 2 years ago
    Presenter Notes for Slide 38:
    Speaking, as I was just breifly about tidying up the code and so on, I should point out that all the code I’ve shown you has been from one file: talon.rb. That’s not to say that you can’t organise your code better. Shoes has some interesting features that could help this. I have to say, I’ve not fully explored this aspect of Shoes, so I’m just letting you know that it’s out there...
  • + hlame Murray Steele 2 years ago
    Presenter Notes for Slide 37:
    Shoes has the ability to create custom controls, so if you need a dial or big flippy switch as a UI element, you can combine the drawing stuff I just mentioned and the existing controls and layouts in a class that extends from Shoes::Widget. You can then use these custom widgets inside your Shoes app and not have to worry about repeating code, or having code in the wrong place cluttering up your main logic.

    If I had the time I’d probably have tried to make the login UI in Talon a widget so I can encapsulate all the display and shaky head logic in one place.
  • + hlame Murray Steele 2 years ago
    Presenter Notes for Slide 36:
    I mentioned at the start that Shoes is influenced by Nodebox and Processing. Everything is a canvas and it has some really powerful animation (which I touched on) and drawing (which I didn’t) features. In recent builds _why has been building in more and more features for doing really neat graphical stuff (like filters and alpha transparency and so-on). Thankfully also without sacrificing the simplicity of the API. Remember, the goal of this is to power Hackety Hack, a tool for teaching kids to program. Adding this to the fact that you can do pixel perfect layout of elements means you could do some stunning looking animated UIs. For example, if you wanted a random name generator you could draw a hat that spits out stars and then picks a random name. Or... something good.
  • + hlame Murray Steele 2 years ago
    Presenter Notes for Slide 35:
    So... I could go on and show you how I’ve built the rest of Talon. (It does connect to Twitter and get a list of your friends tweets and even allow you to post a tweet back to Twitter). But I won’t, I don’t have much time, and I want to briefly mention some other stuff that Shoes does (that I didn’t really have the time to build into Talon).

    Also, the rest of the Talon code doesn’t really show off anything new, apart from perhaps some other style attributes, or UI elements.
  • + hlame Murray Steele 2 years ago
    Presenter Notes for Slide 34:
    That’s what this timer block is for. Timer blocks take an arg to say how many seconds in the future you want the block to fire, and then when those seconds are up, the block fires. We use this block to stop the animation. Remember, everything in Shoes returns what you just built, even animations and timers. Timers (that’s what these essentially are) can then be started or stopped. There’s also the every timer, for events you want to fire every so often

Comments 1 - 10 of 42 previous next

Post a comment
Embed Video
Edit your comment Cancel

11 Favorites

Tying Your Shoes - Presentation Transcript

  1. A Whirlwind Guidev To Tying Yourz Shoes
  2. What Is ShoesT?
  3. A Little Historyd
  4. A Little Historyd
  5. A Little Historyd
  6. A Little Historyd
  7. This Is Familiarl
  8. gem installe shoes
  9. gem installe shoes NO!
  10. How Do I Get Shoesv? http://shoooes.net
  11. How Do I Get Shoesv? http://shoooes.net beware the “o”s
  12. How Do I Get Shoesv? http://shoooes.net 123 beware 1 3 the “o”s 2 3 “o”s in shoooes 3 eyelets in a shoe
  13. Shoes Is ForhEveryone
  14. How To TiepYour Shoes Loop It, Swoop It & Pulla
  15. Shoes.app do end
  16. Shoes.app :title => 'Talon' do background '#fff' end
  17. Shoes.app :title => 'Talon' do background '#fff' background 'talon.jpg', :bottom => 0, :right => -20 flow :width => '100%' do background '#df9', :curve => 12 title 'Talon', :stroke => '#691FFF', :align => 'center' end end
  18. stack :margin => ['10%', '15%', '10%', '0px'] do background '#df9', :curve => 12 title \"Who goes there?\", :stroke => '#691FFF', :align => 'center' # ... entries and buttons go here end
  19. S T A C K S
  20. S T A C K S
  21. Flowsi
  22. flow do stack :width => '150px' do para 'Nom de tweet' end @user_box = edit_line :width => '-170px' stack :width => '150px' do para 'Sekrit' end @pass_box = edit_line :width => '-170px', :secret => true end button 'That is who I am!', :width => '100%' do do_login end
  23. Shoes & Gemsz
  24. Shoes.setup do gem 'twitter' end require 'twitter'
  25. Shoes.setup do gem 'twitter' end require 'twitter'
  26. def do_login user = @user_box.text pass = @pass_box.text @twitter = Twitter::Base.new(user, pass) begin @twitter.verify_credentials @login.hide show_logged_in_timeline rescue Twitter::CantConnect => e incorrect_login end end
  27. def incorrect_login if @incorrect_login_anim.nil? @incorrect_login_anim = animate do |i| @login.displace((Math.sin(i) * 6).to_i, 0) end end @incorrect_login_anim.start timer(2) do @incorrect_login_anim.stop @login.displace(0,0) end end
  28. def incorrect_login if @incorrect_login_anim.nil? @incorrect_login_anim = animate do |i| @login.displace((Math.sin(i) * 6).to_i, 0) end end @incorrect_login_anim.start timer(2) do @incorrect_login_anim.stop @login.displace(0,0) end end
  29. def incorrect_login if @incorrect_login_anim.nil? @incorrect_login_anim = animate do |i| @login.displace((Math.sin(i) * 6).to_i, 0) end end @incorrect_login_anim.start timer(2) do @incorrect_login_anim.stop @login.displace(0,0) end end
  30. Tying More Complicatedd Knots
  31. Drawingk
  32. Custom Controlsv
  33. Organising YourwShoes
  34. Organising YourwShoes class Book < Shoes url '/', :index url '/incidents/(\\d+)', :incident def index incident(0) end # More code goes here...
  35. Packaging YouriApp
  36. Find Out Moreb “shoes --manual” or ⌘m in a Shoes app http://hackety.org/press - Nobody Knows Shoes http://shoooes.net - the main place http://the-shoebox.org - gallery of apps http://github.com/why/shoes - code and wiki http://hackety.org - why’s blog http://github.com/hlame/talon - my awesome app
  37. Without Whoma tying shoes - http://flickr.com/photos/fil/2127072888/ paint background - http://flickr.com/photos/shaireproductions/2315054854/ html book - http://flickr.com/photos/ianlloyd/2542795166/ ruby gemstone - http://flickr.com/photos/alphadesigner/354936159/ 3-eyelet brogue - http://flickr.com/photos/diamondgeyser/3028055172/ old poster - http://flickr.com/photos/ulikleafar/2146994022/ matches - http://flickr.com/photos/bitzi/265057397/ ruby books - http://flickr.com/photos/maguisso/1028969342/ jewelled shoes - http://flickr.com/photos/roaz/2279682461/ packages - http://flickr.com/photos/pleasewait/476789507/ drawing - http://flickr.com/photos/squintlog/272876653/ control panel - http://flickr.com/photos/electropod/2922782588/

+ Murray SteeleMurray Steele, 2 years ago

custom

6706 views, 11 favs, 9 embeds more stats

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 6706
    • 6681 on SlideShare
    • 25 from embeds
  • Comments 42
  • Favorites 11
  • Downloads 463
Most viewed embeds
  • 14 views on http://www.slideshare.net
  • 3 views on http://tecnologiaeneljovellanos.blogspot.com
  • 2 views on http://pedagogiaenlablogesfera.blogspot.com
  • 1 views on http://74.125.43.100
  • 1 views on http://blog.slideshare.net

more

All embeds
  • 14 views on http://www.slideshare.net
  • 3 views on http://tecnologiaeneljovellanos.blogspot.com
  • 2 views on http://pedagogiaenlablogesfera.blogspot.com
  • 1 views on http://74.125.43.100
  • 1 views on http://blog.slideshare.net
  • 1 views on http://test-embed.utagoe.com
  • 1 views on http://localhost:9670
  • 1 views on http://www.aomtest11.com
  • 1 views on http://periodismoparaperiodistas.blogspot.com

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories