Merb Presentation
-
Upload
gueste4d7fc -
Category
Technology
-
view
1.335 -
download
2
Transcript of Merb Presentation
![Page 1: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/1.jpg)
merb“came for Rails,stayed for Ruby”
![Page 2: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/2.jpg)
/whois merb
•MVC web framework
•kinda like rails
•ezmobius & wycats
•started as a hack
![Page 3: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/3.jpg)
![Page 4: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/4.jpg)
•http://pastie.org/14416
•3 parts: core, more, plugins
•rack based
•thread safe
•less opinions
![Page 5: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/5.jpg)
•ORM agnostic
•view agnostic
•JS agnostic
•“no code is faster than no code”
![Page 6: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/6.jpg)
merb-core
•actionpack light
•routing, controllers, bootloader, rack
•merb-guts
![Page 7: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/7.jpg)
merb-more•the rest of actionpack, with a little activesupport
•merb-mailer, merb-haml, merb-action-args
•often useful, but not critical
![Page 8: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/8.jpg)
merb-plugins
•sometimes useful
•important enough, maintained by merb team
•merb_activerecord, merb_helpers, merb_test_unit
![Page 9: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/9.jpg)
0.9.Xthe great rewrite
![Page 10: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/10.jpg)
•merb started in ’06
•complete(ish) rewrite beginning Jan ’08
•moved to github
•defined public/private API’s
•rack support
![Page 11: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/11.jpg)
done right’s
![Page 12: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/12.jpg)
render/display
•what the action returns, the client is served
•explicit
•render a view
•display a resource
![Page 13: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/13.jpg)
![Page 14: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/14.jpg)
![Page 15: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/15.jpg)
merb-action-args
•allows an action to receive parameters as arguments
•uses ParseTree
![Page 16: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/16.jpg)
![Page 17: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/17.jpg)
regex routes
•complex routes that don’t always fit the slash as a separator pattern
•routing based on patterns rather than name arguments
![Page 18: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/18.jpg)
![Page 19: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/19.jpg)
merb && rspec•lots of custom helpers & matchers
•controller spec’ing is super easy
![Page 20: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/20.jpg)
•view matchers use Hpricot
![Page 21: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/21.jpg)
we ain’t got no rspec
•merb_test_unit
•works great with shoulda
•merb_stories
![Page 22: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/22.jpg)
distributed MVC•Aaron Wheeler documented it first in merb
•used in feather(blog) for plugin system
•Models, Views, Controllers in one package
![Page 23: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/23.jpg)
merb-slices
•Engines that suck less
•Implemented in the public API
•authentication slice: merb-auth, can_has_auth
•we like can_has_auth
![Page 24: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/24.jpg)
end•wiki.merbivore.com
•#merb on freenode
•merb on groups.google.com
•planet.merbivore.com
•Merb + DataMapper @ LSRC
(or is it)
![Page 25: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/25.jpg)
merb-cache
•almost ready, not yet
•fundamental store: MemcachedStore, FileStore
•strategy store: GzipStore, PageStore, ActionStore
![Page 26: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/26.jpg)
![Page 27: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/27.jpg)
![Page 28: Merb Presentation](https://reader033.fdocuments.us/reader033/viewer/2022052410/555930b2d8b42a4f3d8b4927/html5/thumbnails/28.jpg)
•Complex stores that implement advanced caching techniques
•agilewebdevelopment.com/plugins/action_cache
•www.igvita.com/2008/02/11/nginx-and-memcached-a-400-boost/