http://qs1969.pair.com?node_id=11132552


in reply to Designing multiple related modules

"1 - Three separate modules."

"Simply write three modules with similar names as in the code above. Each module has methods with the same names and similar new method. All social media platforms use OAuth2 so new can be largely the same."

I did just this in a personal project. I didn't want classes, because the only thing they have in common is the API -- I'd use interfaces but as long as each package supplies the required methods it works fine.

Common code is either retained in the main program, or else stashed in a utility package ("component") that everyone uses.

A factory is the nicest way to do this I think. Depending.