r/reactjs • u/Capaj • Jun 25 '21
MS Teams switches to react from angularjs
https://twitter.com/rishmsft/status/140808578401653965351
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
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
11
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.
2
7
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
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?
2
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:
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.
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.
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.
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
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 ANGULARJSWorst 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
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
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
1
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
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
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
2
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
0
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
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
-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
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
0
Jun 25 '21
[deleted]
16
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
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
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
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
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
450
u/ProfProfessorberg Jun 25 '21
I read this as 'switches FROM react TO angularjs' and I couldn't believe anyone would choose that...