3 ms·
> Apply separation of concerns properly The disconnect here is the definition of "concerns." One analogy is, imagine cutting a square into stripes. You're imp
by bcyn 7y ago
> Apply separation of concerns properly
The disconnect here is the definition of "concerns."
One analogy is, imagine cutting a square into stripes. You're implying that there's only one way to do so, say, cutting horizontally. But you can easily cut vertically and still end up with well separated stripes.
The stripes, whether horizontal or vertical, are separated cleanly.
While you may see splitting by data fetching, view, etc. as the only way to separate by concerns, there are certainly others. The component model that has been adopted by many React users is one such way.
- bcrosby95 7y agoUnless you want a mess, usually you still separate by both. Just because you "cut" a square vertically or horizontally, doesn't mean each strip doesn't have, say, more separating lines that you didn't cut. These concerns should still be separated, even if they aren't separated at the highest levels of your application. At the top level, we slice our projects vertically (by feature) at work. But it doesn't mean we have 1 giant god framework that handles all layers for a given feature. We still segment by layer. And we still have layer focused libraries.