Ruby Video
Talks
Speakers
Events
Topics
Leaderboard
Sign in
Talks
Speakers
Events
Topics
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
With Rails 4.0 killing off the humble plugin, there is never a better time to learn how to create reusable code using Engines. Creating an engine can be as simple as adding a model, or a complex as an entire content management system. Using the Asset Pipeline, even javascript and css files can be packaged and shared, making projects cleaner and more maintainable than ever before. This talk will cover how developers can create their own engines, to add new controllers/models/views, rake tasks and/or generators. It will cover how engines can interact with Rails having their own initializers and middleware. Finally, based on our experiences converting BrowserCMS and its entire module ecosystem to work as mountable engines, this talk will cover how to make engines that are designed to work together, extend each other engine's behavior and make it easy for developers to upgrade when you release new versions. Help us caption & translate this video! http://amara.org/v/FGaF/
Date
Summarized using AI?
If this talk's summary was generated by AI, please check this box. A "Summarized using AI" badge will be displayed in the summary tab to indicate that the summary was generated using AI.
Show "Summarized using AI" badge on summary page
Summary
Markdown supported
The video titled "Creating Mountable Engines," presented by Patrick Peak at Rails Conf 2013, delves into the concept of engines in Ruby on Rails, particularly following the significant changes introduced in Rails 4.0 that rendered plugins obsolete. The discussion begins with an audience interactive segment regarding their familiarity with engines, which sets the stage for a detailed exploration of why engines matter and how developers can create and leverage them effectively. Key Points Discussed: - **Understanding Engines**: Engines are analogous to mini Rails applications that can be packaged as gems and added to other Rails applications, allowing for easier code reuse and modularization. - **Problems with Duplication**: The speaker emphasizes that duplication across similar applications is common, leading to challenges in maintenance and upgrades. Engines provide a way to encapsulate common features, reducing duplicative coding. - **Creating an Engine**: Peak walks through the basics of building an engine, using a sample name "RubyPress" for a hypothetical content management system. He covers the command to generate an engine, the structure of the generated code, and key components like controllers, routing, and migrations. - **Configuration and Middleware**: Each engine can define its own middleware and initializers, allowing for customization and enhancements that integrate seamlessly into the Rails ecosystem. - **Asset Pipeline**: With Rails' Asset Pipeline, engines can manage their assets like JavaScript and CSS, making it easier to package view-related code without manual copying of files. - **Collaboration of Engines**: The talk highlights the challenges of making different engines work together, primarily due to conflicting dependencies, varying security models, and mismatched user interfaces. For engines to coexist nicely, the examples encourage creating common conventions and robust dependency management practices. Significant Examples: - The discussion references well-known engines such as Spree for e-commerce and Devise for authentication to illustrate practical implementations. - The talk also cites the common practice in the BrowserCMS project demonstrating how teams can utilize engines effectively in a real-world context. Conclusions: The speaker concludes that when properly designed, engines can enhance code reusability, streamline the development process, and improve maintainability in Rails applications. Peak emphasizes that as the community matures in its use of engines, it is essential to develop best practices for dependencies and security to foster a healthier ecosystem of Rails engines.
Suggest modifications
Cancel