DEV Community


Discussion on: Stop coupling logic with your HTTP layer!

burdettelamar profile image
Burdette Lamar

I use the same principle, but in the other direction. Instead of avoiding the coupling so that I can build a CLI, I build the CLI so that I cannot couple.

For a desktop app with a GUI, for example, I add a CLI. Both interfaces can work only if the logic is in neither. That keeps me "honest."

larribas profile image
Lorenzo Arribas

That's a good exercise. CLIs and HTTP are different enough that it forces you to "stay abstract".