Refactoring Rails Applications with RubyMine - YouTube

Slides: Typical Rails problems01:26 - Rails is great at the beginning02:09 - 2.months.later, first problems03:59 - 6.months later, hidden dependencies, security bugs, rails upgrades06:01 - 2.years.later, new team members, huge classes07:50 - New guidelines13:30 - Why is extracting a service object a good starting point in refactoring?14:08 - DDD service objects vs Rails service objects14:50 - Question: When is a good time to start refactoring?17:50 - Typical controller coupling, views, @ivars, filters21:32 - Redmine project explanation, codebase overviewRubyMine session - extracting a service object24:54 - Question: How to build a refactor strategy when your test coverage is not good enough?27:22 - RubyMine overview, structure view, scratch file, listing concerns, ‘create’ action28:45 - Running a subset of tests30:10 - Grouping concerns - controller takes care of all http-related concerns30:51 - An example test which is good enough for refactoring32:10 - Start of the refactoring - code changes32:30 - Run tests with the coverage tool, explaining the limitations of line coverage tools33:30 - Live template example - service object template, CreateTimeEntry class34:49 - What’s the good name for the service object method name? execute or call36:49 - Tests pass after moving some code to the new class38:40 - Handling the ‘return’ statement with the Proc45:56 - Extracting the respond_create_success, respond_create_failure methods47:39 - When to stop refactoring?49:56 - Question: When to introduce service objects, when to follow The Rails Way?51:44 - Question: Which params to pass to the constructor of the service object and which to the method?53:50 - Extracting the service object to the new fileSummary:56:56 - Summary of the refactoring session1:02:49 - More information/resources - Refactoring is an essential part of most developers' lives and has always been a focus of RubyMine. However, many of our users are unaware of some of these useful features. We've asked Andrzej Krzywda (@andrzejkrzywda), Rails refactoring guru, to share his experience and best practices with us in this webinar.
Refactoring Rails Applications with RubyMine - YouTube #ruby #rubydeveloper #rubyonrails #applications #refactoring #youtube https://rubyonrails.ba/single/refactoring-rails-applications-with-rubymine-youtube

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles