{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/guide/issues/8","labels_url":"https://api.github.com/repos/meteor/guide/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/meteor/guide/issues/8/comments","events_url":"https://api.github.com/repos/meteor/guide/issues/8/events","html_url":"https://github.com/meteor/guide/issues/8","id":110063818,"number":8,"title":"Blaze guide: Reusable components with Blaze","user":{"login":"stubailo","id":448783,"avatar_url":"https://avatars.githubusercontent.com/u/448783?v=3","gravatar_id":"","url":"https://api.github.com/users/stubailo","html_url":"https://github.com/stubailo","followers_url":"https://api.github.com/users/stubailo/followers","following_url":"https://api.github.com/users/stubailo/following{/other_user}","gists_url":"https://api.github.com/users/stubailo/gists{/gist_id}","starred_url":"https://api.github.com/users/stubailo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stubailo/subscriptions","organizations_url":"https://api.github.com/users/stubailo/orgs","repos_url":"https://api.github.com/users/stubailo/repos","events_url":"https://api.github.com/users/stubailo/events{/privacy}","received_events_url":"https://api.github.com/users/stubailo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/meteor/guide/labels/content","name":"content","color":"eb6420"},{"url":"https://api.github.com/repos/meteor/guide/labels/discussion","name":"discussion","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-10-06T17:52:48Z","updated_at":"2015-10-07T10:58:52Z","closed_at":null,"body":"I think it's pretty clear when you take a look at the application development landscape these days that people are pretty excited about reusable components. Blaze is a great templating system, but it doesn't quite give you everything you need to be able to reason about small parts of your app independently.\r\n\r\nMainly the issue is that it can be hard to look at a Blaze template and know how it will behave when used in different parts of your app. This involves a few issues:\r\n\r\n1. The tendency to use global data via `Session` - partly because using `Template.instance()` all the time is a lot of boilerplate\r\n2. The tendency to use global jQuery selectors, or HTML IDs, like `$('.error')`\r\n3. The data context being passed from outside of the template means the functionality depends on the outside environment in a poorly-defined way\r\n4. The way event maps work means they also catch events from child templates, which is something you might or might not want\r\n\r\n@mitar, can you help me understand to what extent your Blaze Components package solves these issues? Unfortunately, you're right - I haven't had enough time to look at it in depth, but I would like to learn more now.\r\n\r\nCopied below, the outline of the Blaze guide as proposed:\r\n\r\n--------\r\n\r\n### Blaze guide: The Tracker-based reactive templating system\r\n\r\nWrite “HTML with holes” just like you're used to, and get a fast, fine-grained, reactively updating page with no sweat.\r\n\r\n1. Spacebars syntax, and how to use the built-in helpers\r\n2. Building reusable components with Blaze\r\n3. How to use reactivity in a principled way\r\n4. Writing maintainable helpers and event handlers that aren't tightly coupled to HTML\r\n5. Reusing logic and HTML snippets between templates"},"comment":{"url":"https://api.github.com/repos/meteor/guide/issues/comments/146155297","html_url":"https://github.com/meteor/guide/issues/8#issuecomment-146155297","issue_url":"https://api.github.com/repos/meteor/guide/issues/8","id":146155297,"user":{"login":"tmeasday","id":132554,"avatar_url":"https://avatars.githubusercontent.com/u/132554?v=3","gravatar_id":"","url":"https://api.github.com/users/tmeasday","html_url":"https://github.com/tmeasday","followers_url":"https://api.github.com/users/tmeasday/followers","following_url":"https://api.github.com/users/tmeasday/following{/other_user}","gists_url":"https://api.github.com/users/tmeasday/gists{/gist_id}","starred_url":"https://api.github.com/users/tmeasday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmeasday/subscriptions","organizations_url":"https://api.github.com/users/tmeasday/orgs","repos_url":"https://api.github.com/users/tmeasday/repos","events_url":"https://api.github.com/users/tmeasday/events{/privacy}","received_events_url":"https://api.github.com/users/tmeasday/received_events","type":"User","site_admin":false},"created_at":"2015-10-07T10:58:52Z","updated_at":"2015-10-07T10:58:52Z","body":"(Basically I am in agreement with @Sanjo I think ;) )"}}