3 ms·
Let’s say my site has a download image feature that embeds per-user digital licenses into downloaded images at download time. This might take some processing so
by eurasiantiger 4y ago
Let’s say my site has a download image feature that embeds per-user digital licenses into downloaded images at download time. This might take some processing so there is a queue and an abstraction representing the downloaded file. There are also several endpoints serving different types of image files.
What shall I call the unit of code orchestrating these download processes, if not ImageDownloadManager?
- cnorthwood 4y agoImageDownloadPreparer?
- eurasiantiger 4y agoImageDownloadManager also communicates with the frontend about its state, so it’s not a completely preparatory process.
- carschno 4y agoI think I would go with a class called Image, which provides a method called download().
- eurasiantiger 4y agoThis class is now over 4000 lines long.
- ahartmetz 4y agoImageDownloadDispatcher, ImageDownloadScheduler, Image DownloadQueueManager... basically, the fix for "FooManager" names is to ask which aspect(s) of Foo the manager manages. Lifetime, storage, execution order (and according to which criteria), resource limits, uniqueness, exclusive access, efficient search, ...
- eurasiantiger 4y agoAll of those hint of functionality that is not present here. The code is just managing image downloads, not dispatching them, scheduling them, or even touching the queue (which is handled on a higher level). ImageDownloadManager manages image downloads. Why use a name that makes less sense?
- pvorb 4y agoHow about ImageDownloader?