Where do media files (ex. user uploaded photos) belong?

44 views
Skip to first unread message

Georgef

unread,
Mar 26, 2014, 3:36:59 AM3/26/14
to clean-code...@googlegroups.com
Is it an application concern or a delivery layer concern?

witali mik

unread,
Mar 26, 2014, 4:00:04 AM3/26/14
to clean-code...@googlegroups.com
Usually it is config based where the uploaded photos are placed. Only thing you need is PhotoRepository.

you interactor use the PhotoRepository to find a photo of a user und put the path into presenter. So you could create FileSystemPhotoRepository and load the path from your configuration file and put it into constructor of the Repository.

and now imagine how awesome it could be if you just create a FlikrPhotoRepository ;)
Reply all
Reply to author
Forward
0 new messages