I'm developing my first component and I'm not sure how to best handle models that use other models from a design and implementation standpoint. For instance, I have a contact model (person or business). Then I have a model for address. In the database I have these joined by a junction table. How would I design and implement the MVC for this? I need to be able to perform CRUD operations on a contact that includes the address(s) for that contact. How do I handle the junction table from a design standpoint? I doubt it would be a model itself. Should I implement it in a helper file?
There are many software design / architecture patterns and the is a good overview at https://en.wikipedia.org/wiki/Architectural_pattern
From your description, it sounds like having a single joomla component with a model, view(s) and control will work ok. It is hard to say what is best, but perhaps your might have the following...
- actor (person or business)
- list actors
- edit actor
- edit address
- get list of actors
- display actor details
- save actor edit
- display address details
- save address details
Or something similar, though this is just an idea based on an interpretation of what you described.
You may find that you can quickly create this component, or something similar enough to it, using https://www.component-creator.com.