The Rails Engine That Could

1,785 views

Published on

That talk covered a successful utilization of Rails Engines in Rails 3 to modularize MVC features as reusable components. These components provide the best of both worlds, DRY reusable and easy to maintain code that is also extensible and customizable in every way necessary.

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,785
On SlideShare
0
From Embeds
0
Number of Embeds
791
Actions
Shares
0
Downloads
11
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

The Rails Engine That Could

  1. 1. The Rails Engine That Could!!! ChoooChooo!!!<br />Andy Maleh - Grouptiva<br />
  2. 2. Problem<br />Difficulty reusing functionality cutting across:<br />Models<br />Views<br />Controllers<br />Assets (JS, CSS, Images)<br />Duplication across all web application layers.<br />
  3. 3. Solution<br />Break common behavior into Rails Engines<br />Customize models/controllers/helpers in each project where needed by reopening classes<br />Customize Rails views in each project as needed by overriding templates<br />Link to Rails Engines in Gemfile via Git repo<br />
  4. 4. Example<br />
  5. 5. Benefits<br />Code reuse and productivity<br />Easier more organized maintainability<br />Minimize ripple effect when making changes<br />Project tests run faster by offloading some to Rails engines<br />
  6. 6. Cost<br />Overhead in establishing a new Rails Engine gem project<br />More complexity<br />Have to upgrade ref numbers in Gemfile on every change (could be offset by symlinking)<br />
  7. 7. More Info<br />http://edgeapi.rubyonrails.org/classes/Rails/Engine.html<br />http://andymaleh.blogspot.com<br />

×