Talks
Speakers
Events
Topics
Sign in
Home
Talks
Speakers
Events
Topics
Leaderboard
Use
Analytics
Sign in
Suggest modification to this talk
Title
Description
By Brandon Hays You just wanted to add some nice interactive functionality to your Rails app. But then one jQuery plugin turns to three, add a dash of statefulness, some error handling, and suddenly you can't sleep at night. We'll walk through using Ember Components to test-drive a refactor until your front-end code is understandable, usable, and extensible. Armed with TDD and components, you can start to get excited, not exasperated, when asked to add advanced client-side interactions to your website. Brandon left the world of marketing to find that creating software made him happy. Brandon lives in Austin, TX, where he helps run The Frontside, a Rails and Ember.js consultancy. Brandon's lifelong mission is to hug every developer. Help us caption & translate this video! http://amara.org/v/FG04/
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 "Bring Fun Back to JS: Step-by-Step Refactoring Toward Ember," Brandon Hays discusses the process of refactoring JavaScript code to enhance an application’s interactivity while maintaining code quality. He begins by addressing the common challenge developers face when jQuery plugins and state management lead to tangled, unmanageable code. Hays emphasizes the importance of Test-Driven Development (TDD) and components to create clean, extensible front-end code. **Key Points:** - **Introduction to Complex Interactivity:** Hays illustrates how small features can quickly compound complexity, transforming simple JavaScript into a convoluted mess akin to a 'balled mud' architecture. - **Understanding Ball of Mud Architecture:** He likens poorly structured code to urban sprawl, explaining that developers often find themselves working in a chaotic 'code favela', where growth and maintenance become increasingly difficult. - **The Importance of Refactoring:** Hays explains several strategies to deal with messy code, including ignoring it, black boxing sections, block-by-block renovation, or even starting from scratch. He emphasizes that a refactor is often necessary when the cost of maintaining convoluted features becomes too high. - **Applying Ember Framework:** Throughout his talk, Hays proposes a refactor using the Ember framework to manage state and DOM manipulation effectively. He outlines a five-step process to pull out legacy code into Ember components, allowing for a gradual transformation without sacrificing application performance. - **Utilizing Testing:** A significant aspect of his methodology involves establishing a robust testing environment to ensure that refactoring does not introduce errors into the application. He illustrates how to use testing libraries to validate both the old and new functionalities during the transition. - **Iterative Model Extraction:** Hays stresses the importance of identifying and extracting models, allowing the application to dynamically generate content based on user interaction, reducing dependency on tangled jQuery code. - **Conclusions and Takeaways:** Hays concludes by highlighting the joy of transforming a chaotic codebase into a well-structured application that developers can maintain and extend. He underscores the importance of community in software development, encouraging collaboration and support among developers. In summary, Brandon Hays’ presentation champions the use of Ember for creating structured, maintainable JavaScript applications that enhance both developer experience and user interaction, advocating for TDD as a core practice in modern development.
Suggest modifications
Cancel