Refactoring, Part Two: In Defense of Magic

In my last post, I refactored the status field for cards in my project tracker to a more object-oriented representation that used value objects and classes to replace conditionals throughout the code.I was apprehensive about posting it, because it seems like that kind of OO code is out of fashion. What feedback I got, though, was positive. So I’m going to go a little farther into metaprogramming with this example. The code here works for this project, but eventually goes beyond what I’d be likely to recommend for most projects.
Refactoring, Part Two: In Defense of Magic #ruby #rubydeveloper #rubyonrails #refactoring, https://rubyonrails.ba/single/refactoring-part-two-in-defense-of-magic

Nezir Zahirovic

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

related articles