Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
Wizards have been common in web applications since the dawn of the Internet, with the most popular example being the Shopping Cart, yet many struggle with writing wizard code effectively, resulting in a huge untraceable rat's nest of copy/paste code. In fact, many implementations violate REST and include Fat Controllers as well as overly complicated wizard-step management, data, session, and validation code. This talk covers a better way that yields Ultra Light and Maintainable Rails Wizards! Andy Maleh leads at Big Astronaut by embracing agile practices and software craftsmanship while perfecting software products. He helped Groupon develop their 33M-user-website by working on user subscription and personalization features. Andy likes to drum, snowboard, and longboard in his free time. Help us caption & translate this video! http://amara.org/v/FG0P/
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 this presentation titled 'Ultra Light and Maintainable Rails Wizards', Andy Maleh discusses the common yet often poorly implemented feature of wizards in web applications, particularly within Rails. With a focus on achieving maintainability and simplicity, Maleh emphasizes the importance of writing clean wizard code that avoids typical pitfalls like copy-pasting, complicated controllers, and managing excessive session data. The primary goal is to create wizards that improve user experience without overcomplicating the underlying codebase. ### Key Points Discussed: - **Purpose of Wizards**: Wizards play a crucial role in web applications by breaking down complex forms into manageable steps, preventing user overwhelm, and providing clarity which aids in completing tasks. - **Common Issues**: Many implementations resort to excessive copy/pasting across multiple steps, leading to maintenance nightmares. Coding for wizards often ends up violating REST principles and introduces complexity in session management. - **Implementation Goals**: Maintainability, productivity, and adherence to REST principles are critical for achieving effective wizard implementations. - **Typical Approaches**: Maleh critiques several approaches including one controller per step—leading to code repetition and scalability issues, and a session accumulation method that complicates controllers and violates the MVC paradigm. ### Illustrative Case Study: Maleh shares his experience working with a startup named Early Shares, which required onboarding wizards for its investment platform. The challenges involved maintaining the codebase with minimal resources led him to explore cleaner architecture patterns that would facilitate better maintenance and scalability over time. - **Ultra Light Approach**: The speaker introduces a novel approach where he designed wizards as a series of steps managed by presenters rather than large controllers. This involved using a main model that tracks progress through nested model steps, leading to cleaner code and separating business logic from view concerns. - **Main Benefits**: His methodology emphasized focusing on user experience while separating the steps into manageable components, using REST principles effectively while minimizing risky session reliance. This structure led to significant reductions in code complexity and improved maintainability. ### Conclusion and Takeaways: - **Optimization through Design**: Adopting design patterns such as the Builder pattern can successfully help organize the wizard process and maintain clarity in code. Each step not only enhances user experience but also avoids confusion at the code level. - **Future Thoughts**: Maleh hints at developing a gem named 'ultralight wizard' that encapsulates these ideas, aiding developers in implementing wizards more efficiently and maintainably in their Rails applications. - **Final Note**: The talk reiterates that maintaining a clean and clear separation of concerns in any codebase significantly contributes to its long-term sustainability and ease of use for future developers.
Suggest modifications
Cancel