What are the advantages of Angular 5

Dr. Interview with Marius Hofmeister & Stephan Rauh

On Wednesday, October 25, 2017, Dr. Marius Hofmeister and Stephan Rauh discussed the two popular JavaScript frameworks for frontend development in their talk Angular 5 vs. React at the International JavaScript Conference in Munich. Among other things, the focus is on specific use cases, i.e. when to use which framework.

This talk compares the current version of Angular with React. In which area does which of these two frameworks have the edge? Which task is Angular better for, and which is React better for?

Hello Stephan, hello Marius and thank you very much for taking the time. In the big wide world of JavaScript frameworks, Angular and React have particularly distinguished themselves for frontend development in recent times. What advantages do the two frameworks offer compared to other frameworks such as Ember.js, Vue.js, Polymer or similar?

Marius Hofmeister & Stephan Rauh: Each of these frameworks has its advantages and a large fan base. We focus on Angular and React because these two frameworks are the most requested by our customers. In our impression, Angular.js and later React.js have shaken up the market and displaced many established frameworks. In addition to the technical aspects, what we like about Angular and React is that both have a large, active and helpful community and are developed by large companies. This ensures a certain investment security.

In the three frameworks you mentioned, we see more similarities than differences. The central element of polymer are components. The same goes for React and the current Angular versions. We have not yet worked with Ember.js ourselves. According to the blogs that I (Stephan) read, it seems to be a framework that has some similarities with Angular, but that guides the programmer even more. Accordingly, Ember.js behaves similarly to Angular as Angular does to React: it buys a higher development speed by sacrificing flexibility and imposing strict guidelines on the developer.

Vue.js promises to be exciting. It's a new framework designed to be the lightweight essence of Angular.js. Unfortunately, we have not yet had the opportunity to actually work with Vue.js and are - for the time being at least - dependent on statements from third parties. A former colleague of mine (Stephan) claims that Vue.js is like Angular - only this time everything was done right. Whether it will establish itself on the market is a completely different question. In any case, there will be new impulses for both Angular and React.

That seems to be the really exciting aspect to us. Each of the large, established frameworks on the market monitors the progress of the other frameworks. Ideas that prove themselves and fit in with one's own philosophy are often adopted. That way, everyone gets better together.

Your session is appropriately titled "Angular 5 vs. React". What are the differences between the two tools?

Marius Hofmeister & Stephan Rauh: In terms of philosophy, Angular is a complete framework that offers solutions for almost all tasks of a front-end developer. React, on the other hand, focuses on building components and displaying them efficiently. Routing, validation, communication with the backend and so on are tasks that React deliberately ignores.

In practice it looks different: every experienced React developer has his own collection of libraries that do these tasks. All in all, React developers usually have a framework that is just as complete as Angular. The only difference is that you have to look for the right libraries at the beginning, and there is always the risk that one of these libraries will no longer work after an update of React. At Angular you get the all-round carefree package instead, in which the Angular team takes care of such things. In other words, at Angular you buy security by sacrificing flexibility.

There are certainly use cases for both frameworks for which the other is more suitable. Are there also use cases for which both frameworks are rather unusable?

Marius Hofmeister & Stephan Rauh: In principle, you can do anything with both frameworks: Angular is better suited to implement the typical form applications for office environments. Unless the data volumes are very large or there are many opportunities for interaction. If many dialog elements can influence many other elements, and if performance is also important, React is still ahead - even if Angular has caught up a lot compared to Angular.js. In our opinion, React is particularly popular in the development of interactive websites. Not least because the file size of the resulting application with React.js is (still?) Smaller.

When it comes to optimally supporting mobile devices or a desktop PC, we advise against both React and Angular. Even if it is astonishing what everything is now possible: Nothing beats native development for optimal support. A common requirement is, for example, the seamless integration of Excel with the business application. Even with HTML 5, that's always a compromise.

Is there an interesting newcomer project in terms of frameworks that you recommend keeping an eye on? And if so, why this?

Marius Hofmeister & Stephan Rauh: Vue.js is such an exciting project. Right now it looks like it has more impact than Aurelia. 70,000 stars on GitHub show how much the developer community is interested in Vue.js.

Lately, newcomer projects have had a hard time. Nowadays it is no longer enough to build a good framework. It is no longer enough to build a framework that is better than the competition. There is much more to it now. The toolchain and the ecosystem are now more important than the framework itself. For example, most common IDEs offer support for Angular and React. The Angular CLI ensures a quick start at the start of a project. The Redux DevTools offer, among other things, a time-traveling debugger, which alone is a killer argument for React. A new framework has to keep up with that.

Which knowledge or teaching should the visitors of your session take away from your lecture in any case?

Marius Hofmeister & Stephan Rauh: Our lecture shows that the decision for Angular or React is not just about the technology. Sure: sometimes it also plays a role. We tried to establish a couple of objective criteria. When I (Stephan) recently published these criteria on BeyondJava.net, there were mixed reactions from the JavaScript community. They ranged from “complete nonsense” to “yes, that's right”.

Angular and React solve similar tasks, albeit with different approaches. The decision therefore depends to a large extent on the team. Does it have years of experience with JavaScript? Then React is probably the tool of choice. Teams with a strong Java background are more comfortable with Angular. Not least because of TypeScript: it offers many structures that Java developers miss in JavaScript. JavaScript professionals, on the other hand, are often put off by TypeScript. They miss the usual feeling of freedom that is lost through Typescript's strong type system. In theory, it mainly restricts the freedom to make mistakes. In practice, however, there are often problems using existing JavaScript libraries with TypeScript. Projects like Definitely Typed are of great help, but they're not perfect just yet. It's probably also a strong driver for projects like Aurelia and Vue.js: the leaders behind these projects weren't ready to go along with all of the Angular team's decisions. And the decision for TypeScript and against JavaScript is one of them.

Many discussions also revolve around the MVVM paradigm. It offers structures that Angular developers like to use. React has managed to overcome paradigms like MVC and MVVM. The concentration on components also offers structures - just different. This also shows that the decision for Angular or for React is largely a question of the team's preferences.

Thank you for this interview!

Dr. Marius Hofmeister
Marius Hofmeister works as a consultant and development manager in customer projects at OPITZ CONSULTING Germany. His main focus is on the design and implementation of modern web applications in the back and front end.
Stephan Rauh
Stephan Rauh works as a senior consultant at OPITZ CONSULTING Deutschland GmbH and has established the “modern clients” competence center there. He has been working as an architect, trainer and coach with JSF and Angular for years and is known for his blog http://www.beyondjava.net and his open source projects AngularFaces and BootsFaces.