sulu / sulu-standard

This repository is not longer the recommended way to start a sulu project. Use:
https://github.com/sulu/skeleton
MIT License
614 stars 106 forks source link

general handling of dependencies #158

Closed michaelzangerle closed 10 years ago

michaelzangerle commented 10 years ago

@sulu-cmf/developer @wachterjohannes and I already started a discussion about how to handle dependencies like in the contact bundle. A contact or a account can have medias which resulted in a new database table, extending the controller and putting a new tab in the contact bundle.

At this point @wachterjohannes suggested to put the tab, a new controller for account- and contact-medias and the database table in the media bundle. But at this point one would have to extend the contact and account entity .... Also saving via the account and contact model would not work anymore (at least not by default). One would have to add e.g. a media model and a media collection to make use of backbone.

Any suggestions/ideas/comments?

wachterjohannes commented 10 years ago

@michaelzangerle after a short discussion in the team! we decided that media is a dependency on contact! because a min of contact needs a picture and content, contact, media is coupled! So it is ok to handle the tab in contact!

But you should move the media handling to an own controller with the url /admin/api/contact/<uuid>/media!

dantleech commented 10 years ago

@wachterjohannes you mean contact is dependent on media? :)

danrot commented 10 years ago

Yeah, that's what he means ;-)

wachterjohannes commented 10 years ago

yeah exactly :100: points (: