Quantcast
Channel: Dave Copeland :ruby:
Viewing all articles
Browse latest Browse all 613

Article 6

$
0
0

Two OO ways to design something, curious what everyone's thoughts are? This is w/out context of a framework, just purely OO perspective.

Option 1 - Stateless object w/ Rich Result

Option 2 - Stateful object (e.g. command pattern + internal state to store results)

gist.github.com/davetron5000/1

My thoughts follow, but I am not sure which is the "best" pattern - again all things being equal/not in Rails/etc.


Viewing all articles
Browse latest Browse all 613