Introduction to Rango
Jakub Šťastný aka Botanicus
Monday, November 30, 2009
About me
• Designer & author fo Rango
• Contributor to many OSS include rSpec,
Merb, Usher, Racksh etc
• http://twitter.co...
What is Rango?
• Rack-based lightweight web framework
• As agnostic as possible
• The goal is to provide solid framework f...
Features
• Ruby 1.9-only
• Provides generators, but don’t insist on a
certain structure
• Code reloading by shotgun
• Bund...
• Django terminology (template, view = view,
action in controller)
• Very flexible, you can use just whichever
subset of Ra...
Boot Process
• Script init.rb should setup environment
• Work as runner: ./init.rb myscript.rb
• And as a console: ./init....
Routers
• Usher, Rack-mount
• URLMap, Rack-router
• Rango::UrlHelper for url(:post, id)
• env[“rango.router.params”]
Monda...
Rendering
• You don’t need controllers for it
• Or just include Rango::RenderMixin
Monday, November 30, 2009
Template Inheritance
• Default values for blocks
• Block can return whichever value
• AJAX
Monday, November 30, 2009
Basic Example
Monday, November 30, 2009
Returning values
Monday, November 30, 2009
AJAX
Monday, November 30, 2009
GenericViews
Monday, November 30, 2009
Monday, November 30, 2009
Monday, November 30, 2009
HTTP Errors Handling
Monday, November 30, 2009
Monday, November 30, 2009
Monday, November 30, 2009
Future
• January 2010 in Rango 0.3: Mountable apps
via Pancake: each app can run standalone or
be used as a library (can b...
Links
• GitHub: http://github.com/botanicus/rango
• Wiki: http://wiki.github.com/botanicus/rango
• Issues: http://github.c...
Related Projects: Pupu
• Package manager for media stuff
• JS/CSS frameworks & plugins, icon sets ...
• pupu install autoc...
Related Projects:
Simple-templater
• Highly-opinionated
• Reusable hooks
• Redefine partially or the whole
• ~/.simple-temp...
• Thank you for your attention!
Monday, November 30, 2009
Upcoming SlideShare
Loading in...5
×

Rango

1,569

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,569
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Rango

  1. 1. Introduction to Rango Jakub Šťastný aka Botanicus Monday, November 30, 2009
  2. 2. About me • Designer & author fo Rango • Contributor to many OSS include rSpec, Merb, Usher, Racksh etc • http://twitter.com/botanicus • Currently looking for a job or contract • http://static.101ideas.cz/CV.html Monday, November 30, 2009
  3. 3. What is Rango? • Rack-based lightweight web framework • As agnostic as possible • The goal is to provide solid framework for building sites in Ruby. More robust than Sinatra, but smaller than Rails or Merb. Monday, November 30, 2009
  4. 4. Features • Ruby 1.9-only • Provides generators, but don’t insist on a certain structure • Code reloading by shotgun • Bundler support • Inspired by Django & Merb Monday, November 30, 2009
  5. 5. • Django terminology (template, view = view, action in controller) • Very flexible, you can use just whichever subset of Rango you want and it will work. • No conventions, just recommendations Monday, November 30, 2009
  6. 6. Boot Process • Script init.rb should setup environment • Work as runner: ./init.rb myscript.rb • And as a console: ./init.rb -i • Or both altogether: ./init.rb -i myscript.rb • Start web server: ./config.ru • Rewrite arguments: ./config.ru -s thin Monday, November 30, 2009
  7. 7. Routers • Usher, Rack-mount • URLMap, Rack-router • Rango::UrlHelper for url(:post, id) • env[“rango.router.params”] Monday, November 30, 2009
  8. 8. Rendering • You don’t need controllers for it • Or just include Rango::RenderMixin Monday, November 30, 2009
  9. 9. Template Inheritance • Default values for blocks • Block can return whichever value • AJAX Monday, November 30, 2009
  10. 10. Basic Example Monday, November 30, 2009
  11. 11. Returning values Monday, November 30, 2009
  12. 12. AJAX Monday, November 30, 2009
  13. 13. GenericViews Monday, November 30, 2009
  14. 14. Monday, November 30, 2009
  15. 15. Monday, November 30, 2009
  16. 16. HTTP Errors Handling Monday, November 30, 2009
  17. 17. Monday, November 30, 2009
  18. 18. Monday, November 30, 2009
  19. 19. Future • January 2010 in Rango 0.3: Mountable apps via Pancake: each app can run standalone or be used as a library (can be distributed as gems with assets & templates) Monday, November 30, 2009
  20. 20. Links • GitHub: http://github.com/botanicus/rango • Wiki: http://wiki.github.com/botanicus/rango • Issues: http://github.com/botanicus/rango/issues • Blog: http://botanicus.github.com/rango • Twitter: http://twitter.com/RangoProject Monday, November 30, 2009
  21. 21. Related Projects: Pupu • Package manager for media stuff • JS/CSS frameworks & plugins, icon sets ... • pupu install autocompleter • Helper: pupu :autocompleter • Can handle dependencies Monday, November 30, 2009
  22. 22. Related Projects: Simple-templater • Highly-opinionated • Reusable hooks • Redefine partially or the whole • ~/.simple-templater/rango/project Monday, November 30, 2009
  23. 23. • Thank you for your attention! Monday, November 30, 2009
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×