{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom/issues/5756","repository_url":"https://api.github.com/repos/atom/atom","labels_url":"https://api.github.com/repos/atom/atom/issues/5756/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom/issues/5756/comments","events_url":"https://api.github.com/repos/atom/atom/issues/5756/events","html_url":"https://github.com/atom/atom/issues/5756","id":59008618,"number":5756,"title":"Let's choose a view framework for docs, generated packages, etc.","user":{"login":"thedaniel","id":1476,"avatar_url":"https://avatars0.githubusercontent.com/u/1476?v=4","gravatar_id":"","url":"https://api.github.com/users/thedaniel","html_url":"https://github.com/thedaniel","followers_url":"https://api.github.com/users/thedaniel/followers","following_url":"https://api.github.com/users/thedaniel/following{/other_user}","gists_url":"https://api.github.com/users/thedaniel/gists{/gist_id}","starred_url":"https://api.github.com/users/thedaniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thedaniel/subscriptions","organizations_url":"https://api.github.com/users/thedaniel/orgs","repos_url":"https://api.github.com/users/thedaniel/repos","events_url":"https://api.github.com/users/thedaniel/events{/privacy}","received_events_url":"https://api.github.com/users/thedaniel/received_events","type":"User","site_admin":false},"labels":[{"id":163641905,"url":"https://api.github.com/repos/atom/atom/labels/atom","name":"atom","color":"f7c6c7","default":false},{"id":7856440,"url":"https://api.github.com/repos/atom/atom/labels/enhancement","name":"enhancement","color":"bfd4f2","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":131,"created_at":"2015-02-26T02:38:02Z","updated_at":"2018-03-31T22:36:28Z","closed_at":"2017-07-03T18:45:01Z","author_association":"CONTRIBUTOR","body":"(This is an attempt to restate #3752, explain the current position and present options)\n## A blessed view system for Atom\n\nWe're in an interesting place with respect to generating views in packages and core. We wrote [space-pen](https://github.com/atom/space-pen) and used it heavily, but ultimately decided to discontinue using it for new views ([though some base views still use space-pen](https://github.com/atom/atom-space-pen-views) we are no longer recommending it). So now we find ourselves in an unfortunate position of using the DOM APIs directly, and suggesting package authors do the same, choose a framework themselves, or ╮(. ❛ ᴗ ❛.)╭ - Not a great place to be, and makes it hard to write docs with nice examples.\n\nWe used React in the editor component for six months or so, and it was a good experience, but it has a bit of a learning curve.\n\nWe experimented with a few things inspired by React and Polymer, and have done some research on 3rd-party view frameworks, but haven't come to a decision. As we work on better docs for the run up to 1.0, we have to start taking this seriously.\n## Requirements\n- Embrace modern browser features (custom elements, `Object.observe`, etc) as much as possible\n- It absolutely does not pollute the global namespace\n- Data-binding preferred to imperative updates if templates are used\n- View model / MVVM-style separation of rendering and logic\n- No dependencies on jQuery-like helper libs\n- Small learning curve\n  - somewhat self-explanatory when used in docs examples\n  - in other words, most web developers will be able to recognize the concepts that are applied without reading a book on it\n## Contenders / experiments\n- [React](http://facebook.github.io/react/)\n- [Etch](https://github.com/nathansobo/etch) - a library for writing HTML-based view components that provides the convenience of a virtual DOM while at the same time striving to be minimal, interoperable, and explicit - written by @nathansobo and @maxbrunsfeld \n- [rivets](http://rivetsjs.com/) for templating+data binding plus some basic JS object glue for Atom\n- [television](https://github.com/atom/television) - \"Television aims to cleanly integrate the virtual DOM approach of React.js into HTML 5 custom elements.\" - an experiment from @nathansobo\n- [virtual-dom](https://github.com/Matt-Esch/virtual-dom) this library is used by `television`, but could be a component in a similar solution that accomplishes the above goals.\n- [elmer](https://github.com/atom/elmer) - An experiment from @benogle based on Polymer's template binding\n- [vue.js](http://vuejs.org/) - simple, component-based, simple & small\n- Something custom, delightful & new from your friends the Atom team (but we don't reallllly want to maintain another view frameowrk)\n## Want to help?\n\nOne way to help speed this along is to do some experimentation with using your favorite framework in a package. See https://github.com/benogle/template-explore as an example package using https://github.com/atom/elmer.\n\nA couple questions I would try to answer with the package:\n- How does it handle model/DOM updates? Data-binding? Imperative + virtual-dom like react?\n- How does it handle events? i.e. How do I bind a click handler to an element?\n- Can it work with `Object.observe` and not it's own model system?\n- Does it inject _any_ globals?\n- How does it interact with web components, both in terms of creating new ones and using existing components written using different frameworks?\n## Discuss\n\nWe're interested in hearing the pros and cons of the various ways we can satisfy the items listed under requirements, recommendations for solutions we don't have listed, and questions about the reqs and how and why we arrived at them.\n\nAlso, I encourage @atom/core and maintainers to edit the Contenders section in the issue body as more come in, and let me know if I missed / misstated anything in Requirements\n"},"comment":{"url":"https://api.github.com/repos/atom/atom/issues/comments/377728315","html_url":"https://github.com/atom/atom/issues/5756#issuecomment-377728315","issue_url":"https://api.github.com/repos/atom/atom/issues/5756","id":377728315,"user":{"login":"lock[bot]","id":33595554,"avatar_url":"https://avatars1.githubusercontent.com/in/6672?v=4","gravatar_id":"","url":"https://api.github.com/users/lock%5Bbot%5D","html_url":"https://github.com/apps/lock","followers_url":"https://api.github.com/users/lock%5Bbot%5D/followers","following_url":"https://api.github.com/users/lock%5Bbot%5D/following{/other_user}","gists_url":"https://api.github.com/users/lock%5Bbot%5D/gists{/gist_id}","starred_url":"https://api.github.com/users/lock%5Bbot%5D/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lock%5Bbot%5D/subscriptions","organizations_url":"https://api.github.com/users/lock%5Bbot%5D/orgs","repos_url":"https://api.github.com/users/lock%5Bbot%5D/repos","events_url":"https://api.github.com/users/lock%5Bbot%5D/events{/privacy}","received_events_url":"https://api.github.com/users/lock%5Bbot%5D/received_events","type":"Bot","site_admin":false},"created_at":"2018-03-31T22:36:28Z","updated_at":"2018-03-31T22:36:28Z","author_association":"NONE","body":"This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in [Safe Mode](https://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode) then please open a new issue and fill out [the entire issue template](https://github.com/atom/atom/blob/master/ISSUE_TEMPLATE.md) to ensure that we have enough information to address your issue. Thanks!\n"}}
{"actor":{"display_login":"lock"}}