Your SlideShare is downloading. ×
Ramaze
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Ramaze

4,075
views

Published on

Proudcloud Talks presentation

Proudcloud Talks presentation

Published in: Technology

0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,075
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
8
Comments
0
Likes
3
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. RamazeAlternative Ruby Framework(ra-ma-ze)
    andrei@proudcloud.net
  • 2. My Background
    Used Ramaze in 2009 as an alternative to Rails
    Heterogenous team of developers
    Some ruby first-timers
    Problems/resistance with Rails conventions
    Built a production app serving 10k+ users
  • 3. Ramaze
    Simple, light, modular web framework
    MVC
    Agnostic
    Database/ORM (no default)
    Templating (default Etanni)
    Based off of Nitro
    No set structure
    prototypes
    Dependency: Rack
  • 4. Installation
    http://github.com/ramaze/ramaze
    Maintained by 4 guys
    gem install ramaze
    Innate
    Core
    RamazeInnate  Rack
    Innate = Sinatra, Ramaze = Padrino
  • 5. Hello World
    Listing 1: hello.rb
    Simple. One file(4kb) vs Rails (900kb).
  • 6. Run
    ramaze start
    ruby hello.rb
    thin start
    Pow, Passenger, Mongrel etc
    Rack based
  • 7. POLS
    Principle of Least Surprise
    Law of Least Astonishment
    It should work because I made it work
    No “magic”
  • 8. Freedom
    No set structure for organizing your files
    Flexible
    BUT: Could lead to messed up code
    Use what makes most sense to you (and your team)
    Sensible defaults
    Prototypes
    ramaze create project
  • 9. Views
    Listing 2: view/index.rhtml (using Erubis)
    By default Ramaze looks for the template in the path called ‘view’, but can be
    overriden via setting Ramaze.options.views = ‘view_path’
    Add @message in controller
    You could also add inline views in your really wanted to.
  • 10. Models
    Use any ORM
    Sequel
    Active Record
    Standalone classes
  • 11. Models (cont.)
    Simple Model: in hello.rb
    *Modify controller to use this
  • 12. Organizing your code
    Use prototype
    Allows opportunity to refactor and build our code as we go along
    Ex:
    Remove model and controller from hello.rb into separate files
    Ramaze.acquire – broken in 1.9.2 as of 5/2011
  • 13. Routing
    controllers/another_controller.rb
    Looks for views in ‘view/bye/’ view_path/route_name
  • 14. Routing (cont.)
    You can also specify routes via configuration
    regex routes
  • 15. Other Stuff
    Layouts
    Placed in view path
    Just call layout ‘layout_name’ in controller to set
    Helpers
    paginate
    user
    flash
    https://github.com/Ramaze/ramaze/tree/master/lib/ramaze/helper
    Middlewares
  • 16. Great things about Ramaze
    Low memory usage
    Cheaper than Rails
    Uses 60% less memory vsPadrino
    Freedom
    Simple codebase
    Focus on Ruby, rather than the framework
  • 17. Cons
    Outdated documentation
    Slightly slower compared to Padrino
    Can’t use Rails specific gems
    You can but with slightly more work
  • 18. Still Great Things
    Good community
    Freenode #ramaze
    Google groups
    Know exactly what your code does
    Know where to place/find your code (because you organized it)
  • 19. Conclusion
    Great to use for smallish projects
    When server memory is an issue
    Great way to help transition developers from other technologies who are used to their “own way of doing things”
    Let’s you focus on Ruby
    Good alternative to Rails, use it when you are sick of Rails
    In the end, Ramaze, Rails, Sinatra are tools: It’s what’s in your heart that counts, use frameworks that make you happy.
  • 20. END
    Questions?

×