{"action":"created","issue":{"url":"https://api.github.com/repos/Valuya/comptoir/issues/60","labels_url":"https://api.github.com/repos/Valuya/comptoir/issues/60/labels{/name}","comments_url":"https://api.github.com/repos/Valuya/comptoir/issues/60/comments","events_url":"https://api.github.com/repos/Valuya/comptoir/issues/60/events","html_url":"https://github.com/Valuya/comptoir/issues/60","id":104560011,"number":60,"title":"Frontend refactoring: model with refs vs full structures","user":{"login":"ymajoros","id":2889296,"avatar_url":"https://avatars.githubusercontent.com/u/2889296?v=3","gravatar_id":"","url":"https://api.github.com/users/ymajoros","html_url":"https://github.com/ymajoros","followers_url":"https://api.github.com/users/ymajoros/followers","following_url":"https://api.github.com/users/ymajoros/following{/other_user}","gists_url":"https://api.github.com/users/ymajoros/gists{/gist_id}","starred_url":"https://api.github.com/users/ymajoros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ymajoros/subscriptions","organizations_url":"https://api.github.com/users/ymajoros/orgs","repos_url":"https://api.github.com/users/ymajoros/repos","events_url":"https://api.github.com/users/ymajoros/events{/privacy}","received_events_url":"https://api.github.com/users/ymajoros/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-02T19:59:35Z","updated_at":"2015-09-03T12:34:50Z","closed_at":null,"body":"Would it be better to have Ws* objects with refs, that are converted (via converters) to full structures, just as in backend? Would it take long?\r\n\r\nPlease estimate before doing it."},"comment":{"url":"https://api.github.com/repos/Valuya/comptoir/issues/comments/137422885","html_url":"https://github.com/Valuya/comptoir/issues/60#issuecomment-137422885","issue_url":"https://api.github.com/repos/Valuya/comptoir/issues/60","id":137422885,"user":{"login":"cghislai","id":12647398,"avatar_url":"https://avatars.githubusercontent.com/u/12647398?v=3","gravatar_id":"","url":"https://api.github.com/users/cghislai","html_url":"https://github.com/cghislai","followers_url":"https://api.github.com/users/cghislai/followers","following_url":"https://api.github.com/users/cghislai/following{/other_user}","gists_url":"https://api.github.com/users/cghislai/gists{/gist_id}","starred_url":"https://api.github.com/users/cghislai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cghislai/subscriptions","organizations_url":"https://api.github.com/users/cghislai/orgs","repos_url":"https://api.github.com/users/cghislai/repos","events_url":"https://api.github.com/users/cghislai/events{/privacy}","received_events_url":"https://api.github.com/users/cghislai/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T12:34:50Z","updated_at":"2015-09-03T12:34:50Z","body":"I was doing something similar. With the refactor changes I pushed it is getting a bit closer.\r\nthere are a few Local* classes with (some) *Refs fetched to full structure.  There are also extra fields.\r\n\r\nIt is not as easy as we have to keep references to requests since we don't want an old request to override contents of a newer one. Also, the full structure that would be fetched might depend on the context.\r\n\r\nWith all this ajax stuff, I tried to fetch as few content as possible while keeping things as simple as possible. All of this is handled by services, and it is transparent to the controllers and the views."}}