{"action":"created","issue":{"url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/24","labels_url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/24/comments","events_url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/24/events","html_url":"https://github.com/CMPUT301W15T07/TravelTracker/issues/24","id":57557642,"number":24,"title":"Create UML diagram(s)","user":{"login":"TheLastBanana","id":1923551,"avatar_url":"https://avatars.githubusercontent.com/u/1923551?v=3","gravatar_id":"","url":"https://api.github.com/users/TheLastBanana","html_url":"https://github.com/TheLastBanana","followers_url":"https://api.github.com/users/TheLastBanana/followers","following_url":"https://api.github.com/users/TheLastBanana/following{/other_user}","gists_url":"https://api.github.com/users/TheLastBanana/gists{/gist_id}","starred_url":"https://api.github.com/users/TheLastBanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheLastBanana/subscriptions","organizations_url":"https://api.github.com/users/TheLastBanana/orgs","repos_url":"https://api.github.com/users/TheLastBanana/repos","events_url":"https://api.github.com/users/TheLastBanana/events{/privacy}","received_events_url":"https://api.github.com/users/TheLastBanana/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/labels/wiki","name":"wiki","color":"207de5"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/milestones/9","labels_url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/milestones/9/labels","id":977853,"number":9,"title":"P3 - UML Diagram","description":"After this milestone, we will avoid making significant changes to the UML diagram unless absolutely necessary.","creator":{"login":"TheLastBanana","id":1923551,"avatar_url":"https://avatars.githubusercontent.com/u/1923551?v=3","gravatar_id":"","url":"https://api.github.com/users/TheLastBanana","html_url":"https://github.com/TheLastBanana","followers_url":"https://api.github.com/users/TheLastBanana/followers","following_url":"https://api.github.com/users/TheLastBanana/following{/other_user}","gists_url":"https://api.github.com/users/TheLastBanana/gists{/gist_id}","starred_url":"https://api.github.com/users/TheLastBanana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheLastBanana/subscriptions","organizations_url":"https://api.github.com/users/TheLastBanana/orgs","repos_url":"https://api.github.com/users/TheLastBanana/repos","events_url":"https://api.github.com/users/TheLastBanana/events{/privacy}","received_events_url":"https://api.github.com/users/TheLastBanana/received_events","type":"User","site_admin":false},"open_issues":1,"closed_issues":0,"state":"open","created_at":"2015-02-13T03:08:05Z","updated_at":"2015-02-13T04:21:18Z","due_on":"2015-02-18T07:00:00Z","closed_at":null},"comments":46,"created_at":"2015-02-13T04:21:07Z","updated_at":"2015-02-21T08:54:09Z","closed_at":null,"body":"We currently have an early UML diagram of the our data model. We should make sure it's finished. We probably also want UML diagrams for each of the activities."},"comment":{"url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/comments/75362702","html_url":"https://github.com/CMPUT301W15T07/TravelTracker/issues/24#issuecomment-75362702","issue_url":"https://api.github.com/repos/CMPUT301W15T07/TravelTracker/issues/24","id":75362702,"user":{"login":"kdbanman","id":1323521,"avatar_url":"https://avatars.githubusercontent.com/u/1323521?v=3","gravatar_id":"","url":"https://api.github.com/users/kdbanman","html_url":"https://github.com/kdbanman","followers_url":"https://api.github.com/users/kdbanman/followers","following_url":"https://api.github.com/users/kdbanman/following{/other_user}","gists_url":"https://api.github.com/users/kdbanman/gists{/gist_id}","starred_url":"https://api.github.com/users/kdbanman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdbanman/subscriptions","organizations_url":"https://api.github.com/users/kdbanman/orgs","repos_url":"https://api.github.com/users/kdbanman/repos","events_url":"https://api.github.com/users/kdbanman/events{/privacy}","received_events_url":"https://api.github.com/users/kdbanman/received_events","type":"User","site_admin":false},"created_at":"2015-02-21T08:54:09Z","updated_at":"2015-02-21T08:54:09Z","body":"@ryant26 and I were chatting a bunch.  There are some problems with the way I interpreted his description of Observer MVC.  If you're interested, the short version of the conversation is:\r\n\r\n- observing individual model objects forces the model objects to either 1) inherit from some observable parent or 2) share repeated code\r\n- option 1) above isn't bad, per se, but observing *lists* of model objects would require either 1) wrapping the lists in an observable class or 2) registering as an observer for each object in the list.\r\n- option 1) is bad because of unclear separation between owner classes (User, Claim) and the classes that would wrap lists of Claims, Items, etc.\r\n\r\nThe alternative is what he originally meant, which would be used like this:\r\n\r\n```java\r\nclass Claim(){\r\n      \r\n  public Claim() { ... };\r\n  \r\n  public void setDescription(String description) { \r\n    // ...\r\n    Application.getDataSource.notifyDataUpdated();\r\n  }\t \r\n  \r\n   public void setDate(...) { \r\n    // ...\r\n    Application.getDataSource.notifyDataUpdated();\r\n  }\t \r\n  \r\n   public void setDeblahblaah(...) { \r\n    // ...\r\n    Application.getDataSource.notifyDataUpdated();\r\n  }\t \r\n  \r\n}\r\n\r\nclass ClaimInfoActivity implements Observer {\r\n  \r\n  Claim claim;\r\n  DataStore ds;\r\n  Arraylist<Observers> observers;\r\n  \r\n  public onCreate() {\r\n    ds = DataSource.getInstance();\r\n    \r\n    UUID claimId = getIDFromIntent();\r\n    claim = ds.getClaim(claimID);\r\n    \r\n    ds.addObserver(this)\r\n    \r\n    updateViews();\r\n  }\r\n  \r\n  @override\r\n  void updateObserver(){\r\n   \tupdateViews(); \r\n  }\r\n  \r\n}\r\n```\r\n\r\nNote that:\r\n\r\n1. The DataStore is observed, not the model objects.\r\n2. The model object (Claim) is no longer tightly coupled by inheritance just for observability.\r\n\r\nWe'll turn this issue's comment thread into some UML tomorrow.  I'm pretty thankful to be in a group that'll discuss this kind of stuff so extensively."}}