r/reactjs • • Jun 25 '21

MS Teams switches to react from angularjs

https://twitter.com/rishmsft/status/1408085784016539653
711 Upvotes

113 comments sorted by

450

u/ProfProfessorberg Jun 25 '21

I read this as 'switches FROM react TO angularjs' and I couldn't believe anyone would choose that...

88

u/Zbigniew421 Jun 25 '21

Thought so too and laughed out loud.

52

u/nowtayneicangetinto Jun 25 '21 edited Jun 26 '21

AngularJS is ancient and such a pain in the ass to use no idea why they chose that.

45

u/LetterBoxSnatch Jun 25 '21 edited Jun 25 '21

We were an earlyish adopter to Teams, and I remember the tech landscape at the time. It was not as unreasonable as you might think at the time to choose AngularJS 1.x, which had a lot of cross-platform tooling for deployment including for mobile. It was "newish and good" but also "battled tested." From a management perspective, picking it probably made sense.

I happened to be working in an Angular 2+ shop at the time that we started using Teams. I remember being curious and using the dev tools to discover it was running Angular 1.7 or whatever. Anyway.

When Angular 2 came out it was obvious that it was like a totally different paradigm from Angular 1.x. Angular 2 was basically an opinionated React. React if all the React libraries were baked in. The funny thing is that the React community over the next few years would largely adopt the opinions that came baked into Angular, even going so far as to rally behind CRA. But Angular 2+ had so many baked in decisions and the wider community couldn't make heads or tails why they would make the choices that were being made, it was too much all at once...of course, there were some dumb decisions that Angular made, too, like special HTML templating while React had the much more intuitive and flexible JSX. I actually think that conceptually picking RxJS was a fantastic choice, but that RxJS itself is a stupidly complex implementation of reactivity model.

Anyway.

What seemed crazy to me even at the time was that they kept not updating...and not updating...and not updating. Teams adoption wasn't that high, but it was fairly feature complete, so why not switch to better tech? I can sort of understand, because it was a big jump to Angular 2+, and while Angular eventually had tooling to help make the transition from 1.x to 2, by the time that tooling came around, it was clear that React was "the new jQuery," and that the React ecosystem was a much better investment of time and resources.

EDIT: a sidenote perhaps of interest: we picked Teams because of the contractual and support implications vs its competitors. Probably would make that same choice today, honestly, despite it being a steaming pile

0

u/[deleted] Jun 26 '21

[deleted]

3

u/LetterBoxSnatch Jun 26 '21 edited Jun 26 '21

I never said anything about stealing anything from Angular. In fact, I think what actually happened is that significant portions of the React community eventually converged on many of the same choices. There is much greater diversity on the whole in the React community, and I think this is part of what’s special about the approach. With Angular, the decisions were made, many of which were excellent, but going against the grain was going to be painful. React allows continual experimentation and improvements by being unopinionated / decoupled.

Anyway, probably the biggest one was Angular being so bullish on TypeScript. But some of the other opinions that were baked into Angular that later came to seem like pretty normal choices in React (but certainly we’re not universally the correct choices) included:

  • CSS-in-JS

  • Router with a FP paradigm and event-sourcing model for history tracking

  • CLI tooling for scaffolding projects, with plug-in system for generative component code according to different needs

  • webpack

I remember there being a lot more to this feeling that Angular had a made a lot of pretty good choices, but tbh I don’t remember much more than what I’ve already written. I haven’t written much frontend code in the last two years, and have forgotten a lot of Angular at this point since these days I reach for React or uhtml.

Ultimately, I think that the real downfalls of Angular were: effectively having a DSL (a result of both the Angular HTML templates and the opaque use of typescript decorators for dependency injection), and that RxJS was an unfortunately complicated implementation of the Observer/Subscription model…a beautiful concept poorly executed (I like Flyd for this now)

1

u/ByteOfOrange Jul 06 '21

Angular allows CSS in JS? The separation of concerns thing is what's always kept me away from Angular but if that's true, it's a game changer for me.

3

u/headyyeti Jun 29 '21

Angular !== AngularJS

Angular is still great for large teams and enterprise applications.

I've been a react and Angular dev for many years and I would still choose it for enterprise apps where I had to work with a large team just for the opinionated framework.

6

u/OldCrowkw Jun 25 '21

That is how I first read it also and with the reaction of, "but why...?".
Then I went to the Tweet.

2

u/MelodyGhost Jun 26 '21

Me too. I understood after reading this comment.

2

u/vsh46 Jun 26 '21

maybe because you are a python developer too 😅😂

2

u/rubennaatje Jun 26 '21

First I thought hm okay, I see that moving from react to angular is suddenly getting popular again so okay.

Then I saw that it was the old angular (angularJS) and was like wtf.

Then i actually read the tweet and understood...

1

u/Hazy_Fantayzee Jun 25 '21

Glad I wasn't the only one, I read the tweet and then re-read the headline and sure enough it says 'TO' but for sure the first time I read it it said 'FROM'!?

1

u/maximumSteam Jun 25 '21

Read it the same, I did.

-41

u/[deleted] Jun 25 '21

SEPERATION OF CONCERNS!!

REACT LICENSE BAD THEY WILL SUE AND STEAL UR CODE fkin facbook wankers im goin use VUE is beter!

16

u/[deleted] Jun 25 '21

Ok bud no need to shout

8

u/morkelpotet Jun 25 '21

They changed their licence. And you need to drink a glass of water.. and take a walk around the building.

5

u/NeaZen Jun 25 '21

i dont really understand this stuff as i’m still young, but isnt react under MIT license? or is there some stuff more complicated than that

9

u/AM_Dog_IRL Jun 25 '21

React 14 back had a nasty license.

-3

u/patrys Jun 25 '21

It was really a better license for its users. It granted them additional patent protection. The protection only lasted as long as you didn’t sue Facebook, that clause lead to a public outrage. The React team obliged by removing the protection altogether.

2

u/LetterBoxSnatch Jun 25 '21

how th is everyone missing that this comment is so very clearly sarcastic??

0

u/[deleted] Jun 25 '21

[deleted]

-13

u/TrackieDaks Jun 26 '21

You're assuming that you're the normal one. Perhaps OPs first language is not a western language so Right-to-Left is more natural to them.

1

u/Fit_Sweet457 Jun 26 '21

If the remark on the ordering has 400 upvotes on a post with 600 upvotes total, it's safe to assume that the the order in the title is not "normal".

51

u/smthamazing Jun 25 '21

This is great news! I use Teams daily and I really hope to see some UI and stability improvements. We switched all our internal products from Angular and Vue to React around the time hooks were released, and the experience both for developers and our users has been excellent.

36

u/OttoGunker Jun 25 '21

They mean actual AngularJS, not Angular, as in the old version. Very adroit.

6

u/Xerxero Jun 25 '21

It all makes sense now.

27

u/mmremote Jun 25 '21

AngularJS or Angular?

47

u/academicRedditor Jun 25 '21

Very few companies use AngularJS anymore (“Angular 1”, right?). It’s all Angular 2+ with TypeScript nowadays

Edit: oh wait! They were using AngularJS?! Dayum !!!

82

u/OttoGunker Jun 25 '21

No, they mean AngularJS. Trust me. I still sometimes see the flash of unrendered template content on the Teams login screen. It's ancient technology.

6

u/zephyrtr Jun 25 '21

Ahh the good ol FOUC

11

u/academicRedditor Jun 25 '21

Wholie Sh*t 😳! It was about time they upgraded, then

12

u/z500 Jun 25 '21

Wholly shit indeed

4

u/rogevin Jun 26 '21

Whoa lee mow leah

10

u/robotsympathizer Jun 26 '21

I recently interviewed with a company that was still using AngularJS with no plans to migrate off in the near future. I had been interviewing for months and was pretty desperate at that point, but not THAT desperate.

7

u/careseite Jun 25 '21

It's AngularJS, they mention it.

4

u/J-Swift Jun 25 '21

Lots of places still run AngularJS, especially regular ol' businesses with legacy software chugging along.

4

u/Waifu4Laifu Jun 26 '21

Many companies are still using it since they put eggs in that basket years ago. My company has just gotten around now to upgrading all of it to react (everything from maybe 2018 on was react already), mostly because angular 1 LTS support is ending this year.

2

u/academicRedditor Jun 26 '21

That makes a lot of sense !!!

2

u/Meryhathor Jun 26 '21

I was "debugging" Nvidia's overlay yesterday and their HTML is full of "ng-*" stuff. Isn't that Angular 1 too?

6

u/kalarisel Jun 26 '21

Just a lurker here. If anyone has the time, please. I want to understand, why is AngularJS is a problem. Why is changing to React an improvement. And how is this beneficial to the end user. Also, devs (because the change looks like to be rejoiced.) Thank you in advance!

10

u/yesman_85 Jun 26 '21

Angular JS is eol and hasn't really been updated for a long time. It was a good framework 10 years ago but now angular2, react and vue are much better alternatives.

5

u/danielkov Jun 26 '21

Here are a few points against AngularJS, having used it extensively almost a decade ago:

  1. Not up to date - there hasn't been a major update for 6+ years. This means that the source code doesn't make use of newer JS features which would potentially make it perform better.

  2. The event / change detection system - AngularJS uses a monkey-patched event system to respond to changes (the idea is that unless an event is triggered, there can't really be any changes applied) and this is not only painfully slow compared to modern methods, e.g.: one-way binding in React, but is not guaranteed to work forever, as browsers advance, new things creep into the spec that need to be addressed otherwise the framework can stop working.

  3. Not compatible with TypeScript. Due to how DI works in AngularJS (and Angular - more on this later) it is impossible to provide proper typings via TypeScript. There is just no way for a static compiler to know what dependencies are going to be available during runtime and DI is arguably the biggest part of AngularJS.

  4. Angular also suffers from some of the same issues as AngularJS, but it was written in TS and given some additional compiler magic to compensate for this and allow type checking.

0

u/[deleted] Jun 26 '21

[deleted]

2

u/rubennaatje Jun 26 '21

2 way binding (at least locally) is actually nice though.

One of my least favourite things about react is how they handle that.

15

u/code_matter Jun 25 '21

As an intern learning Angularjs, let me just say this:

FUCK ANGULARJS

Worst fucking framework ever. Angular is fine, but god fuck angularjs

16

u/N22-J Jun 25 '21

My sweet summer child. I'll take angularJS any day over Backbone + Marionette

5

u/_poor Jun 25 '21

I actually prefer Backbone over AngularJS

2

u/IHeartMustard Jun 26 '21

Same. At least I can choose a semi-rational templating language with Backbone. Thank god I don't have to make that kind of choice anymore, though.

1

u/code_matter Jun 25 '21

Haha never heard of those :p

5

u/vazhifarer Jun 26 '21

As an intern, what are the other frameworks you're comparing it to? Remember that Angular JS had been eol for some time now, and at the time of release, was competing with Ember, Backbone, and ... jQuery

1

u/code_matter Jun 26 '21

I get that! I've worked with React and Vanilla JS. My only comparison in terms of framework is React. I've seen Vue, but never codes it.

I've also worked with django/flask. Not really frameworks but still.

3

u/vazhifarer Jun 26 '21

React is a library not a framework. AngularJS is a framework. It was damned good for it's fine because no one gave an option of seamless data binding at the time. It was not performant by current standards but was pretty good for it's time.

1

u/code_matter Jun 26 '21

Ohh I tought react was a framework! Thanks for the information

4

u/maxfontana90 Jun 26 '21

I don't think AngularJS was bad. I think there were terrible developers that didn't understand the basics. Like doing DOM manipulation outside link function.

2

u/code_matter Jun 26 '21

From someone coming from React, I couldnt stand it .. I'm still working with it from time to time but god do i hate it

1

u/maxfontana90 Jun 27 '21

That's normal. Tech improves as the time goes. I wouldn't start an AngularJS project nowadays, but I wouldn't mind working on a legacy project with it (unless the codebase is awful). Remember that if you are suffering with this AngularJS project is likely due to a terrible codebase, that has been manipulated by way too many people that do not know AngularJS basics.

2

u/Labby92 Jun 26 '21

After less than a year working at my company we started migrating from AngularJS to Angular, took me and my colleague about 6 months of slowly upgrading components, such a pain in the ass but it was totally worth it

1

u/code_matter Jun 26 '21

We are also thinking of migrating, but towards react!

1

u/vinodis Jun 26 '21

struts in struts

27

u/careseite Jun 25 '21

https://twitter.com/rishmsft/status/1408103016624889867?s=19

Wanting to build the "best long running react app" is a bold statement to make from the worst performing app i know, especially with competitors such as Spotify (meh) and discord (excellent). I'm not buying it.

13

u/midweekyeti Jun 25 '21

discord kills it. i’m always curious about how they make such a performant app. the UI is always snappy, even in servers with 10k+ users

3

u/MatthewMob Jun 26 '21

Discord posted an article about their migration from Go to Rust on the back-end which gives a lot of insight into their developer culture and technology. Very interesting read.

2

u/midweekyeti Jun 26 '21

yea i’ve read it. verrrry good, cool read. it might be less “savvy” but i’d love a deep dive article about their front end performance stuff. lazy loading, caching, virtualization, state management, React specifics, etc. people often complain about Electron being slow and resource heavy. whatever they are doing on the front end (combined with the back end) let’s them avoid that common pitfall.

6

u/drckeberger Jun 25 '21

'worst performing app' is also such an overstatement.

3

u/careseite Jun 25 '21 edited Jun 26 '21

is it? I don't know/(have to) use anything else that has such consistent performance issues.

edit: actually new reddit is about as bad actually. but thats less of an issue as you can just opt out and it doesnt run the entire day anyways

3

u/IHeartMustard Jun 26 '21

Not to mention the litany of absurd bugs. Not just like, oh that button looks a bit off. I had months where Teams would just suddenly turn into this static noise mess. It looked like analog TV static in a way, and would just cover the entire interface for a while, sometimes like 10 seconds. Then would keep happening each time I changed to a new "view". That was only the worst one, there have been and are so many major performance hiccups and random failures of all kinds. It's been getting better, but slowly. How did it even end up in such a bad state that it's taken so long just to get where they are now, which still can't compare to other tools that do the same job, even though in a feature comparison table, it can tick most of the same boxes? If it was just a few occasional things, or like, edge case bugs that you wouldn't encounter every day, I could forgive that. Software is complicated. But teams, I am very sorry to say because of how prevalent it has become (congratulations to Microsoft for yet another successful use of monopoly tactics over fair competition), is surprisingly bad for what it is. I wanted to like it, beacuse at my last company I knew I was gonna be stuck with it for a while, but so many things that one could just take for granted in tools like slack were broken in teams, in whole or in part. Code formatting (or rather lack of it), even plain code copy/paste, holy shit, don't even get me started.

Feels good to get that off my chest. Please ignore me, I'm venting years worth of bitter and imputent frustration.

2

u/noXi0uz Jun 26 '21

I mean, we now know that teams is built on AngularJS, so bugs and performance issues shouldn't be a surprise.

1

u/fzammetti Jun 26 '21

I don't know if it's THE worst... but it's in the running. I don't think it's an understatement at all.

1

u/vazhifarer Jun 26 '21

The issues with Teams is hardly due to the tech stack...

1

u/0xnoob Jun 26 '21

I don't think spotify is using react, at least the web version isn't.

1

u/careseite Jun 27 '21

what makes you say that? you can literally open the react devtools and inspect all components

4

u/kry1212 Jun 25 '21

Don't most of their competitors still use Electron? Or is that over?

11

u/PFCistern Jun 25 '21

They do, too. Electron is what VSCode is built with. shrug They also have the linux subsystem, are going to support Android apps, are re-doing the UI with crazy features... oh well.

Sounds like they started listening to marketing again. Windows 11 sounds like Windows 8-2.

5

u/kry1212 Jun 25 '21

I specifically meant for this product. Teams competes with slack and discord, which are in electron. Vscode is an IDE.

1

u/PFCistern Jun 25 '21

I just Googled this and it sounds like Teams desktop now is Electron right now. I guess the new thing is Edge Webview2? I dunno, I give up trying to follow.

1

u/kry1212 Jun 25 '21

Huh. Weird. I assumed it wasn't because there wasn't a native linux client for-effing-ever, but I'm sure there were other microsoft-y reasons for that.

1

u/noXi0uz Jun 26 '21

Just because it's Electron, doesn't mean that it's cross compatible automatically. Teams probably uses alot of OS specific API calls that would have to be rewritten. But the main reason is probably the work and money needed to 'officially support' the platform for a very low share of users.

1

u/m-sterspace Jun 25 '21

Presumably Teams will still be using Electron on Mac and Linux since Edge Webview2 isn't available there.

1

u/pastrypuffingpuffer Nov 03 '21

But why React.js? Couldn't they just make it in Angular2+ or Vue?

1

u/Capaj Nov 04 '21

sure they could, but react is the best choice for any corporate project.

0

u/pastrypuffingpuffer Nov 04 '21

Nope, it isn't. Just because it's the most popular front-end library doesn't make it the most suited for any corporate project. It lacks html directives and proper separation between style, markup and logic.

2

u/[deleted] Jun 25 '21

No electron on windows

Nice

2

u/snow_coffee Jun 26 '21

Which means, no matter even if you have best minds working for Angular js

They are still doing something that's not perfect. While the guys there would behave like totally perfect on LinkedIn

Even now, react can go one day and MS will switch to Xyz, it shows MS is ready to change itself, and it can afford To.

2

u/tapu_buoy Jun 26 '21

I attended a jsmeet at Microsoft's Bangalore office in mid 2019 and they mentioned this there. I don't know why this is a new news now.

2

u/vazhifarer Jun 26 '21

Gradual migration. It just got done

2

u/clownpirate Jun 25 '21

I really dislike Angular. Did not realize Teams used it under the hood. Got rejected by the Teams team back in late 2018… in hindsight I’m kinda glad now.

1

u/mrpink57 Jun 25 '21

I believe EOL angularjs is June or July. So perfect timing. Would’ve been great if they could’ve harnessed blazor to show the world.

0

u/[deleted] Jun 25 '21

Where in the article does it say this?

0

u/[deleted] Jun 26 '21

Everyone is hating on angularjs. I assume at that time it made sense for business to pick it. It’s easier to pick the latest hot stuff for small projects, but when you have to make a decision for a corporate project that is going to be maintained for next 5~6 years or even more, you need to be really careful. AngularJS at some point was the best option we had (we thought) and in today’s world react would be the wisest choice to pick because it’s easier to find devs for and it’s widely adopted.

2

u/fzammetti Jun 26 '21 edited Jun 26 '21

In this industry, we shit on any technology more than a few years old (save for Linux) and chastise anyone who would dare to have used it. It's pretty fucked up.

1

u/[deleted] Jun 26 '21

I don’t understand why people back some technology like is religion or something like that. Any framework library or whatever we are using is just a tool. Most companies that you will be working for have some legacy system that you will have to deal with. I’ve seen really good written angularjs projects and really terrible react ones. In my opinion, the processes and having proper testing is more important than the tech behind. I worked with angularjs and react, i prefer react, but if the project is big, complex and written in angularjs I would think more than twice before trying to rewrite it in a new tech, more likely at the time I finish it the tech I used is already old.

-3

u/meseeks_programmer Jun 26 '21

Ok but why not react native?

-5

u/azangru Jun 25 '21

Really? I thought Microsoft was embracing vanilla web components.

1

u/vazhifarer Jun 26 '21

Microsoft has like a thousand teams, each working independently. There's no unified stack or framework. It really depends on what the project demands

0

u/[deleted] Jun 25 '21

[deleted]

1

u/wrtbwtrfasdf Jun 26 '21

Aren't they doing a complete revamp on the look of their UI's for windows 11 though?

2

u/pharti Jun 26 '21

No it is rather more fluent / an updated version.

0

u/[deleted] Jun 25 '21

[deleted]

16

u/[deleted] Jun 25 '21

I love the ones that are "why not x" where X is either A) some brand new experimental library debuted at a conference just months prior or B) Some small library with < 1k stars that nobody has ever heard of with like 1 or 2 maintainers

5

u/[deleted] Jun 26 '21

x is always Vue

1

u/lahwran_ Jun 26 '21

"why not x" is useful to learn more about their opinions if it's not said in an accusing tone, imo. can be hard to clarify that over text, though.

0

u/[deleted] Jun 25 '21

[deleted]

25

u/pizzzahero Jun 25 '21

I think electron could be part of it, but it’s not the only reason. Discord, Spotify and VSCode all run on Electron and they don’t suffer from the same issues

6

u/ours Jun 25 '21

Perhaps it depends on how bloated the JS/HTML/CSS running in it is.

3

u/midweekyeti Jun 25 '21

i work on a similar style app. i think it’s a factor of tons of things. backend matters a lot (if the APIs are shit the client has to do extra processing/business logic), caching matters a lot too. depending on how much and how cleverly the app holds stuff in memory makes a big difference in performance. lastly it’s probably basic, but easy to get wrong UI stuff. react is great, but there is still plenty of foot-gun potential with needlessly thrashing the DOM, etc

8

u/careseite Jun 25 '21

but is this why Teams seems to take up a ton of ram and slows down the rest of my apps whenever I leave it open?

no, considering other electron apps dont do that (spotify, github desktop, vscode, discord, slack).

we simply dont know the reason for ms teams being extremely unperformant. we just know it is and suffer.

1

u/SwitchOnTheNiteLite Jun 25 '21

Running both React and AngularJS on the same page means the rest of the app might also not be optimal :P Let's hope they do a clean-up now that they are remaking all the AngularJS stuff.

2

u/rk06 Jun 26 '21

Teams is a web app, packaged as Electron for desktop.

React is preferred because of React Native

0

u/[deleted] Jun 25 '21

[deleted]

9

u/ours Jun 25 '21

Not necessarily. MS is bringing Edge to Linux.

And since Webview2 will be part of the whole .NET MAUI thing Linux is a target and should have it as well.

0

u/[deleted] Jun 25 '21

[deleted]

1

u/HeinousTugboat Jun 25 '21

No, they meant AngularJS.