There is no best way.
There are more generic and flexible techniques that can be used, but they become overwhelming when the situation doesn't have a need for it.
Design patterns are extremely useful to help simplify complex situations, but they can be easily abused by using them when they're not needed, such as in this article on The abuse of Design Patterns in writing Hello World program
When it comes to issues of duplication, have something duplicated twice is kind of okay, but as soon as it's duplicated a third time or more, you really should be looking at ways of reducing that duplication.
In summary, the best way makes it easy to write and understand the code, and easy to extend to future situations that are likely to occur.