Angular vs React in a corporate reality. Part 1.
When starting a new project
So which framework is better? This question has been asked many times over the last few years and got many different answers – mostly because, just like the frameworks – answers evolved over time with each major update.
Let’s try to answer this question through the prism of corporate reality – where deadlines are tight
But before we dive into the not-so-deep comparison and problems surrounding it, let’s do a little warm-up and try to quickly answer some “similar” questions.
iPhone or Android
This is one of the biggest ongoing debates—what kind of phone should you get? An elegant yet really expensive iPhone or an elegant yet really expensive Android? Personally, I’m #teamandroid, but here, it’s purely a matter of taste and preference. Dear reader, what is your choice here?
PS5 or Nintendo Switch
Slightly different problem – this question would be much easier if I asked about “PS5 or Xbox?”. But no, we must decide between a powerful stationary console with lots of AAA games and a smaller, hybrid console with a slightly different game library. Here, the decision is more complex to make – it depends on where you want to play and what games you want to play.
BMW or Renault
When people hear about BMW, they usually imagine high-end limousines with rich leather interiors and powerful engines - there is a reason why BMWs are usually chosen to be unmarked police cars. So how can we compare that kind of pinnacle of German engineering with Renault – smaller, family-friendly French cars?
Well, that depends on how we look at the problem. Many of you may not know that Renault is the number one seller in terms of delivery trucks (at least in Poland). The trick here is that BMW does not have cars like this in its offer. So, here, the answer depends on who the buyer is.
Star Trek (original series) or Star Wars (original trilogy)
Both franchises have loyal fans who constantly argue about which universe is better. But the truth is… It’s hard to compare. If we want an epic adventure, we should go for Star Wars. But if we want to dive deep into real sci-fi problems (or the very interesting acting of William Shatner), we should go for Star Trek. The comparison here is really difficult, if even possible, because these are two different genres.
Comparison Paradox
The point I was trying to make with these not-so-obvious questions is simple: Sometimes, the verdict depends on the context. When it comes to comparisons, we need to be aware of a small but important trap that awaits us—the Comparison Paradox. This is a rather broad psychological term, used especially in marketing, but we're going to focus on one small part of it.
When we compare two different things, we subconsciously (or sometimes consciously) tend to think in a better/worse manner.
The truth is that not every comparison should or can get a verdict. The way the comparison is performed may affect the result.
Comparison in practice
So to truthfully compare both beloved frameworks, we need context. And the best way to compare technologies is to look at them through the prism of a project – so let’s consider a simplified version of a project that I was working on here at Bayer.
Disclaimer: I’m going to skip a lot of advanced business shenanigans. We are going to focus on the main problem.
Let’s meet Bob, who is an agronomist working at Bayer.
领英推荐
Bob manages crop trials. One of his main responsibilities is observing how plants grow—from the moment they are sown until they are harvested.
At the beginning of the day, Bob visits our internal services to see what kind of data about these crops he needs to collect today.
Then he drives his truck into the field, writes down his observations (usually on the piece of paper), returns to the office and manually enters the data into the previously mentioned services.
Bob's job is not easy and requires much unnecessary manual work.
Let's make Bob's job easier - let's make an application for him.
In this application, we will automatically gather all questions for Bob from the services.
Based on this data, we will dynamically create a form for Bob to fill.
After Bob submits his answers, we will validate them, map them, and send them to the proper services.
Bob can have many trials, so he should be able to see a list of all his trials in the app.
Bob should be able to see the details of each trial.
Bob should be able to edit trials and add new data based on the current question list.
What do we need?
·????? We need to generate a new empty project
·????? Multiple views (routing)
·????? Fast and intuitive UI (external packages/component libraries)
·????? Fetch data from the server (http communication)
·????? Parse, map, and store data locally (advanced data flow
·????? Allow user to input the data (forms)
So these are our simplified technical requirements. Based on that, let’s do the comparison.
Based on this, in the second part of the article, we will try to decide which framework will be better for creating an application that will simplify Bob's work. Stay with us so you don't miss the second part of the article!
Z kim mog? rozmawia? o pracy w Digital Hub Warsaw I Bayer? Marketing, komunikacja, project management, praca ze startupami, jednostkami naukowymi.