{"action":"created","issue":{"url":"https://api.github.com/repos/10up/Engineering-Best-Practices/issues/189","repository_url":"https://api.github.com/repos/10up/Engineering-Best-Practices","labels_url":"https://api.github.com/repos/10up/Engineering-Best-Practices/issues/189/labels{/name}","comments_url":"https://api.github.com/repos/10up/Engineering-Best-Practices/issues/189/comments","events_url":"https://api.github.com/repos/10up/Engineering-Best-Practices/issues/189/events","html_url":"https://github.com/10up/Engineering-Best-Practices/issues/189","id":220822219,"number":189,"title":"Breaking Up with Backbone.js","user":{"login":"tlovett1","id":1844351,"avatar_url":"https://avatars3.githubusercontent.com/u/1844351?v=4","gravatar_id":"","url":"https://api.github.com/users/tlovett1","html_url":"https://github.com/tlovett1","followers_url":"https://api.github.com/users/tlovett1/followers","following_url":"https://api.github.com/users/tlovett1/following{/other_user}","gists_url":"https://api.github.com/users/tlovett1/gists{/gist_id}","starred_url":"https://api.github.com/users/tlovett1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tlovett1/subscriptions","organizations_url":"https://api.github.com/users/tlovett1/orgs","repos_url":"https://api.github.com/users/tlovett1/repos","events_url":"https://api.github.com/users/tlovett1/events{/privacy}","received_events_url":"https://api.github.com/users/tlovett1/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2017-04-11T02:30:48Z","updated_at":"2018-04-05T16:43:52Z","closed_at":null,"author_association":"OWNER","body":"*Well everyone, I think it's finally time... to break up with [Backbone.js](http://backbonejs.org/).* I'm opening up this thread as a discussion, not a mandate. I'd like 10up Engineering (and the community) to fully get behind the future of advanced JS applications in WordPress, whichever direction we choose.\r\n\r\n## Why?\r\n\r\nBackbone.js is an integral part of WordPress. We decided on Backbone as the JavaScript \"framework\" for our clients in 2014 because it was the WordPress way. Backbone is still a major part of WordPress (i.e. media library). However, WordPress and the web have both made strides towards more modern \"frameworks\" and \"stacks\".\r\n\r\nMy main issues with Backbone.js are:\r\n\r\n1. Large applications are always a tangled mess. 10up projects that utilize large Backbone applications are nearly impossible to understand by anyone who didn't write the original code. I've seen this time and time again. I'd argue the same applies to WordPress (i.e. media library again). Backbone views are absolutely terrible for organizing code.\r\n1. Backbone.js is tied to jQuery. jQuery is great. However, Backbone leads engineers to overuse it.\r\n1. Backbone has been pretty much feature complete since version 1.0 (years ago) [1].\r\n1. The Backbone ecosystem is, compared to other large open source projects, somewhat inactive [1].\r\n\r\n[[1]](https://benmccormick.org/2016/03/07/the-sad-state-of-the-backbone-ecosystem/)\r\n\r\n\r\n## What Should We Use to Build JavaScript Applications Going Forward?\r\n\r\nI'd like to nominate [React.js](https://facebook.github.io/react/) and it's extremely powerful set of related tools. Here's why:\r\n\r\n1. Large scale React based applications are extremely maintainable and relatively quick to create. Rendering views and keeping track of state are very easy (total opposite in Backbone.js).\r\n1. React.js applications, built properly, are extremely performant due to the virtual DOM concept.\r\n1. React.js has massive community backing and is a top contender for [most popular JavaScript framework in 2016](http://stateofjs.com/2016/frontend/). Additionally, the tools and frameworks built around React.js are numerous and well maintained.\r\n1. React.js is a powerful tool for building isomorphic applications as well as native phone applications.\r\n1. The WordPress community is arguably making it's way to React.js. Automattic's [Calypso platform](https://github.com/Automattic/wp-calypso) is built entirely on React.js. While WordPress core may still be on Backbone.js, React is probably the preferred JavaScript framework for WordPress developers.\r\n\r\n## Next Steps\r\n\r\nLet's decide if as a company we want to move to React.js. If so, new JavaScript application projects (when a JS framework is appropriate) will be built in React.js instead of Backbone.js. Old projects built in Backbone.js will stay as is.\r\n\r\nI'd also like us to write a React.js section in our Best Practices. The tools and patterns surrounding React.js are constantly changing. Therefore we'll need to be very careful on requiring any specific design pattern or tool. I think this section can be mostly \"high level\".\r\n\r\n\r\nThoughts?"},"comment":{"url":"https://api.github.com/repos/10up/Engineering-Best-Practices/issues/comments/379000553","html_url":"https://github.com/10up/Engineering-Best-Practices/issues/189#issuecomment-379000553","issue_url":"https://api.github.com/repos/10up/Engineering-Best-Practices/issues/189","id":379000553,"user":{"login":"tylercherpak","id":3385974,"avatar_url":"https://avatars2.githubusercontent.com/u/3385974?v=4","gravatar_id":"","url":"https://api.github.com/users/tylercherpak","html_url":"https://github.com/tylercherpak","followers_url":"https://api.github.com/users/tylercherpak/followers","following_url":"https://api.github.com/users/tylercherpak/following{/other_user}","gists_url":"https://api.github.com/users/tylercherpak/gists{/gist_id}","starred_url":"https://api.github.com/users/tylercherpak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tylercherpak/subscriptions","organizations_url":"https://api.github.com/users/tylercherpak/orgs","repos_url":"https://api.github.com/users/tylercherpak/repos","events_url":"https://api.github.com/users/tylercherpak/events{/privacy}","received_events_url":"https://api.github.com/users/tylercherpak/received_events","type":"User","site_admin":false},"created_at":"2018-04-05T16:43:52Z","updated_at":"2018-04-05T16:43:52Z","author_association":"NONE","body":"I would like to resurface this now that gutenberg is coming soon. Anyone have new perspective specially with regards to the new admin interface?"}}
{"actor":{"display_login":"tylercherpak"}}