
Object-oriented Design in Ruby/Rails - sleeptillseven
In a discussion about design and ruby&#x2F;rails apps, a statement has been brought up as a counter argument against the use of trailblazer, DDD techniques and Rails (best&#x2F;standard) practices to tame complexity. And that is that &quot;[...] there are cases where 300+ lines of a Ruby class are the right thing&quot;. Just to be clear, these 300 lines are pure LoC, no comments or line breaks (I already subtracted those away).<p>I cannot believe that&#x27;s even close to true, but nevertheless I would like to know the opinion of the Ruby&#x2F;Rails community. Can you really think of such (valid) use cases and or did you even come across those (apart from anti-pattern use cases)?
======
macscam
For most code, separation of concerns should mean 300 lines of code is spread
across multiple files. But Ruby programming can still be fairly rote
sometimes. Say there's some grammar parser which has 50 case statements. It
might be easier on the eyes, but I don't think separating such code into
multiple files is necessarily an "object oriented principle".

