{"action":"created","comment":{"url":"https://api.github.com/repos/twosigma/goll-e/pulls/comments/25046800","id":25046800,"diff_hunk":"@@ -1,50 +1,44 @@\n+var Lang = require('./../utilities/lang');\n+var AttrValidators = require('./../utilities/attrValidators');\n+var createClass = require('./../utilities/createClass');\n+var GraphModelBase = require('./graphModelBase');\n+\n+var Port = require('./port');\n+\n /**\n- * connection.js\n- * @author Salvador Abate\n  * Definition for the Connection class. A Connection is the linkage between a\n  * Node's Output and another (potentially different) node's Input.\n  * \n  * Alternatively, in the situation where a node is contained within another node,\n  * the containee can have a connection from one of its Outputs to one of the\n  * container's Outputs. The same applies for Inputs.\n- */\n-\n-/**\n- * Creates a new connection.\n+ * \n+ * @class Connection\n  * @constructor\n  *\n- * @param id - The Connection's unique identifier.\n- * @param from - The Output object that is the connection's source.\n- * @param to - The Input object that is the connection's target.\n- * @param metadata - A standard JavaScript object containing key-value metadata.\n+ * @param config.id - The Connection's unique identifier.","path":"lib/model/connection.js","position":29,"original_position":29,"commit_id":"285b71088c68dbf72187ce34fb92de5e506c6379","original_commit_id":"ba5e6bcfc20fc4a496ffc7a443e984fd7e28b468","user":{"login":"RobertWarrenGilmore","id":4361000,"avatar_url":"https://avatars.githubusercontent.com/u/4361000?v=3","gravatar_id":"","url":"https://api.github.com/users/RobertWarrenGilmore","html_url":"https://github.com/RobertWarrenGilmore","followers_url":"https://api.github.com/users/RobertWarrenGilmore/followers","following_url":"https://api.github.com/users/RobertWarrenGilmore/following{/other_user}","gists_url":"https://api.github.com/users/RobertWarrenGilmore/gists{/gist_id}","starred_url":"https://api.github.com/users/RobertWarrenGilmore/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobertWarrenGilmore/subscriptions","organizations_url":"https://api.github.com/users/RobertWarrenGilmore/orgs","repos_url":"https://api.github.com/users/RobertWarrenGilmore/repos","events_url":"https://api.github.com/users/RobertWarrenGilmore/events{/privacy}","received_events_url":"https://api.github.com/users/RobertWarrenGilmore/received_events","type":"User","site_admin":false},"body":"Ah. Got it.","created_at":"2015-02-20T03:07:15Z","updated_at":"2015-02-20T03:07:15Z","html_url":"https://github.com/twosigma/goll-e/pull/12#discussion_r25046800","pull_request_url":"https://api.github.com/repos/twosigma/goll-e/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/comments/25046800"},"html":{"href":"https://github.com/twosigma/goll-e/pull/12#discussion_r25046800"},"pull_request":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/twosigma/goll-e/pulls/12","id":29480277,"html_url":"https://github.com/twosigma/goll-e/pull/12","diff_url":"https://github.com/twosigma/goll-e/pull/12.diff","patch_url":"https://github.com/twosigma/goll-e/pull/12.patch","issue_url":"https://api.github.com/repos/twosigma/goll-e/issues/12","number":12,"state":"open","locked":false,"title":"New Data Models backed by Attributes, Events, and fancy class creation and stuff. [GOL-111]","user":{"login":"jboolean","id":406931,"avatar_url":"https://avatars.githubusercontent.com/u/406931?v=3","gravatar_id":"","url":"https://api.github.com/users/jboolean","html_url":"https://github.com/jboolean","followers_url":"https://api.github.com/users/jboolean/followers","following_url":"https://api.github.com/users/jboolean/following{/other_user}","gists_url":"https://api.github.com/users/jboolean/gists{/gist_id}","starred_url":"https://api.github.com/users/jboolean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jboolean/subscriptions","organizations_url":"https://api.github.com/users/jboolean/orgs","repos_url":"https://api.github.com/users/jboolean/repos","events_url":"https://api.github.com/users/jboolean/events{/privacy}","received_events_url":"https://api.github.com/users/jboolean/received_events","type":"User","site_admin":false},"body":"So this poured out of my brain. \r\nI could have just created new data models, but I like doing things that are generic and reusable, and hopefully helpful for many different things. So I created something called **Attributes** (I know you're sick of me going on about YUI, but these are modeled highly after YUI but they're ours and not as heavy. I did look around for existing solutions but didn't see anything I liked). And I created a simple events system (**EventTarget**) based on the observer pattern. Then I created a **class creation utility**, because I find creating classes in javascript to be a pain in the butt. And this required I have nice mixins so I created **`augment`** to do mixins.\r\n\r\nAfter all that I used all this stuff to make **new graph data models**. Then I removed the hacky reference to the global render function and replaced it with events that propagate up to the Graph and make it re-render. \r\n\r\nInstead of re-explaining everything here, there are some big comment blocks in the code that document stuff in much more details.\r\n\r\nOpen for feedback. I think this was easier shown than described, so here it is working, but it can of course be changed.","created_at":"2015-02-17T21:42:00Z","updated_at":"2015-02-20T03:07:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"205603d1f29dce17b74ccfec8da24fb7cf0ef5a3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twosigma/goll-e/pulls/12/commits","review_comments_url":"https://api.github.com/repos/twosigma/goll-e/pulls/12/comments","review_comment_url":"https://api.github.com/repos/twosigma/goll-e/pulls/comments/{number}","comments_url":"https://api.github.com/repos/twosigma/goll-e/issues/12/comments","statuses_url":"https://api.github.com/repos/twosigma/goll-e/statuses/285b71088c68dbf72187ce34fb92de5e506c6379","head":{"label":"attributes","ref":"attributes","sha":"285b71088c68dbf72187ce34fb92de5e506c6379","user":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"repo":{"id":23775641,"name":"goll-e","full_name":"twosigma/goll-e","owner":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twosigma/goll-e","description":"Graph Object Language and Layout Editor","fork":false,"url":"https://api.github.com/repos/twosigma/goll-e","forks_url":"https://api.github.com/repos/twosigma/goll-e/forks","keys_url":"https://api.github.com/repos/twosigma/goll-e/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twosigma/goll-e/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twosigma/goll-e/teams","hooks_url":"https://api.github.com/repos/twosigma/goll-e/hooks","issue_events_url":"https://api.github.com/repos/twosigma/goll-e/issues/events{/number}","events_url":"https://api.github.com/repos/twosigma/goll-e/events","assignees_url":"https://api.github.com/repos/twosigma/goll-e/assignees{/user}","branches_url":"https://api.github.com/repos/twosigma/goll-e/branches{/branch}","tags_url":"https://api.github.com/repos/twosigma/goll-e/tags","blobs_url":"https://api.github.com/repos/twosigma/goll-e/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twosigma/goll-e/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twosigma/goll-e/git/refs{/sha}","trees_url":"https://api.github.com/repos/twosigma/goll-e/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twosigma/goll-e/statuses/{sha}","languages_url":"https://api.github.com/repos/twosigma/goll-e/languages","stargazers_url":"https://api.github.com/repos/twosigma/goll-e/stargazers","contributors_url":"https://api.github.com/repos/twosigma/goll-e/contributors","subscribers_url":"https://api.github.com/repos/twosigma/goll-e/subscribers","subscription_url":"https://api.github.com/repos/twosigma/goll-e/subscription","commits_url":"https://api.github.com/repos/twosigma/goll-e/commits{/sha}","git_commits_url":"https://api.github.com/repos/twosigma/goll-e/git/commits{/sha}","comments_url":"https://api.github.com/repos/twosigma/goll-e/comments{/number}","issue_comment_url":"https://api.github.com/repos/twosigma/goll-e/issues/comments/{number}","contents_url":"https://api.github.com/repos/twosigma/goll-e/contents/{+path}","compare_url":"https://api.github.com/repos/twosigma/goll-e/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twosigma/goll-e/merges","archive_url":"https://api.github.com/repos/twosigma/goll-e/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twosigma/goll-e/downloads","issues_url":"https://api.github.com/repos/twosigma/goll-e/issues{/number}","pulls_url":"https://api.github.com/repos/twosigma/goll-e/pulls{/number}","milestones_url":"https://api.github.com/repos/twosigma/goll-e/milestones{/number}","notifications_url":"https://api.github.com/repos/twosigma/goll-e/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twosigma/goll-e/labels{/name}","releases_url":"https://api.github.com/repos/twosigma/goll-e/releases{/id}","created_at":"2014-09-08T01:19:14Z","updated_at":"2014-10-02T14:48:36Z","pushed_at":"2015-02-19T23:29:08Z","git_url":"git://github.com/twosigma/goll-e.git","ssh_url":"git@github.com:twosigma/goll-e.git","clone_url":"https://github.com/twosigma/goll-e.git","svn_url":"https://github.com/twosigma/goll-e","homepage":null,"size":1359,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":3,"default_branch":"master"}},"base":{"label":"develop","ref":"develop","sha":"d70b5499f0eb87352b895c30f78a0e392e0d91b0","user":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"repo":{"id":23775641,"name":"goll-e","full_name":"twosigma/goll-e","owner":{"login":"twosigma","id":4049181,"avatar_url":"https://avatars.githubusercontent.com/u/4049181?v=3","gravatar_id":"","url":"https://api.github.com/users/twosigma","html_url":"https://github.com/twosigma","followers_url":"https://api.github.com/users/twosigma/followers","following_url":"https://api.github.com/users/twosigma/following{/other_user}","gists_url":"https://api.github.com/users/twosigma/gists{/gist_id}","starred_url":"https://api.github.com/users/twosigma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twosigma/subscriptions","organizations_url":"https://api.github.com/users/twosigma/orgs","repos_url":"https://api.github.com/users/twosigma/repos","events_url":"https://api.github.com/users/twosigma/events{/privacy}","received_events_url":"https://api.github.com/users/twosigma/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/twosigma/goll-e","description":"Graph Object Language and Layout Editor","fork":false,"url":"https://api.github.com/repos/twosigma/goll-e","forks_url":"https://api.github.com/repos/twosigma/goll-e/forks","keys_url":"https://api.github.com/repos/twosigma/goll-e/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twosigma/goll-e/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twosigma/goll-e/teams","hooks_url":"https://api.github.com/repos/twosigma/goll-e/hooks","issue_events_url":"https://api.github.com/repos/twosigma/goll-e/issues/events{/number}","events_url":"https://api.github.com/repos/twosigma/goll-e/events","assignees_url":"https://api.github.com/repos/twosigma/goll-e/assignees{/user}","branches_url":"https://api.github.com/repos/twosigma/goll-e/branches{/branch}","tags_url":"https://api.github.com/repos/twosigma/goll-e/tags","blobs_url":"https://api.github.com/repos/twosigma/goll-e/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twosigma/goll-e/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twosigma/goll-e/git/refs{/sha}","trees_url":"https://api.github.com/repos/twosigma/goll-e/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twosigma/goll-e/statuses/{sha}","languages_url":"https://api.github.com/repos/twosigma/goll-e/languages","stargazers_url":"https://api.github.com/repos/twosigma/goll-e/stargazers","contributors_url":"https://api.github.com/repos/twosigma/goll-e/contributors","subscribers_url":"https://api.github.com/repos/twosigma/goll-e/subscribers","subscription_url":"https://api.github.com/repos/twosigma/goll-e/subscription","commits_url":"https://api.github.com/repos/twosigma/goll-e/commits{/sha}","git_commits_url":"https://api.github.com/repos/twosigma/goll-e/git/commits{/sha}","comments_url":"https://api.github.com/repos/twosigma/goll-e/comments{/number}","issue_comment_url":"https://api.github.com/repos/twosigma/goll-e/issues/comments/{number}","contents_url":"https://api.github.com/repos/twosigma/goll-e/contents/{+path}","compare_url":"https://api.github.com/repos/twosigma/goll-e/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twosigma/goll-e/merges","archive_url":"https://api.github.com/repos/twosigma/goll-e/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twosigma/goll-e/downloads","issues_url":"https://api.github.com/repos/twosigma/goll-e/issues{/number}","pulls_url":"https://api.github.com/repos/twosigma/goll-e/pulls{/number}","milestones_url":"https://api.github.com/repos/twosigma/goll-e/milestones{/number}","notifications_url":"https://api.github.com/repos/twosigma/goll-e/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twosigma/goll-e/labels{/name}","releases_url":"https://api.github.com/repos/twosigma/goll-e/releases{/id}","created_at":"2014-09-08T01:19:14Z","updated_at":"2014-10-02T14:48:36Z","pushed_at":"2015-02-19T23:29:08Z","git_url":"git://github.com/twosigma/goll-e.git","ssh_url":"git@github.com:twosigma/goll-e.git","clone_url":"https://github.com/twosigma/goll-e.git","svn_url":"https://github.com/twosigma/goll-e","homepage":null,"size":1359,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/12"},"html":{"href":"https://github.com/twosigma/goll-e/pull/12"},"issue":{"href":"https://api.github.com/repos/twosigma/goll-e/issues/12"},"comments":{"href":"https://api.github.com/repos/twosigma/goll-e/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/twosigma/goll-e/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/twosigma/goll-e/statuses/285b71088c68dbf72187ce34fb92de5e506c6379"}}}}