{"action":"created","comment":{"url":"https://api.github.com/repos/code-squad/javascript-food/pulls/comments/184312584","pull_request_review_id":115480331,"id":184312584,"diff_hunk":"@@ -1 +1,67 @@\n-javascript level3\n+# 리팩토링 코드 정리\n+\n+## 리팩토링 목표\n+1. 코드전체가 `구조별 역할와 원칙(어떤 정의로, 어떤 규칙을 가지고 있나)`을 가지고 `스스로 설명`되도록 수정\n+2. 좀 더 범용성있게 사용할 수 있도록 수정\n+\n+## 사용범위 (코드 사용 범위를 가정함)\n+* 배민찬 사이트 전체\n+\n+  ​\n+\n+## 파일별 정의 (호출순서대로)\n+\n+* 라이브러리\n+  * **polyfill.js** : 브라우저별 지원하지 않는 기능을 보충하는 코드 조각 모음\n+* 객체정의\n+  * **lumi-util.js** : 유틸성격의 정적 객체 모음 (ajax, animation, template, dom)\n+  * **bmc-ui/*.js** : 배민찬에서 사용되는 UI객체 모음 / 각 UI별로 돔, Util, 옵션값 등을 동적으로 받는 클래스 객체들\n+* 객체사용\n+  * **bmc-page-main.js** : page별로 사용되는 객체 호출 코드를 각각 파일로 분류하여 만듦\n+  * **bmc-page-global.js** : page별 코드 호출\n+\n+\n+\n+## 클래스역할 및 메서드 구성\n+\n+* 클래스 공통 (all)\n+  * constructor :  this바인딩 변수, init()호출\n+  * init : 인스턴스 생성과 동시에 무조건 한번 호출되야하는 메서드들\n+* UI 클래스 (Tab, VisualSlider, ListSlider)\n+  * 인스턴스 생성시 dom은 wrapper element 하나만 넘기기. / 나머지 dom은 규칙을 갖고 의존하는 구조 (마크업이 규칙적인 구조와 셀렉터를 가지고 있다고 가정)\n+  * UI의 공통적인 사이클(?) 이 있고 순서대로 메서드 기술\n+    * (DOMLoadedContent 이후) -> ajax, render -> ui active + event binding\n+  * 외부에서 사용하는 메서드는 없고, 내부 메소드들 끼리 참조해서 호출하고 있음.\n+* UI 보조 클래스 (Render)\n+  * ajax후 -> 렌더링에 유리하도록 data를 조작하여 -> template 과 합한 뒤 -> append 하는 클래스\n+  * 위 과정은 비동기적으로 일어나고 순서가 보장되어야 함. \n+    * 외부에서는 연속되는 콜백을 보이지 않고, 메서드 한번만 호출하여 렌더링 되도록 감춤.\n+  * ajax없이 단순 render시에는 util의 template을 사용.","path":"README.MD","position":null,"original_position":40,"commit_id":"f5ac01514af93607ab5b079a42904c05088f86ec","original_commit_id":"60662322a08c1587bbbd0af0e57779a04aa16ee7","user":{"login":"LumiLoves","id":23192677,"avatar_url":"https://avatars0.githubusercontent.com/u/23192677?v=4","gravatar_id":"","url":"https://api.github.com/users/LumiLoves","html_url":"https://github.com/LumiLoves","followers_url":"https://api.github.com/users/LumiLoves/followers","following_url":"https://api.github.com/users/LumiLoves/following{/other_user}","gists_url":"https://api.github.com/users/LumiLoves/gists{/gist_id}","starred_url":"https://api.github.com/users/LumiLoves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LumiLoves/subscriptions","organizations_url":"https://api.github.com/users/LumiLoves/orgs","repos_url":"https://api.github.com/users/LumiLoves/repos","events_url":"https://api.github.com/users/LumiLoves/events{/privacy}","received_events_url":"https://api.github.com/users/LumiLoves/received_events","type":"User","site_admin":false},"body":"이것도 rendering 과정을 전체적으로 수정해서 필요없는 문장이 되었고,\r\n개선된 과정에 대한 설명을 더 추가하여 기재해봤습니다.","created_at":"2018-04-26T08:43:52Z","updated_at":"2018-04-26T08:49:00Z","html_url":"https://github.com/code-squad/javascript-food/pull/20#discussion_r184312584","pull_request_url":"https://api.github.com/repos/code-squad/javascript-food/pulls/20","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/code-squad/javascript-food/pulls/comments/184312584"},"html":{"href":"https://github.com/code-squad/javascript-food/pull/20#discussion_r184312584"},"pull_request":{"href":"https://api.github.com/repos/code-squad/javascript-food/pulls/20"}},"in_reply_to_id":178715798},"pull_request":{"url":"https://api.github.com/repos/code-squad/javascript-food/pulls/20","id":178984883,"html_url":"https://github.com/code-squad/javascript-food/pull/20","diff_url":"https://github.com/code-squad/javascript-food/pull/20.diff","patch_url":"https://github.com/code-squad/javascript-food/pull/20.patch","issue_url":"https://api.github.com/repos/code-squad/javascript-food/issues/20","number":20,"state":"open","locked":false,"title":"[Lumi] 리팩토링 / 슬라이딩리스트 추가","user":{"login":"LumiLoves","id":23192677,"avatar_url":"https://avatars0.githubusercontent.com/u/23192677?v=4","gravatar_id":"","url":"https://api.github.com/users/LumiLoves","html_url":"https://github.com/LumiLoves","followers_url":"https://api.github.com/users/LumiLoves/followers","following_url":"https://api.github.com/users/LumiLoves/following{/other_user}","gists_url":"https://api.github.com/users/LumiLoves/gists{/gist_id}","starred_url":"https://api.github.com/users/LumiLoves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LumiLoves/subscriptions","organizations_url":"https://api.github.com/users/LumiLoves/orgs","repos_url":"https://api.github.com/users/LumiLoves/repos","events_url":"https://api.github.com/users/LumiLoves/events{/privacy}","received_events_url":"https://api.github.com/users/LumiLoves/received_events","type":"User","site_admin":false},"body":"한 것\r\n* 객체의 역할과 정의, 범용성 고려하여 코드 리팩토링 \r\n  * 결과물1: 코드\r\n  * 결과물2: README (정의한 객체에 대해 설명도 할 수 있어야 한다고 하셔서 글로 정리. 리뷰할때 말씀하신 의도와 맞는지 확인 부탁드립니다.)\r\n* 리스트슬라이더 기능 추가 (+ 기본기능, 무한슬라이딩, 추가슬라이딩구현)\r\n\r\n남은 해결사항\r\n* 리스트슬라이더의 슬라이딩그룹이 3개이하(1개, 2개)일때 처리\r\n* 리스트슬라이더 역방향 애니메이션 버그 수정\r\n","created_at":"2018-04-03T03:29:15Z","updated_at":"2018-04-26T08:49:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d3dc5070c912394a9f07d84bc0ca5ef97e48fc4d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/code-squad/javascript-food/pulls/20/commits","review_comments_url":"https://api.github.com/repos/code-squad/javascript-food/pulls/20/comments","review_comment_url":"https://api.github.com/repos/code-squad/javascript-food/pulls/comments{/number}","comments_url":"https://api.github.com/repos/code-squad/javascript-food/issues/20/comments","statuses_url":"https://api.github.com/repos/code-squad/javascript-food/statuses/f5ac01514af93607ab5b079a42904c05088f86ec","head":{"label":"LumiLoves:kimally","ref":"kimally","sha":"f5ac01514af93607ab5b079a42904c05088f86ec","user":{"login":"LumiLoves","id":23192677,"avatar_url":"https://avatars0.githubusercontent.com/u/23192677?v=4","gravatar_id":"","url":"https://api.github.com/users/LumiLoves","html_url":"https://github.com/LumiLoves","followers_url":"https://api.github.com/users/LumiLoves/followers","following_url":"https://api.github.com/users/LumiLoves/following{/other_user}","gists_url":"https://api.github.com/users/LumiLoves/gists{/gist_id}","starred_url":"https://api.github.com/users/LumiLoves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LumiLoves/subscriptions","organizations_url":"https://api.github.com/users/LumiLoves/orgs","repos_url":"https://api.github.com/users/LumiLoves/repos","events_url":"https://api.github.com/users/LumiLoves/events{/privacy}","received_events_url":"https://api.github.com/users/LumiLoves/received_events","type":"User","site_admin":false},"repo":{"id":117396283,"name":"javascript-food","full_name":"LumiLoves/javascript-food","owner":{"login":"LumiLoves","id":23192677,"avatar_url":"https://avatars0.githubusercontent.com/u/23192677?v=4","gravatar_id":"","url":"https://api.github.com/users/LumiLoves","html_url":"https://github.com/LumiLoves","followers_url":"https://api.github.com/users/LumiLoves/followers","following_url":"https://api.github.com/users/LumiLoves/following{/other_user}","gists_url":"https://api.github.com/users/LumiLoves/gists{/gist_id}","starred_url":"https://api.github.com/users/LumiLoves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LumiLoves/subscriptions","organizations_url":"https://api.github.com/users/LumiLoves/orgs","repos_url":"https://api.github.com/users/LumiLoves/repos","events_url":"https://api.github.com/users/LumiLoves/events{/privacy}","received_events_url":"https://api.github.com/users/LumiLoves/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/LumiLoves/javascript-food","description":"level3","fork":true,"url":"https://api.github.com/repos/LumiLoves/javascript-food","forks_url":"https://api.github.com/repos/LumiLoves/javascript-food/forks","keys_url":"https://api.github.com/repos/LumiLoves/javascript-food/keys{/key_id}","collaborators_url":"https://api.github.com/repos/LumiLoves/javascript-food/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/LumiLoves/javascript-food/teams","hooks_url":"https://api.github.com/repos/LumiLoves/javascript-food/hooks","issue_events_url":"https://api.github.com/repos/LumiLoves/javascript-food/issues/events{/number}","events_url":"https://api.github.com/repos/LumiLoves/javascript-food/events","assignees_url":"https://api.github.com/repos/LumiLoves/javascript-food/assignees{/user}","branches_url":"https://api.github.com/repos/LumiLoves/javascript-food/branches{/branch}","tags_url":"https://api.github.com/repos/LumiLoves/javascript-food/tags","blobs_url":"https://api.github.com/repos/LumiLoves/javascript-food/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/LumiLoves/javascript-food/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/LumiLoves/javascript-food/git/refs{/sha}","trees_url":"https://api.github.com/repos/LumiLoves/javascript-food/git/trees{/sha}","statuses_url":"https://api.github.com/repos/LumiLoves/javascript-food/statuses/{sha}","languages_url":"https://api.github.com/repos/LumiLoves/javascript-food/languages","stargazers_url":"https://api.github.com/repos/LumiLoves/javascript-food/stargazers","contributors_url":"https://api.github.com/repos/LumiLoves/javascript-food/contributors","subscribers_url":"https://api.github.com/repos/LumiLoves/javascript-food/subscribers","subscription_url":"https://api.github.com/repos/LumiLoves/javascript-food/subscription","commits_url":"https://api.github.com/repos/LumiLoves/javascript-food/commits{/sha}","git_commits_url":"https://api.github.com/repos/LumiLoves/javascript-food/git/commits{/sha}","comments_url":"https://api.github.com/repos/LumiLoves/javascript-food/comments{/number}","issue_comment_url":"https://api.github.com/repos/LumiLoves/javascript-food/issues/comments{/number}","contents_url":"https://api.github.com/repos/LumiLoves/javascript-food/contents/{+path}","compare_url":"https://api.github.com/repos/LumiLoves/javascript-food/compare/{base}...{head}","merges_url":"https://api.github.com/repos/LumiLoves/javascript-food/merges","archive_url":"https://api.github.com/repos/LumiLoves/javascript-food/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/LumiLoves/javascript-food/downloads","issues_url":"https://api.github.com/repos/LumiLoves/javascript-food/issues{/number}","pulls_url":"https://api.github.com/repos/LumiLoves/javascript-food/pulls{/number}","milestones_url":"https://api.github.com/repos/LumiLoves/javascript-food/milestones{/number}","notifications_url":"https://api.github.com/repos/LumiLoves/javascript-food/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/LumiLoves/javascript-food/labels{/name}","releases_url":"https://api.github.com/repos/LumiLoves/javascript-food/releases{/id}","deployments_url":"https://api.github.com/repos/LumiLoves/javascript-food/deployments","created_at":"2018-01-14T02:44:57Z","updated_at":"2018-04-26T08:39:31Z","pushed_at":"2018-04-26T08:39:29Z","git_url":"git://github.com/LumiLoves/javascript-food.git","ssh_url":"git@github.com:LumiLoves/javascript-food.git","clone_url":"https://github.com/LumiLoves/javascript-food.git","svn_url":"https://github.com/LumiLoves/javascript-food","homepage":null,"size":11477,"stargazers_count":1,"watchers_count":1,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":1,"default_branch":"kimally"}},"base":{"label":"code-squad:kimally","ref":"kimally","sha":"321b97b5ad0bfd6aba4afbb31907a343efa18142","user":{"login":"code-squad","id":22832280,"avatar_url":"https://avatars2.githubusercontent.com/u/22832280?v=4","gravatar_id":"","url":"https://api.github.com/users/code-squad","html_url":"https://github.com/code-squad","followers_url":"https://api.github.com/users/code-squad/followers","following_url":"https://api.github.com/users/code-squad/following{/other_user}","gists_url":"https://api.github.com/users/code-squad/gists{/gist_id}","starred_url":"https://api.github.com/users/code-squad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-squad/subscriptions","organizations_url":"https://api.github.com/users/code-squad/orgs","repos_url":"https://api.github.com/users/code-squad/repos","events_url":"https://api.github.com/users/code-squad/events{/privacy}","received_events_url":"https://api.github.com/users/code-squad/received_events","type":"Organization","site_admin":false},"repo":{"id":111503977,"name":"javascript-food","full_name":"code-squad/javascript-food","owner":{"login":"code-squad","id":22832280,"avatar_url":"https://avatars2.githubusercontent.com/u/22832280?v=4","gravatar_id":"","url":"https://api.github.com/users/code-squad","html_url":"https://github.com/code-squad","followers_url":"https://api.github.com/users/code-squad/followers","following_url":"https://api.github.com/users/code-squad/following{/other_user}","gists_url":"https://api.github.com/users/code-squad/gists{/gist_id}","starred_url":"https://api.github.com/users/code-squad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/code-squad/subscriptions","organizations_url":"https://api.github.com/users/code-squad/orgs","repos_url":"https://api.github.com/users/code-squad/repos","events_url":"https://api.github.com/users/code-squad/events{/privacy}","received_events_url":"https://api.github.com/users/code-squad/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/code-squad/javascript-food","description":"level3","fork":false,"url":"https://api.github.com/repos/code-squad/javascript-food","forks_url":"https://api.github.com/repos/code-squad/javascript-food/forks","keys_url":"https://api.github.com/repos/code-squad/javascript-food/keys{/key_id}","collaborators_url":"https://api.github.com/repos/code-squad/javascript-food/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/code-squad/javascript-food/teams","hooks_url":"https://api.github.com/repos/code-squad/javascript-food/hooks","issue_events_url":"https://api.github.com/repos/code-squad/javascript-food/issues/events{/number}","events_url":"https://api.github.com/repos/code-squad/javascript-food/events","assignees_url":"https://api.github.com/repos/code-squad/javascript-food/assignees{/user}","branches_url":"https://api.github.com/repos/code-squad/javascript-food/branches{/branch}","tags_url":"https://api.github.com/repos/code-squad/javascript-food/tags","blobs_url":"https://api.github.com/repos/code-squad/javascript-food/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/code-squad/javascript-food/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/code-squad/javascript-food/git/refs{/sha}","trees_url":"https://api.github.com/repos/code-squad/javascript-food/git/trees{/sha}","statuses_url":"https://api.github.com/repos/code-squad/javascript-food/statuses/{sha}","languages_url":"https://api.github.com/repos/code-squad/javascript-food/languages","stargazers_url":"https://api.github.com/repos/code-squad/javascript-food/stargazers","contributors_url":"https://api.github.com/repos/code-squad/javascript-food/contributors","subscribers_url":"https://api.github.com/repos/code-squad/javascript-food/subscribers","subscription_url":"https://api.github.com/repos/code-squad/javascript-food/subscription","commits_url":"https://api.github.com/repos/code-squad/javascript-food/commits{/sha}","git_commits_url":"https://api.github.com/repos/code-squad/javascript-food/git/commits{/sha}","comments_url":"https://api.github.com/repos/code-squad/javascript-food/comments{/number}","issue_comment_url":"https://api.github.com/repos/code-squad/javascript-food/issues/comments{/number}","contents_url":"https://api.github.com/repos/code-squad/javascript-food/contents/{+path}","compare_url":"https://api.github.com/repos/code-squad/javascript-food/compare/{base}...{head}","merges_url":"https://api.github.com/repos/code-squad/javascript-food/merges","archive_url":"https://api.github.com/repos/code-squad/javascript-food/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/code-squad/javascript-food/downloads","issues_url":"https://api.github.com/repos/code-squad/javascript-food/issues{/number}","pulls_url":"https://api.github.com/repos/code-squad/javascript-food/pulls{/number}","milestones_url":"https://api.github.com/repos/code-squad/javascript-food/milestones{/number}","notifications_url":"https://api.github.com/repos/code-squad/javascript-food/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/code-squad/javascript-food/labels{/name}","releases_url":"https://api.github.com/repos/code-squad/javascript-food/releases{/id}","deployments_url":"https://api.github.com/repos/code-squad/javascript-food/deployments","created_at":"2017-11-21T05:33:35Z","updated_at":"2017-12-07T00:41:00Z","pushed_at":"2018-04-26T08:39:30Z","git_url":"git://github.com/code-squad/javascript-food.git","ssh_url":"git@github.com:code-squad/javascript-food.git","clone_url":"https://github.com/code-squad/javascript-food.git","svn_url":"https://github.com/code-squad/javascript-food","homepage":null,"size":11861,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":6,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/code-squad/javascript-food/pulls/20"},"html":{"href":"https://github.com/code-squad/javascript-food/pull/20"},"issue":{"href":"https://api.github.com/repos/code-squad/javascript-food/issues/20"},"comments":{"href":"https://api.github.com/repos/code-squad/javascript-food/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/code-squad/javascript-food/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/code-squad/javascript-food/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/code-squad/javascript-food/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/code-squad/javascript-food/statuses/f5ac01514af93607ab5b079a42904c05088f86ec"}},"author_association":"NONE"}}
{"actor":{"display_login":"LumiLoves"}}