Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Ifat explores several common Ruby design patterns and best practices, and how they can make your code more encapsulated, clear and simple to work with.
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
In the talk titled "Go Pro with PORO," Ifat Ribon explores Ruby design patterns and best practices aimed at enhancing code clarity, encapsulation, and simplicity. As a principal architect at Launchpad Lab, Ifat shares insights derived from extensive exposure to various codebases and collaboration with developers across America. She presents a framework to discuss different design patterns, emphasizing three key themes: - **Encapsulation**: Ifat describes how to organize code and the boundaries of business logic, highlighting that there are valid approaches to encapsulation, whether in a single file or spread across multiple components. - **Clarity**: She stresses the importance of writing clear code, which helps not only the current developer but also future ones returning to the codebase. This involves choosing patterns that are easily understandable. - **Simplicity**: If a design pattern feels overly complex, Ifat encourages stepping back to identify a simpler solution that aligns better with the developer's style and needs. Throughout her talk, Ifat delves into several common design patterns, introducing them in an organized manner, including: - **Database Wrappers**: These provide a simplified interface for database interactions, often using Object-Relational Mapping (ORM) to abstract complexity. - **Modules**: Ifat explains how modules can encapsulate related methods and functionalities without instantiating objects. This is notably useful for organizing concerns in models, controllers, and views. - **Plain Old Ruby Objects (POROs)**: Ifat defines POROs as any Ruby class that does not directly interface with a database. She categorizes them into: - **Service Classes**: Focus on encapsulating business logic, often with a method named "perform" to execute functionality. - **API Wrappers**: Reusable classes that handle interactions with external APIs, ensuring clean and manageable code. - **Virtual Domain Models**: Represent transient data without persisting it in a database, suitable for handling data from APIs. - **Request and Presentation Objects**: Aim to simplify the application structure, enhancing single-responsibility principles and easing testing. Ifat concludes her talk by highlighting the diverse ways developers can apply these patterns in their projects and invites attendees for further discussion. The overarching takeaways emphasize the importance of vocabulary in coding practices and the need for discussions around improving code architecture.
Suggest modifications
Cancel