Say in your Real world app you have a SQL for getting articles by user in store.clj. How do you decide if that SQL lives in article component or user component?
Say in your Real world app you have a SQL for getting articles by user in store.clj. How do you decide if that SQL lives in article component or user component?
To answer your second question, I would make the same considerations as in any other architecture. If the SQL only took a user ID and didn't contain business logic from the user domain, then I would just put it in the article component, but if the SQL had to contain logic from the user domain (more than e.g. just translating user name to user ID) then I would extract that logic into the user component. Exactly how you combine this into a query is an implementation detail that can be solved in several different ways (and it often gets quite ugly!). This is how I think about it in general, but there are always situations when it's right to break "rules"!