{"id":1849,"date":"2014-04-27T22:06:19","date_gmt":"2014-04-28T02:06:19","guid":{"rendered":"http:\/\/www.rexfeng.com\/blog\/?p=1849"},"modified":"2014-04-27T22:06:19","modified_gmt":"2014-04-28T02:06:19","slug":"maintainable-client-javascript","status":"publish","type":"post","link":"https:\/\/www.rexfeng.com\/blog\/2014\/04\/maintainable-client-javascript\/","title":{"rendered":"Maintainable Client JavaScript"},"content":{"rendered":"<p>I&#8217;ve been reading\u00a0<a href=\"http:\/\/shop.oreilly.com\/product\/0636920025245.do\">Maintainable JavaScript<\/a> by\u00a0<a href=\"http:\/\/www.nczonline.net\/\">Nicholas C. Zakas<\/a> lately. It has been very insightful into best practices across larger teams. When you have a large team and adopt a consistent coding style, it makes working across your codebase easier.<\/p>\n<p>In Chapter 5 of the book, Zakas covers the UI as a mix of HTML, CSS, and Javascript. He mentions that tightly coupling these three layers makes it &#8220;<em>impossible to make small changes without changing one or two other layers.<\/em>&#8221;<\/p>\n<p>Also, I&#8217;ve been working\u00a0with <a href=\"angularjs.org\">AngularJS<\/a> recently. I understand the benefits of a front end framework to keep data in sync throughout your client.\u00a0Angular fans\u00a0tout the benefits of a SPA (single page application) framework.<\/p>\n<p>As someone who strives to\u00a0separate the structure (HTML) from the scripting (JS), Angular feels too tightly coupled to me. Angular works by tagging everything with [cci]ng-[\/cci] and letting the magic work behind the scenes. The\u00a0application dependencies are hardcoded everywhere in your HTML, and there is no way to swap your\u00a0framework without changing your HTML drastically.<\/p>\n<p>I&#8217;ve worked with <a href=\"http:\/\/backbonejs.org\/\">Backbone<\/a> in the past, and now I&#8217;m trying out Angular. At some point, I&#8217;ll probably try out <a href=\"http:\/\/emberjs.com\/\">Ember<\/a>. I&#8217;d like a front end framework that plays well with <a href=\"http:\/\/rubyonrails.org\/\">Rails<\/a>, so perhaps Ember will be fun.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve been reading\u00a0Maintainable JavaScript by\u00a0Nicholas C. Zakas lately. It has been very insightful into best practices across larger teams. When you have a large team and adopt a consistent coding style, it makes working across your codebase easier. In Chapter 5 of the book, Zakas covers the UI as a mix of HTML, CSS, and [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1029],"tags":[1119,1120,1114,964,1117,1118,1116,1115,1126,1054,1124,1122,1125,1123,635,1121],"class_list":["post-1849","post","type-post","status-publish","format-standard","hentry","category-programming","tag-angular","tag-backbone","tag-client","tag-code","tag-dev","tag-ember","tag-framework","tag-frontend","tag-guide","tag-js","tag-large","tag-maintainable","tag-style","tag-teams","tag-web","tag-zakas"],"_links":{"self":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1849","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/comments?post=1849"}],"version-history":[{"count":1,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1849\/revisions"}],"predecessor-version":[{"id":1850,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/posts\/1849\/revisions\/1850"}],"wp:attachment":[{"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/media?parent=1849"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/categories?post=1849"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rexfeng.com\/blog\/wp-json\/wp\/v2\/tags?post=1849"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}