{"action":"created","issue":{"url":"https://api.github.com/repos/pheryjs/phery/issues/45","repository_url":"https://api.github.com/repos/pheryjs/phery","labels_url":"https://api.github.com/repos/pheryjs/phery/issues/45/labels{/name}","comments_url":"https://api.github.com/repos/pheryjs/phery/issues/45/comments","events_url":"https://api.github.com/repos/pheryjs/phery/issues/45/events","html_url":"https://github.com/pheryjs/phery/issues/45","id":163740676,"number":45,"title":"README - Documentation not really that \"simple\"","user":{"login":"Chealer","id":486141,"avatar_url":"https://avatars.githubusercontent.com/u/486141?v=3","gravatar_id":"","url":"https://api.github.com/users/Chealer","html_url":"https://github.com/Chealer","followers_url":"https://api.github.com/users/Chealer/followers","following_url":"https://api.github.com/users/Chealer/following{/other_user}","gists_url":"https://api.github.com/users/Chealer/gists{/gist_id}","starred_url":"https://api.github.com/users/Chealer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chealer/subscriptions","organizations_url":"https://api.github.com/users/Chealer/orgs","repos_url":"https://api.github.com/users/Chealer/repos","events_url":"https://api.github.com/users/Chealer/events{/privacy}","received_events_url":"https://api.github.com/users/Chealer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-04T20:41:46Z","updated_at":"2016-07-08T03:20:11Z","closed_at":null,"body":"[The README's Documentation section](https://github.com/pheryjs/phery#documentation) starts with:\r\n\r\n> It's really simple as:\r\n> \r\n```\r\n> <?php\r\n>     require_once 'vendor/autoload.php';\r\n>     use Phery\\Phery;\r\n>     Phery::instance()\r\n>     ->set(array(\r\n>         'function_name' => function($data){\r\n>                 return\r\n>                     PheryResponse::factory()\r\n>                         ->jquery('<div/>', array('text' => 'text content'))\r\n>                         ->appendTo('body')\r\n>                         ->call('func', 'list', true);\r\n>         }\r\n>     ))->process();\r\n> ?>\r\n> <!doctype html>\r\n> <html>\r\n>     <head>\r\n>         <script src=\"//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js\"></script>\r\n>         <script src=\"phery.js\"></script>\r\n>         <script>\r\n>             function func(name, override){\r\n>                 /* function */\r\n>             }\r\n>         </script>\r\n>     </head>\r\n>     <body>\r\n>         <?php echo Phery::link_to('Click me', 'function_name'); ?>\r\n>     </body>\r\n> </html>\r\n```\r\n> \r\n> When clicking a link with data-phery-remote, it will automatically call the \"function_name\" callback, that will return a response and apply everything automagically\r\n\r\nI suppose \"It's really simple as:\" is supposed to read \"It's really **as** simple as:\". If so, considering that the README seems to be targeting new users, this is quite misleading. The example refers to 2 previously undiscussed classes and 8 previously undiscussed methods. It contains a statement which chains 3 methods, which embeds a statement which chains 4 different methods.\r\n\r\nSomeone who doesn't master jQuery would have a hard time understanding what the above is meant to do. Someone who doesn't know what autoloading is would notice that vendor/autoload.php does not exist and have trouble getting the code to work.\r\n\r\nThe explanation paragraph refers to _data-phery-remote_, which has not been defined before. It is also incorrect; only links with a data-phery-remote attribute set to \"function_name\" will call the _function-name_ callback.\r\n\r\nIf \"It\" refers to Phery, I do not think Phery.js - with its PHP API having tens of functions, its JavaScript API and a DOM interface - will be considered simple by many. If \"It\" means accomplishing what the example does using Phery.js, then it may look simple for someone who masters Phery.js indeed, but that is a minority of the audience.\r\n\r\nI recommend to avoid suggesting that Phery is simple. I also recommend to keep the example as simple as possible. And finally I recommend to explain what the example is meant to do."},"comment":{"url":"https://api.github.com/repos/pheryjs/phery/issues/comments/231266075","html_url":"https://github.com/pheryjs/phery/issues/45#issuecomment-231266075","issue_url":"https://api.github.com/repos/pheryjs/phery/issues/45","id":231266075,"user":{"login":"pocesar","id":461084,"avatar_url":"https://avatars.githubusercontent.com/u/461084?v=3","gravatar_id":"","url":"https://api.github.com/users/pocesar","html_url":"https://github.com/pocesar","followers_url":"https://api.github.com/users/pocesar/followers","following_url":"https://api.github.com/users/pocesar/following{/other_user}","gists_url":"https://api.github.com/users/pocesar/gists{/gist_id}","starred_url":"https://api.github.com/users/pocesar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pocesar/subscriptions","organizations_url":"https://api.github.com/users/pocesar/orgs","repos_url":"https://api.github.com/users/pocesar/repos","events_url":"https://api.github.com/users/pocesar/events{/privacy}","received_events_url":"https://api.github.com/users/pocesar/received_events","type":"User","site_admin":false},"created_at":"2016-07-08T03:20:11Z","updated_at":"2016-07-08T03:20:11Z","body":"Yes, the README needs to be updated for the alpha branch. \r\n\r\nThanks for the constructive criticism"}}
{"actor":{"display_login":"pocesar"}}