{"action":"created","issue":{"url":"https://api.github.com/repos/leighwoltman/PDF-Scanning-App/issues/1","labels_url":"https://api.github.com/repos/leighwoltman/PDF-Scanning-App/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/leighwoltman/PDF-Scanning-App/issues/1/comments","events_url":"https://api.github.com/repos/leighwoltman/PDF-Scanning-App/issues/1/events","html_url":"https://github.com/leighwoltman/PDF-Scanning-App/issues/1","id":130359522,"number":1,"title":"Split Code Into Document and Pages To Make UI A View of A Model","user":{"login":"leighwoltman","id":13458381,"avatar_url":"https://avatars.githubusercontent.com/u/13458381?v=3","gravatar_id":"","url":"https://api.github.com/users/leighwoltman","html_url":"https://github.com/leighwoltman","followers_url":"https://api.github.com/users/leighwoltman/followers","following_url":"https://api.github.com/users/leighwoltman/following{/other_user}","gists_url":"https://api.github.com/users/leighwoltman/gists{/gist_id}","starred_url":"https://api.github.com/users/leighwoltman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leighwoltman/subscriptions","organizations_url":"https://api.github.com/users/leighwoltman/orgs","repos_url":"https://api.github.com/users/leighwoltman/repos","events_url":"https://api.github.com/users/leighwoltman/events{/privacy}","received_events_url":"https://api.github.com/users/leighwoltman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-02-01T13:14:52Z","updated_at":"2016-02-01T13:24:16Z","closed_at":null,"body":"I checked in an initial pass at starting to partition the code into a concept of a document and pages. One thing we have to decide is does the order of the pages in the document belong with the document, or is that just a UI concept and then when we tell a document to save, we tell it what order to save in. I'm not sure which one I like. Right now there is a lot of linkage between the UI and document for ordering, we might get rid of a lot of that linkage."},"comment":{"url":"https://api.github.com/repos/leighwoltman/PDF-Scanning-App/issues/comments/177969800","html_url":"https://github.com/leighwoltman/PDF-Scanning-App/issues/1#issuecomment-177969800","issue_url":"https://api.github.com/repos/leighwoltman/PDF-Scanning-App/issues/1","id":177969800,"user":{"login":"tocaner","id":14115996,"avatar_url":"https://avatars.githubusercontent.com/u/14115996?v=3","gravatar_id":"","url":"https://api.github.com/users/tocaner","html_url":"https://github.com/tocaner","followers_url":"https://api.github.com/users/tocaner/followers","following_url":"https://api.github.com/users/tocaner/following{/other_user}","gists_url":"https://api.github.com/users/tocaner/gists{/gist_id}","starred_url":"https://api.github.com/users/tocaner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tocaner/subscriptions","organizations_url":"https://api.github.com/users/tocaner/orgs","repos_url":"https://api.github.com/users/tocaner/repos","events_url":"https://api.github.com/users/tocaner/events{/privacy}","received_events_url":"https://api.github.com/users/tocaner/received_events","type":"User","site_admin":false},"created_at":"2016-02-01T13:24:16Z","updated_at":"2016-02-01T13:24:16Z","body":"So an example:\r\n\r\n- After scan UI calls document.addpage(Page);\r\n- document raises OnPageInserted(sender, args { index } )\r\n- UI then has an event handler where it inserts Document.Pages[index].Thumbnail to its view  at index location.\r\n\r\nAnother example:\r\n\r\n- On UI User selects an item and presses delete.\r\n- UI calls document.removepage(item.index)\r\n- document raises OnPageDeleted(sender, args { index })\r\n- UI then on the event handler removes item at index location\r\n\r\nAnother example:\r\n\r\n- On UI User selects an item and moves it to another index.\r\n- UI calls document.move(old_index, new_index);\r\n- document raises OnPageMoved(sender, args { old_index, new_index })\r\n- UI then on the event handler relocates the item on the view\r\n"}}