{"action":"created","issue":{"url":"https://api.github.com/repos/strongloop/loopback-boot/issues/181","repository_url":"https://api.github.com/repos/strongloop/loopback-boot","labels_url":"https://api.github.com/repos/strongloop/loopback-boot/issues/181/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback-boot/issues/181/comments","events_url":"https://api.github.com/repos/strongloop/loopback-boot/issues/181/events","html_url":"https://github.com/strongloop/loopback-boot/pull/181","id":146956070,"number":181,"title":"Initial PoC to refactor loopback-boot","user":{"login":"raymondfeng","id":540892,"avatar_url":"https://avatars.githubusercontent.com/u/540892?v=3","gravatar_id":"","url":"https://api.github.com/users/raymondfeng","html_url":"https://github.com/raymondfeng","followers_url":"https://api.github.com/users/raymondfeng/followers","following_url":"https://api.github.com/users/raymondfeng/following{/other_user}","gists_url":"https://api.github.com/users/raymondfeng/gists{/gist_id}","starred_url":"https://api.github.com/users/raymondfeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raymondfeng/subscriptions","organizations_url":"https://api.github.com/users/raymondfeng/orgs","repos_url":"https://api.github.com/users/raymondfeng/repos","events_url":"https://api.github.com/users/raymondfeng/events{/privacy}","received_events_url":"https://api.github.com/users/raymondfeng/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback-boot/labels/%23review","name":"#review","color":"eeeeee"},{"url":"https://api.github.com/repos/strongloop/loopback-boot/labels/API%20Connect","name":"API Connect","color":"eeeeee"}],"state":"open","locked":false,"assignee":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2016-04-08T15:13:52Z","updated_at":"2016-05-13T07:28:06Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/strongloop/loopback-boot/pulls/181","html_url":"https://github.com/strongloop/loopback-boot/pull/181","diff_url":"https://github.com/strongloop/loopback-boot/pull/181.diff","patch_url":"https://github.com/strongloop/loopback-boot/pull/181.patch"},"body":"The current boot process consists of three steps: \r\n- load \r\n- compile\r\n- execute\r\n\r\nIt hard-codes logic to handle various artifact types:\r\n- data source\r\n- model\r\n- mixin\r\n- middleware\r\n- boot script\r\n\r\nThe problems with the current design/implementation are:\r\n- lack of extensibility \r\n- no clean separation of different types of artifacts\r\n\r\nThe PR proposes the following changes:\r\n- refactor logic of processing artifacts into their own classes\r\n- introduce `Container` as the main class for bootstrapping and build a registry of handlers during boot to organize them by a hierarchy denoted by path\r\n- adopt `middleware` like registration and invocation\r\n  - container.use(path, handler)\r\n  - container.run(context, done)\r\n- allow more phases during boot\r\n- explore dependency injection\r\n- \r\n\r\nConnect to #188"},"comment":{"url":"https://api.github.com/repos/strongloop/loopback-boot/issues/comments/218970971","html_url":"https://github.com/strongloop/loopback-boot/pull/181#issuecomment-218970971","issue_url":"https://api.github.com/repos/strongloop/loopback-boot/issues/181","id":218970971,"user":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"created_at":"2016-05-13T07:28:06Z","updated_at":"2016-05-13T07:28:06Z","body":"@raymondfeng could you please comment on the questions I posted in https://github.com/strongloop/loopback-boot/pull/181#issuecomment-208767034?"}}