Sunday, 28 June 2015

Why we are going to use AngularJs 1.3 on TM (vs ReactJs)

(As posted on the  Angular JS vs React in Flare issue)

For reference I just had another look at ReactJS vs AngularJS and here are the reasons why I think we should keep on the current path and use Angular on TM 4.0

  • Angular 1.3 is an MVC framework with really good support for: Controllers, Services and Views (React on its own admission is mainly focused on the 'View' component)
  • Angular 2.0 seems to contain most of the big advantages currently mapped to React, so although the jump from Angular 1.3 to 2.0 seems to be quite steep, it will allow us to have access (if needed) to the current perceived React advantages
  • It seems that one of the big advantages of React is it speed, and I don't think we will need that kind of DOM manipulation speed anytime soon (since we will be using the server-side graphdb for that)
  • Most comparisons on Angular vs React seem to:
    • a) conclude that React is better
    • b) be written by users that did not had a lot of experience with AngularJS, and I would say with a lot of experience of jQuery (note that If I get my way we will NOT be using jQuery on TM 4.0 (i.e. it is a banned API :) ))
    • c) focus on simple scenarios (where Angular might be overkill)
    • d) complain about Angular 'complexity' (which again implies not very deep Angular knowledge)
    • e) don't cover how to test Angular/React
  • There are not a lot of published books about React (with the first ones coming out at the end of 2015). Compare this with the dozen books written about Angular
  • The current TM dev team already has good knowledge of Angular (specially since we use it on TM 3.5)
  • AngularJS security seems more mature than React (note for example the use of CSP) and documentation about it
  • I quite like how AngularJS Javascript looks like (specially when written in CoffeeScript) vs ReactJS Javascript which does seem to contain a lot more DOM manipulation (ie. just like jQuery). Of course that on this one I'm bias for Angular because I know more Angular than React :)