Proper way to manage a collection of existing objects


#1

Hello,

I’ve been looking for a pattern to implement managing a collection of
exiting objects, and haven’t had much luck.

For example, if I have REST controllers for users, and for groups, what
would be a good way to implements the assignment of users to groups,
where the group was already selected? Would it be to add the
functionality to the existing group controller? Create a new controller
to manage the association of the two?

I’ve seen plenty of examples of writing RESTfull controllers for
individual models, and examples handling the creation of new dependent
models (blog posts with new comments), but I haven’t been able to find
examples of more complicated interactions. Does anyone know of a good
reference?

Thanks.

-Michael