{"issue":{"state":"open","pull_request":{"diff_url":null,"html_url":null,"patch_url":null},"user":{"avatar_url":"https://secure.gravatar.com/avatar/77604f97d0f8be6a47b62513fcf85e7f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"77604f97d0f8be6a47b62513fcf85e7f","url":"https://api.github.com/users/NukemHill","login":"NukemHill","id":730672},"milestone":null,"assignee":null,"labels":[],"updated_at":"2011-11-04T15:42:48Z","comments":2,"closed_at":null,"url":"https://api.github.com/repos/jverkoey/nimbus/issues/107","body":"Jeff,\r\n\r\nI've been hacking at the Photos code, and trying to understand the architecture.  I've been swimming in NIToolbarPhotoViewController, and the sample code in NetworkPhotoAlbumViewController and DribbblePhotoAlbumViewController.\r\n\r\nMy purpose is to build an AlbumViewController that loads image paths from an NSManagedObject, and then pulls the image up from the file system.  I might, eventually, make it so that it does either local or network, but I'm not worried about that at the moment.\r\n\r\nWhat I'm finding is that several code chunks in NetworkPhotoAlbumViewController should actually be refactored upwards, either into NIToolbarPhotoViewController, or into a sub-class of that.  Aaaaand, actually, I'm beginning to think that a general purpose NIPhotoScrollViewController should be the *parent* of NIToolbarPhotoViewController, and it should manage all of the work not specific to the toolbar/scrubber work done by NIToolbarPVC.\r\n\r\nSome of the work that I think should be in NIPhotoScrollViewController:\r\n1)  manage _highQualityImageCache and _thumbnailImageCache;\r\n2)  - (NSString *)cacheKeyForPhotoIndex:(NSInteger)photoIndex;\r\n3)  NIPhotoAlbumScrollView* _photoAlbumView;\r\n4)  @property (nonatomic, readonly, retain) NIPhotoAlbumScrollView* photoAlbumView;\r\n5)  - (void)loadThumbnails; (currently in DribbblePAVC);\r\n6) - (void)loadAlbumInformation; (which would actually be in the data source identified by this new NIPhotoSVC);\r\n\r\nBefore I get too deep in the weeds here, I'd like your perspective on what I'm proposing.  Especially if I'm missing something fundamental.  The main reason I'm suggesting all of this is that I'm finding I need some of these pieces, but they're either buried in  the example code sited above, or seemingly inappropriately (again, in my opinion!) in NIToolbarPVC.  This refactoring, I think, will allow for easier implementation of sub-classes of the photo viewers in the future, as some of the \"heavy lifting\" would already be handled.\r\n\r\nThoughts?","html_url":"https://github.com/jverkoey/nimbus/issues/107","number":107,"title":"Nimbus Photos Library","id":2139801,"created_at":"2011-11-04T01:02:28Z"},"action":"created","comment":{"user":{"avatar_url":"https://secure.gravatar.com/avatar/77604f97d0f8be6a47b62513fcf85e7f?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"77604f97d0f8be6a47b62513fcf85e7f","url":"https://api.github.com/users/NukemHill","login":"NukemHill","id":730672},"updated_at":"2011-11-04T15:42:48Z","url":"https://api.github.com/repos/jverkoey/nimbus/issues/comments/2632426","body":"@kyvu - thanks.  I sat on it last night and I think I'm going to go ahead and do it.  I'll submit it here once it's done for you guys to look at.  It's not a horrible amount of work.  I'm just worried I'm missing something fundamental that makes it a wasted exercise.","id":2632426,"created_at":"2011-11-04T15:42:48Z"}}