React or Angular

(I am ignoring other frameworks as of now).

The dilemma most architect face when selecting between React and Angular for their front end development.

I have been in various real discussion of this sort as a consulting architect and my choices are very simple depending on the below parameters.

Hope some of you may find this useful. (Just a note, I like both frameworks, though some may call React as library, that’s fine, I am using it here interchangeably.).

Everything is JavaScript

First, for me everything is JavaScript. So, you have to ensure that if your team is getting into heavy front end development OR SPA , upskill them on core JavaScript (context, scope, closures, prototype, common patterns, DOM, events) (because 90% of people struggle to deliver project on time, not because of lack of skill in React or Angular, but lack of enough understanding of JavaScript, CSS and the underlying issues.

Learning curve

For some strange reason I have observed the learning curve for React is a bit higher than Angular (even though React is quite tiny in feature compared to Angular).

But once the devs are familiar with React, then there is no going back.

And well here is the reason for the same.

  • React is closest to JavaScript to the bare metal (seem my comment below).
  • To work with React, you have to be good with fundamental JavaScript.
  • You should be familiar with some common patterns
  • Developer should not be afraid of Higher order components (which is again fundamental concepts)
  • State management practices.

Angular on the other hand being a framework has certain way to do things (which is good) as the onboarding becomes quick.

But it is also can become bad for business whose revenue depends on it because you are constrained within the framework and you are bound by the rules (though rules can be broken, but then the dev should be very good with JavaScript/TypeScript).

Why deep knowledge of JavaScript is needed?

Many people think that since they are using library or framwork deep JavaScript knowledge is not required. And well they are wrong (unless there are building trivial applications).

Deep JavaScript knowledge is required (irrerspective of library or frameworks) because of following reasons.

  • For customizing user interface behaviors when third party library/packages are not sufficient.
  • For fixing any immediate user interface issues, in case the team is using third party libraries (as the project deliverable cannot wait till the library developers add features or fix issues).
  • For creating or customizing components that meets’ the performance standards. So, many people uses libraries and packages here, but at many times these libraries and packages are required to be modified to meet your goals.
  • To understand memory leaks and how to avoid them as behind libraries and frameworks, lies developer code as well.
  • For creating reusable components (UI elements) for enterprise.

NOTE: For typical CRUD applications in-depth knowledge of JavaScript may not be required as long as your are working within the constraints of the frameworks.

Having sorted that, actually it won’t matter now, what you chose because the team will be able to deliver effectively.

But still consider the below questions.

Important Questions to ask

– Are you developing a product, which will become your primary source of income and you plan to maintain/change over a long period of time.

– Are you developing a website, which is hosted as a SAAS and is a revenue generation mechanism for your company and the company’s existence depend on it.

If the above is true, ask yourself the question. How much would you like to get tied to a library or a framework so much that any impact on the library creators decision may impact your business.

So, always in this case chose the library or framework with least resistance but still allow multiple choices over the course of its growth with minimum impact.

Research Work

If you do a quick research as to what kind of products are being developed using React and Angular, you will quickly find that React is dominating the SASS, and other large products/websites.

That itself should give you enough confidence to start the journey. But always, use your own good judegement.

Why I will chose React?

Why? Because of the following reason.

  • React is lightweight (has preact an alternate lighter high performance project as well).
  • React does one thing and it does it very effectively.
  • React is the closest form of JavaScript library because technically there is no HTML in it. So, if you are writing React, means you are writing JavaScript (and you are close to the metal). JSX is just sugar coating to make developer feel good. (So, if your devs are good with JavaScript which they should be there is no limit as to what can be created).
  • If need be, many other parts of the system can be easily replaced. (I can replace the entire VDOM itself).

React – The biggest benefit – Thinking in Component

The biggest benefit of React is that from early on devs are forced to think in terms of component (This can be done in Angular as well), but React makes it very clear.

You can very easily create simple, to medium, to compound components very easily in React.

If fact, if you can draw out your component on your napkin, visualzie your app states, your regular JavaScript developer if need be can code any piece of UI component faster than similar complexity level in Angular.

But Is React good for kinds all Project/Products?

The answer is no. I have laid out some conditions above. Besides, if I am working with Canvas (I use React) but most of the time I just use JavaScript.

If it’s a typical CRUD app, then developing in Angular could be faster (again depending on the skillset of the people) as Angular has everything baked in.

But if you want to move beyond typical CRUD and need freedom, then React may be the choice.

Do I use React for all my projects?

Let me be very honest here. All internal projects that we do is in React. Some we do in Angular and other library to be in sync with the real world as we do lot of consulting and research activities because we want to be absolutely sure when we recommend any library or framework. So, we would like to know all prevailing details.

When we are hired for client work, our first priority is get the client expectation from the project, their team’s current skillsets etc. Based on that we list out the pros and cons and give them the overall picture.

And if they chose, Angular, we provide full support for it. (But so far it hasn’t happened in my 7+ years of active consulting since we started Algorisys).

Exceptions are when the client is already using Angular (and it’s mostly internal projects), we stick with the same, as the decision was already made in the past.

Does that mean Angular is not used anywhere?

No. Many team uses Angular. Some of our clients use angular, but mostly they are internal projects.

Angular is a nice framework.

I have seen some websites (don’t recollect, built on Angular). And there could be many more on it.

Before React, I was a huge user of Angular (including angular.js, ember etc).

NOTE : These are just my thoughts based on working on various large full stack projects at Algorisys as well as in my consulting engagements with with clients with massive apps at scale.

And of-course this post could be biased based on my personal experience with React (but don’t forget that I am first a JavaScript enthusiasts who loves to work with React, Angular,ember and even jQuery).

But if we encounter an Angular app we work with same equal passion as well.

Hope I tried to present my case, based on my heavy core experience on web applications at scale

A side note (Ionic is smart)

One big reason, I still stuck with Angular was because of the ionic framework for mobile development.

Ionic realized that getting stuck with a framework is limited as frameworks shelf lives cannot be guaranteed (but core JavaScript shelf life is almost guaranteed to be perennial).

But now that constraint is not there as ionic is framework agnostic. Use Angular, React or plain javascript.

For a good frontend dev Angular and React are both same

A good frontend dev is the one who understands JavaScript and common patterns deeply. If you have one, go ahead both framework will give you same benefits (assuming you have read about the dependencies, you are OK for getting lock down to framework, as the dev will help you get out of it etc).

So, to conclude for me React, Angular, Vue etc, are just JavaScript in various avatars. So, my goal for my team irrespective of which library or framework they work within Algorisys or at client locations is to get them well versed with fundamental JavaScript, DOM manipulation, performance considerations, component based design approaches, better practices etc.

So, readers are free to share the links of live production website at scale built on both React and Angular and let’s take a stock together as well.

May be I will encourage some of readers to write a blog on the same topic but why Angular should be the choice.

Tech communities and Industries need healthy debates and comparison rather than one sided opinions.

How useful was this post?

Click on a heart to rate it!

Average rating 4.8 / 5. Vote count: 8

No votes so far! Be the first to rate this post.

2 thoughts on “React or Angular

    1. Thanks for the link. No, you don’t have to. If your team is good with Angular, and you are building an awesome product, no need to move to React. Just get better and better with Javascript and angular, and you should be fine.

Leave a Reply