{"action":"created","issue":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/68","labels_url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/68/comments","events_url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/68/events","html_url":"https://github.com/ckeditor/ckeditor5-design/issues/68","id":98996280,"number":68,"title":"Name for a collection of transactions and a builder","user":{"login":"pjasiun","id":1166967,"avatar_url":"https://avatars.githubusercontent.com/u/1166967?v=3","gravatar_id":"","url":"https://api.github.com/users/pjasiun","html_url":"https://github.com/pjasiun","followers_url":"https://api.github.com/users/pjasiun/followers","following_url":"https://api.github.com/users/pjasiun/following{/other_user}","gists_url":"https://api.github.com/users/pjasiun/gists{/gist_id}","starred_url":"https://api.github.com/users/pjasiun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjasiun/subscriptions","organizations_url":"https://api.github.com/users/pjasiun/orgs","repos_url":"https://api.github.com/users/pjasiun/repos","events_url":"https://api.github.com/users/pjasiun/events{/privacy}","received_events_url":"https://api.github.com/users/pjasiun/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-08-04T15:29:13Z","updated_at":"2015-08-05T13:31:25Z","closed_at":null,"body":"Context. The only way for changing document is to apply transaction. Transaction is a set of operations (retain 5, insert 'f', insert 'o', insert 'o'). The `applyTransaction` will return the set on modified nodes which should be render later.\r\n\r\nMany times one feature will need to apply multiple transactions (insert new paragraph, insert text into this paragraph). All of them together will be a single undo step and changes will be render together too. \r\n\r\nAlso instead of creating transaction manually we need some kind of helper, so developer will call simply `createChildElement( parent, 'p' )` instead of thinking about `retain` and `insert` operations.\r\n\r\nNow we need a good name for such collection of transactions and a builder.\r\n\r\nIf they will be called `Modification` and `Builder` the code will looks like this:\r\n```\r\nvar builder = new Builder( document );\r\nbuilder.addAttribute( range, bold );\r\nbuilder.modification.render();\r\n```\r\n\r\nBut maybe you have a better name. \r\n\r\nInstead of `Modification`: Alteration? Change? Transactions?\r\n\r\nInstead of `Builder`: Writer? Novelist? :)\r\n\r\nThis will be the main class to do any type of change in the document so it would be good to have a proper name for it."},"comment":{"url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/comments/127997554","html_url":"https://github.com/ckeditor/ckeditor5-design/issues/68#issuecomment-127997554","issue_url":"https://api.github.com/repos/ckeditor/ckeditor5-design/issues/68","id":127997554,"user":{"login":"pjasiun","id":1166967,"avatar_url":"https://avatars.githubusercontent.com/u/1166967?v=3","gravatar_id":"","url":"https://api.github.com/users/pjasiun","html_url":"https://github.com/pjasiun","followers_url":"https://api.github.com/users/pjasiun/followers","following_url":"https://api.github.com/users/pjasiun/following{/other_user}","gists_url":"https://api.github.com/users/pjasiun/gists{/gist_id}","starred_url":"https://api.github.com/users/pjasiun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pjasiun/subscriptions","organizations_url":"https://api.github.com/users/pjasiun/orgs","repos_url":"https://api.github.com/users/pjasiun/repos","events_url":"https://api.github.com/users/pjasiun/events{/privacy}","received_events_url":"https://api.github.com/users/pjasiun/received_events","type":"User","site_admin":false},"created_at":"2015-08-05T13:31:25Z","updated_at":"2015-08-05T13:31:25Z","body":"@jodator @zaak: I like your idea of the separate `Renderer`. But I am afraid that there will be too much code to write for each change. Note that `Builder` will be used every time anybody wants to change the Document. Changes need to be saved in the undo manager and rendered, every time. \r\n\r\nBut anyway `Renderer` is good code separation, so even if there will be some shortcut it will use `Renderer` anyway."}}