Last Updated: 2023-12-03
Imagine you have the following structure:
controller -> model -> paypal (e.g. hits api through a method here)
This is a bad design because an
ActiveRecord model should only be responsible
for talking to the DB. It should not be responsible for API stuff wtih PayPal.
A better design would be:
controller -> orchestrator/service -> [paypal_api, model]
In what ways is this better?