{"id":181,"date":"2017-01-17T18:16:01","date_gmt":"2017-01-17T23:16:01","guid":{"rendered":"http:\/\/www.7bsoftware.com\/clients\/?p=181"},"modified":"2017-01-17T18:28:10","modified_gmt":"2017-01-17T23:28:10","slug":"is-reactjs-a-fad","status":"publish","type":"post","link":"https:\/\/www.7bsoftware.com\/clients\/2017\/01\/17\/is-reactjs-a-fad\/","title":{"rendered":"Is ReactJS a fad?"},"content":{"rendered":"<p>My friends in the military should appreciate the Bottom Line Up Front:  The answer is no, ReactJS is not a fad.<\/p>\n<p>A better question might be: Why should I care about ReactJS?<\/p>\n<p>The answer: simplicity with a nice helping of standardization.<\/p>\n<p><strong>Simplicity<\/strong><\/p>\n<p>ReactJS is deceptively simple.  You write a function and it returns a DOM element, then the core ReactJS handles the details of rendering the DOM element.<\/p>\n<p>No need to track a bunch of typed components (I&#8217;m looking at you, AngularJS, with your overly complex directives and state spread out all over creation).  No strange interactions between components.<\/p>\n<p>Just pure functions.<\/p>\n<p><strong>Standardization<\/strong><\/p>\n<p>ReactJS standardizes on the JSX mini-grammar for the DOM.  It&#8217;s kinda like the AngularJS {{ &#8230; }} thing, so it&#8217;s familiar to modern Javascript programmers (and beats the heck out of other templating languages like DotNet).<\/p>\n<p>But more importantly:  ReactJS standardizes on the functional programming (FP) style.  And this alone is great, simply because it eliminates huge swaths of Javascript syntax.  No more &#8216;for&#8217;, &#8216;foreach&#8217;, multiple assignments to variables, and so on.<\/p>\n<p>If you haven&#8217;t done much functional programming&#8230;it&#8217;s actually surprisingly easy to learn.  In fact, Javascript is a great programming language to learn FP&#8211;much better than, say C++ or Java (and yes, you can write functional programs in those languages too).<\/p>\n<p><strong>Yeah, but&#8230;what makes you think it&#8217;s not a fad?<\/strong><\/p>\n<p>Developers and clients are starting to realize that functional programming in general, and ReactJS in particular, solves a set of really hard labor scalability problems.<\/p>\n<p>After all, the most expensive software component is the one that&#8217;s hardest for humans to maintain.  It has nothing to do with SLOC and everything to do with <em>locality<\/em>.  To wit: if I can understand a module at a glance, it&#8217;s cheaper and thus better.<\/p>\n<p>And what&#8217;s the biggest confounder for understanding a module?  Well, it&#8217;s whether the module has &#8220;magic dependencies&#8221;.  In other words:  Does it reference variables out of its scope?  Does it <em>write<\/em> variables that are <em>used<\/em> in other scopes?  <\/p>\n<p>I can tell you that I have never seen an imperative program that <em>didn&#8217;t<\/em> suffer from the locality problem.  And why is that?  Because imperative programs aren&#8217;t easy to standardize.  Developers rarely even talk about eliminating dependencies in imperative programs.<\/p>\n<p>But ReactJS and FP are explicit and opinionated about functions.<\/p>\n<p>I could go on about managing complex state, but I&#8217;ll leave that to a later post.  Suffice it to say that ReactJS should be in the arsenal of any contracting company that wants to keep development costs at a minimum.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My friends in the military should appreciate the Bottom Line Up Front: The answer is no, ReactJS is not a fad. A better question might be: Why should I care about ReactJS? The answer: simplicity with a nice helping of standardization. Simplicity ReactJS is deceptively simple. You write a function and it returns a DOM &bull;  <a class=\"read-more\" href=\"https:\/\/www.7bsoftware.com\/clients\/2017\/01\/17\/is-reactjs-a-fad\/\"> Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":190,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-181","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/posts\/181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/comments?post=181"}],"version-history":[{"count":5,"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/posts\/181\/revisions"}],"predecessor-version":[{"id":193,"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/posts\/181\/revisions\/193"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/media\/190"}],"wp:attachment":[{"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/media?parent=181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/categories?post=181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.7bsoftware.com\/clients\/wp-json\/wp\/v2\/tags?post=181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}