I'm trying to understand Phoenix 1.3 contexts.
I understand the separability into contexts (which in my mind I perceive as micro-apps, with clearly defined API boundaries), but I struggle when trying to figure out how to do a many-to-many relationship between them.
In the case of building a slack clone, a User can have many Chatrooms and a Chatroom can have many users.
In the 'model' based way of doing it, you would create an intermediate table user_rooms (with fields user_id, room_id), and then do join_through.
What's confusing for me is:
- If I'm supposed to keep these are truly isolated, do I really want to be joining tables? There's nothing separate about that.
- If I have to keep my intermediate table user_rooms, what context should that go in?
(for background, I'm trying to do Step 4 of this https://medium.com/@benhansen/lets-build-a-slack-clone-with-elixir-phoenix-and-react-part-4-creating-chat-rooms-80dc74f4f704)