Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
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 video titled "Extracting Logic From Templates With Hanami Views" presented by Sebastian Wilgosz at the wroc_love.rb 2024 event, the speaker addresses a common challenge in the Ruby ecosystem related to maintaining logic-free views. The presentation focuses on the Hanami framework, an alternative to Ruby on Rails, and highlights its modular architecture that promotes cleaner views and better logic encapsulation. Key points discussed include: - **Introduction to Hanami**: Hanami is introduced as a flexible Ruby framework with a small market share compared to Rails, yet it showcases minimal competition for developers wanting to write about it. - **Comparison with Rails**: While Rails dominates the Ruby web development market, it can be inflexible due to its monolithic nature and complexity in replacing core components. In contrast, Hanami allows for a more fine-grained approach where each functionality can be added or removed as needed. - **Logic Extraction**: The main thrust of the talk centers on the importance of extracting logic from templates and how Hanami provides the tools to achieve this. For instance, the speaker illustrates how a simple registration form can hide a lot of logic, which can be extracted into Ruby objects for better readability and maintainability. - **Encapsulation Techniques**: Specific techniques are provided for managing field errors, refining input logic using reusable partials, and leveraging scopes for improved organization. This method promotes a clear separation of concerns, ensuring that logic does not clutter the core templates. - **Use of Decorators and Scopes**: The speaker discusses utilizing decorators and scopes to simplify the implementation while keeping the views intuitive and organized. This also aids in managing the data passed to partials, fostering a clean development process. In conclusion, Hanami offers a robust set of tools tailored for improving development workflows in Ruby projects. The community is encouraged to engage in discussions around various approaches to logic extraction, ensuring continuous improvement in codebases. Wilgosz emphasizes that adopting innovative practices from beyond the Ruby ecosystem can further benefit developers. Overall, the talk effectively supports the notion that while creating and managing templates can be arduous, Hanami provides a comprehensive framework that enhances cleanliness and testability in web development workflows.
Suggest modifications
Cancel