Ramaze - The Underrated Ruby Web Framework

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.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    Notes on slide 1

    Good afternooon everyone. My name is Luc Castera and I'm going to talk to you about Ramaze today.

    1 Favorite

    Ramaze - The Underrated Ruby Web Framework - Presentation Transcript

    1. The Underrated Web Framework
    2. underrated: Not given enough recognition for its quality
    3. Motivation
    4. What's your experience with Ramaze?
      • a) Never heard of it
      • b) Noob
      • c) Expert
    5. Getting Started
    6. Simple Light Modular
    7. sudo gem install ramaze
    8. http://github.com/manveru/ramaze
    9.  
    10.  
    11. Features
    12. M V C
    13. KISS
    14. Light
        • You can write an application in one file.
    15. Modular
    16. Only one dependency
    17. ORM-agnostic
    18. Templating Engines:
      • Ezamar
      • Erubis
      • Haml
      • Liquid
      • Markaby
      • Maruku
      • Nagoro
      • Redcloth
      • Sass
      • Tagz
      • Tenjin
      • XSLT
      • Amrita
      • Builder
      • Remarkably
    19. Stable
        • ...started more than 2 years ago.
    20. Well Documented
    21. Beautiful Code
    22. BDD
    23. Ruby 1.9
        • Most bugs fixed in 48 hours.
    24. IRC Population
    25. Basics
    26. Controllers
    27. MainController maps to '/'
    28. BlueController maps to '/blue'
    29. ...unless you use map
    30. _ .
    31. Action methods accept arguments via URL
    32. http://localhost:7000/archive? page=2 request[:page] == '2'
    33. Errors redirect to error action
    34. Routing (String Routers) Ramaze::Route [ '/foo' ] = '/bar' # '/foo' => '/bar'
    35. Routing (Regex Routers) Ramaze::Route [ %r!^/(d+).txt$! ] = "/text/%d" # '/123.txt' => '/text/123'
    36. Routing Ramaze::Route [ 'name of route' ] = lambda { |path, request| '/bar' if path == '/foo' and request[ :bar ] == '1' } (Lambda Routers) # '/foo' => '/foo' # '/foo?bar=1' => '/bar'
    37. Testing
    38. Views
    39. Ezamar Erubis (bundled) (default) (my favorite) (plenty of other choices)
    40. inline vs. external
    41. START NO YES Run return value of action through templating engine Send to browser External Template Is there an external template?
    42. Instance variables set in the action can be accessed in template (just like in Rails)
    43. (convention) /view
    44. (configuration) view_root 'my_templates'
    45. Layouts
    46. # apply to all actions except index layout :layout deny_layout :index # apply only to index layout :layout => [ :index ] Layouts
    47. Ezamar Very simple reimplementation of the Templating-engine found in Nitro. <?r rubycode ?> == <% rubycode %> #{ rubycode } == <%= rubycode %>
    48. Ezamar::Element
    49. Ezamar::Element
    50. Models
    51. That's up to you to figure out...
    52. ActiveRecord DataMapper Sequel Og DBI
    53. Ramaze::Store
    54. Helpers
    55. Default Helpers
      • CGI
      • File
      • Link
      • Redirect
      • Session/Flash
      Optional Helpers
      • Aspect
      • Auth
      • Cache
      • Identity (OpenID)
      • Pager
      • Form
      • Partial
      • Captcha
      • etc...
      Custom Helpers
    56. Link Helper R(AdminController, :index) => /admin/index Rs(:index) => /admin/index Rs(:/) => / A('text') => <a href=”/text”>text</a> A('foo/bar') => <a href=”/foo/bar”>foo/bar</a> A('Home', :href => Rs(:/)) => <a href=”/”>Home</a>
    57. Aspect Helper Allows you to wrap different Actions on your Controller with code.
    58. Extras
    59.  
    60. Deployment
      • Adapters exist for:
      • Thin
      • Mongrel
      • Evented Mongrel
      • Webrick
      • CGI
      • FCGI
    61. Deployment thin start --servers 1 --socket /tmp/thin-socket -R start.ru
    62. Two Things
      • Options::DSL
        • Pretty neat DSL to store global options
        • lib/ramaze/option/dsl.rb
      • Poor Man's Fibers
        • Implemented by Aman Gupta
        • http://gist.github.com/4631
        • lib/ramaze/snippets/fiber.rb
    63. Live Coding Small Blog Example: http://pastie.org/319647
    64. Where to learn more
      • http://www.ramaze.net
      • IRC: #ramaze
      • http://dambalah.com
      • github.com/ramaze
      • http://blog.purepistos.net
    65. RTFC
    66. Thank you. Questions?

    + luccasteraluccastera, 11 months ago

    custom

    1805 views, 1 favs, 3 embeds more stats

    Slides from my talk at RubyConf 08 on Ramaze

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 1805
      • 1752 on SlideShare
      • 53 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 34
    Most viewed embeds
    • 51 views on http://dambalah.com
    • 1 views on http://74.125.43.132
    • 1 views on http://bummerware.tumblr.com

    more

    All embeds
    • 51 views on http://dambalah.com
    • 1 views on http://74.125.43.132
    • 1 views on http://bummerware.tumblr.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