html5-img
1 / 18

A Little Bit Of Merb

So what is this Merb stuff?. A Little Bit Of Merb. Merb = Mongrel + Embedded Ruby. A Little Bit Of Merb. Created by Ezra Zygmuntowicz (http://brainspl.at). A Little Bit Of Merb. When you really, really, need performance. A Little Bit Of Merb. Why You Need Some Merb Mini-applications

hagen
Download Presentation

A Little Bit Of Merb

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. So what is this Merb stuff? A Little Bit Of Merb

  2. Merb = Mongrel + Embedded Ruby A Little Bit Of Merb

  3. Created by Ezra Zygmuntowicz (http://brainspl.at) A Little Bit Of Merb

  4. When you really, really, need performance A Little Bit Of Merb

  5. Why You Need Some Merb Mini-applications Servicing API calls File uploading Improving performance intensive sections of Rails applications A Little Bit Of Merb

  6. Some Similarities To Rails Model View Controller Project files structured like Rails ActiveRecord(migrations, many plugins work) Testing (Test::Unit, RSpec) A Little Bit Of Merb

  7. Some Differences From Rails No thread blocking Faster routing View rendering A Little Bit Of Merb

  8. A Little Bit Of Merb Controller class UserLogin < Application def new render end def create @result = User.authorized?(params[:user_name], params[:user_password]) render end end

  9. A Little Bit Of Merb View Rendering • HTML (new.herb) • XML (create.xerb) • JavaScript (no_example_today.jerb)

  10. A Little Bit Of Merb HTML View (new.herb) <form method="post" action="/userlogin/create"> <p><%= Time.now.to_s %></p> <p><label for="user_name">user_name</label> <input type="text" id="user_name" name="user_name"></p> <p><label for="user_password">user_password</label> <input type="password" id="user_password" name="user_password"></p> <p><input type="submit" value="User Login"></p> </form>

  11. A Little Bit Of Merb XML View (create.xerb) xml.userlogin { xml.result @result }

  12. How to get Merb: gem install merb A Little Bit Of Merb

  13. How to generate a new Merb application merb -g myapp A Little Bit Of Merb

  14. How to run a Merb application cd /path/to/myapp merb A Little Bit Of Merb

  15. How to start a Merb cluster merb -p 3000 -c 3 A Little Bit Of Merb

  16. A Little Bit Of Merb Smoking Merb

  17. Sample Applications mrblog http://merb.devjavu.com/projects/merb/browser/mrblog/trunk RESTful sample http://svn.depixelate.com/applications/invoice_tracker/ A Little Bit Of Merb

  18. Occasional blogging about Merb at the Dead Programmer Society www.deadprogramersociety.com A Little Bit Of Merb

More Related