Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MVC Gems

776 views

Published on

Published in: Technology
  • Be the first to comment

MVC Gems

  1. 1. MVC Gems Kirill Shatrov, Evrone.com Feb 2012, Helsinki
  2. 2. Kirill Shatrovshatrov@me.com / @kiiir
  3. 3. resque web interfacetolk Spree Deviserails_admin active_admin
  4. 4. Inboxes• DRY each time• Private and group messaging ability for Rails 3 app• Pub/sub engine (live chat!)• Read/unread flags http://github.com/evrone/inboxes
  5. 5. Polemic• DRY each time again :)• Comments for any AR object• Pub/sub (realtime comments, coming soon) http://github.com/evrone/polemic
  6. 6. Requirements• Rails >= 3.1 (Asset Pipeline)• Devise• CanCan• Faye for pub/sub (optional)
  7. 7. ::Rails::Engine• its own models, controllers, views• its own middleware stack (3.1+)• routes (3.1+)• locales• config/environment.rb (3.1+)• application config
  8. 8. What’s inside?
  9. 9. What’s inside?MVC + helpers + routes
  10. 10. What’s inside?
  11. 11. Problems?• Tests over dummy app• Hard to test features that interact with Rails• Hard to be flexible• Troubles with controllers from Rails Engine
  12. 12. Engine controllers?
  13. 13. Engine controllers?
  14. 14. Tools• Bundler• bundle gem foo & rake release (no Jeweler!)
  15. 15. Travis CI +=
  16. 16. Hints• Look inside source of other similar gems• Be friendly with tests, at least models• Review Readme after each release and write wikis/tutorials
  17. 17. Open sourcewill save the world
  18. 18. Thank you!

×