• Like

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.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,338
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
2
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Introduction to Rango Jakub Šťastný aka Botanicus Monday, November 30, 2009
  • 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. 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. 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. • 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. 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. Routers • Usher, Rack-mount • URLMap, Rack-router • Rango::UrlHelper for url(:post, id) • env[“rango.router.params”] Monday, November 30, 2009
  • 8. Rendering • You don’t need controllers for it • Or just include Rango::RenderMixin Monday, November 30, 2009
  • 9. Template Inheritance • Default values for blocks • Block can return whichever value • AJAX Monday, November 30, 2009
  • 10. Basic Example Monday, November 30, 2009
  • 11. Returning values Monday, November 30, 2009
  • 12. AJAX Monday, November 30, 2009
  • 13. Generic Views Monday, November 30, 2009
  • 14. Monday, November 30, 2009
  • 15. Monday, November 30, 2009
  • 16. HTTP Errors Handling Monday, November 30, 2009
  • 17. Monday, November 30, 2009
  • 18. Monday, November 30, 2009
  • 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. 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. 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. Related Projects: Simple-templater • Highly-opinionated • Reusable hooks • Redefine partially or the whole • ~/.simple-templater/rango/project Monday, November 30, 2009
  • 23. • Thank you for your attention! Monday, November 30, 2009