Merb

595 views

Published on

presented in Ruby Tuesday 12/23

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
595
On SlideShare
0
From Embeds
0
Number of Embeds
8
Actions
Shares
0
Downloads
8
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Merb

  1. 1. merb contagion @ Ruby Tuesday, Taiwan
  2. 2. Ruby Web Framework • The one and the only Rails • Actually, there are others... • rmaze • mack • sinatra • camping
  3. 3. merb and....... • Scalability • Flexibility • Awesome Features
  4. 4. Speed Anything that slows merb down is a bug !
  5. 5. Size • No Code is Better then No Code • LOC • Rails 24K~50K • merb 10K~17K
  6. 6. Simplicity • No Magic • Magic is for your JOB security... • Hacker’s framework ? • makes you a hacker • I Grok it !!
  7. 7. Call Stack • Shorter Call Stack • Rails 41~58 (more with plugins) • merb 27~32
  8. 8. Adaptablility • ORM - datamapper, active record, sequeal • Javascript - jquery, prototype • testing - runit, rspec • template engine - erb, haml
  9. 9. Modularity • Rails 6 gems • merb 18 gems • merb-core • merb-more • datamapper 9 gems
  10. 10. Merb API • private Don’t touch them • public • plugin (overridable)
  11. 11. Plugin • plugin is simply a gem • dependency management ! • Hooks • APIs • no more alias_method_chain
  12. 12. Flexiable file layout • fullstack merb-gen app • core only merb-gen core • simple merb-gen flat • singel file merb-gen very_flat
  13. 13. Awesome Features • Exception handling • Run later • sexy route • Content Negotiation • Slices • Parts
  14. 14. Exception • raise NotFound • status = 404 • controller: exceptions • action: not_found • Not Log in • status = 401 • controller: exceptions • action: unauthenticated
  15. 15. Run Later
  16. 16. Sexy route
  17. 17. Content Negotiation
  18. 18. Slices • mini application • like Django’s app • like Rails’s Engine • reusability haven! • ex. merb-auth, merb-blog, merb-cms
  19. 19. Parts • a component • component in rails1.0 • before filter + partial
  20. 20. Q&A

×