r/javascript • u/dvidsilva • Jun 13 '18
Office 365, MS teams, Skype, @code, and the edge debug protocol are being rewritten in js instead of C++ with special MS tooling
https://twitter.com/thelarkinn/status/1006746626617008128?s=2130
u/Paralyzing Jun 13 '18
Isn't this like ... huge news?
10
u/dvidsilva Jun 13 '18
Ya I think it's crazy huge. But it's flown under the radar
5
12
u/dardotardo Jun 13 '18
Quite good news for react native.
Not so good for electron.
4
3
u/prozacgod Jun 13 '18
Not so good for electron.
No no, see... now Electron can drop all of those "bloated" OS's and focus on Linux exclusively!
/s
(I still don't see it as a big deal to electron, it has it's niche.)
1
19
u/Bolitho Jun 13 '18
Hm... why haven't they picked TypeScript? I mean they are the inventors of this language - so why don't use it?
Does it mean they will drop TypeScript, as they encountered issues with it? Was it just ignorance? Lack of devs? Other internal political reasons?
Would be interesting to know to be honest!
6
u/dvidsilva Jun 13 '18
Great q. I know @code uses a lot of ts and is super integrated. Don't know how it is in other teams but I'll try my best to find out
70
u/yarism Jun 13 '18
Does it say that they don’t use TS? You can use TS in React from what I understand.
31
-22
u/Bolitho Jun 13 '18
The tweet sounds like this:
All of Office 365 is (almost finished) being completely rewritten in this little scripting language called #JavaScript.
It clearly states JavaScript ;-)
44
u/zulkisse Jun 13 '18
TypeScript being a superset of JavaScript and being transpiled into JavaScript (in most cases), I would not find it chocking that they just said JavaScript because the main info was "we are using a JS stack" and not "we chose TypeScript and not JavaScript" (or the opposite).
But we'll see :)
-10
u/Bolitho Jun 13 '18
I never said that is is shocking, but it is not obvious from the tweet. That's why I asked.
And as answer to /u/yarism it is imho ok to cite the main phrase.
Of course it might be better for the not so technical audience to speak in more genral terms, but here we are in a specialized forum, aren't we ;-)
3
u/zulkisse Jun 13 '18
Never said that you said it was shocking (ok it's becoming complicated)
By the way, since then I read someone saying that it was indeed TypeScript.
-2
12
u/asdf7890 Jun 13 '18
They are likely to be using "Javascript" more generically here, as there are a fair number of people out there (a large proportion of non-developers for a start) who have a grasp of what Javascript is but not Typescript.
Typscript compiles to Javascript so use of the term is correct: the code is written in Typescript but by the time it is actually running is has become Javascript. Or more precisely ECMAScript, before someone tries to out-pedant us on that fact!
-7
u/Bolitho Jun 13 '18
Typscript compiles to Javascript so use of the term is correct: the code is written in Typescript
But the tweet explicitly said written in JavaScript - quite a different thing compared to compiled into ;-) (and yes, I have allready noticed that the audience for this tweet probably was not a specialized one)
1
u/Ebuall Jun 14 '18
He explicitly said written in Javascript about things clearly written in pure Typescript.
1
u/Bolitho Jun 14 '18
As you may have noticed, I said that allready 😉 Though lots of people don't seem to understand that difference...
0
u/asdf7890 Jun 14 '18
It just as explicitly mentions VSCode, which is definitely written in Typescript.
4
Jun 13 '18
He reason why is the post he was responding to, which is a guy saying CS majors shouldn’t be taught JS because you can’t write office suites in JS.
5
u/yarism Jun 13 '18
TS is JavaScript
-5
u/Bolitho Jun 13 '18
It is a superset of JavaScript. They are not identical! And you cannot deduce from the subset that it is the superset of course ;-)
2
u/yarism Jun 13 '18 edited Jun 13 '18
I know, it’s just like saying that React or Angular is JavaScript. It’s a common phrase to just explain that it’s not a different language. And it’s ok for you to admit that you thought that TS was another language, I don’t keep up with everything outside of JS world and just keeping up with JS is hard enough.
But typescript can be used with React which MS are using. Though you typically see TS with Angular 2+ to add stronger types in JavaScript but it’s not it’s own language or framework.
1
u/Bolitho Jun 13 '18
Sorry but I have to contradict again: TypeScript is another language! This is simply a fact.
I don't care much about the JS community, so it is possible that some terms are used interchangeably here - for me it just feels strange to optionally loose precision in terms.
1
u/r2d2_21 Jun 14 '18
If you read the rest of the tweets, you'll find that they're using TypeScript which compiles to JavaScript.
40
u/helpinghat Jun 13 '18
I'm pretty sure they use TypeScript. Maybe the tweet just used the term JavaScript in a broad sense.
5
u/varunagrawal Jun 13 '18
The OP just tweeted a picture of some clarifying points in which he says "also run Javascript (compiled from Typescript)".
6
4
u/zulkisse Jun 13 '18
I would be very surprised if they didn't pick TS given that Larkin work on TS (based on it's Github profil)
2
85
u/TheLarkInn Jun 13 '18 edited Jun 13 '18
Originally clarified here ya'll: but I'll copy pasta!
Hi there!!! Original Tweeter here! I'm Sean and I'm a Program Manager at Microsoft working on Microsoft Edge and Edge Dev Tools!
Going to clarify across a few things. Some was lack of more then 280 chars in a tweet and not expecting this to get beyond #JavaScript twitter.
MS Teams, VS Code, is already written _with_ TypeScript which is compiled to JavaScript powered by Electron. It is an electron application. VS Code is on GitHub and Open Source if you'd like to see examples of how or what.
We are not abandoning C++, C#, or any of the other awesome languages, apis, and toolings that we use across Microsoft. EdgeHTML is almost entirely written in C++ like any other browser engine. However we do also run JavaScript (compiled from TypeScript) in DevTools, and leverage open source technologies like React and webpack to build the UI's for them.
Office 365's UI, a lot of it, but definitely not all of it, are pieces that are built using React Native (Windows). API's and Services are still going to be powered by C++, C#, or whatever is the most appropriate for that team. Nothing is converting to "all/completely" JavaScript/TypeScript.
React Native compiling JavaScript to "native code" is arguably wrong. Most of what is native are API's interactions and Native Modules that can be communicated with through JavaScript. WebViews power UI rendering thanks to React. Thanks to the Skype Engineer who sniped me on that in discussion.
Feel free to ask anything else! It's the least I can do for tweeting some pretty unclear messaging. 😅
2
u/unavailableFrank Jun 13 '18
> Office 365's UI, a lot of it, but definitely not all of it, are pieces that are built using React Native (Windows).
Can you provide more insight about this? Is the Office 365 native app for Windows rendered by React Native? Let's say, Word, Excel, etc?
3
2
u/applesauce42 Jun 14 '18
As someone who's tasked with building out a new intranet on Sharepoint, I love the push to react for webparts and the modern interface, but for the love of god, the UI and admin interface of sharepoint must've been cobbled together but a hundred different teams. It's a nightmare to get up to speed on and the terminology either overlaps or doesn't make sense. I really hope on future releases they scrap anything classic related and have one cohesive modern admin interface.
1
21
u/p186 Jun 13 '18
Does this open the possibility for MS Office on Linux? Perhaps at least through an Electron app like it would be for win32?
35
u/gabboman Jun 13 '18
yes, but I doubt ms will take the resources to make that happend.
Please MS employe reading this, prove me wrong.
4
5
2
u/prozacgod Jun 13 '18
(My react native exp is a bit low, so talking in abstracts)
Well, to get it native you'd have to build the library that makes native controls on Linux, (The react render cycle has to go somewhere)
I'm assuming there's probably a reasonable amount of boilerplate to make a react native hosting framework. And that boilerplate has little cross over between platforms, as it's the "distilled and concentrated cross platform wiring that makes the react native code function"
If you used electron, you may still have to implement a number of low-level interfaces that the hosting app expects to have. AND if MS is using ChakraCore for their JS engine, there's likely some differences in performance characteristics between that and V8 to make performance optimizations annoying to say the least.
I would be impressed if they ever did release a "React Native MS Office for Linux" Even with their own tools - I was about to say "I'd eat my own hat" but ... I faltered, I guess it's possible enough to me, that I won't make that kind of bet ;)
2
u/PickledPokute Jun 14 '18
The release of React XP was a prerequisite for OSX support. I was honestly surprised at that release due to how much effort Microsoft had put into React-Native-Windows.
Development of React XP might've been a result of react-native-windows not becoming a first-class platform of react-native nor android and iOS becoming proper plugins of react-native.
The linux community has had ample time to develop a proper react-native plugins using QT, GTK, wxWindows, X.org which would make a linux version of office rather trivial to create (as in requiring a few full-time engineers instead of a dozen or more).
0
Jun 13 '18
[deleted]
21
1
u/p186 Jun 13 '18
I currently run Windows 10, but want to run Linux as my primary OS, but have not found a good replacement for Outlook/Exchange.
0
u/shanita10 Jun 13 '18
Mostly because we want windows to die.
I don't need much more than what gdocs offers. If ms put office and games in a portable format, windows would be pointless.
2
u/p186 Jun 13 '18
I'm actually trying to get away from Google apps as well. I am currently in the process of trying out OnlyOffice on nextcloud. The new Libre Office looks great too, but the ability to edit online through nextcloud and the great UI for OnlyOffice seems like a viable alternative.
The tight integration of mail, calendar, contacts, notes, etc in Outlook/Exchange has just been challenging to replace. I've had limited success with Wine and even tried Crossover. I unfortunately have not been able to use MSO and most importantly Outlook reliably.
As for Windows, 10 has been the best desktop OS from Microsoft thus far. Especially with WSL which has been helpful when I do dev work or administration of Mac or Linux systems. It is great, but my concerns regarding privacy and security as well as WSL not being robust enough has pushed me to work to have Linux as my primary OS.
5
Jun 13 '18
So no more VBSCRIPT MACROS HELL?
3
u/jiblet84 Jun 13 '18
Just an army of dated VBScript macro writers that are now forced to write JS.
2
2
3
Jun 13 '18
So honest question here: what is the advantage of JS for native apps, other than being able to code in a language that would already be familiar to some folks? I like JavaScript, but I tend to view languages as tools for different jobs, so it seems strange for all of these efforts to shoehorn JavaScript into other areas like native coding.
So, compared to, say, C/C++, or even Java, how does JavaScript do on desktop/mobile?
12
Jun 13 '18 edited Jun 13 '18
Making a vivid UI in c/c++/c#/java is hard because ui toolsets are often outdated and the languages aren't that flexible for that specific task, for instance javascripts object notation/json is a big help. Most of the toolkits imperatively inflate layout, which is the hardest, some of them are templating controllers, which is better but still hard to scale. As an example, if you wanted to be good in xaml/wpf/c#, it took about 2-3 years to get to an expert level, some people would insist it took longer. And even then with all the knowledge in the world, managing user interfaces was still a nightmare as binding hell would eventually catch up. I hear colleagues say the same about swift, qt and gtk. These things all base on ancient approaches. Today javascript runs circles around it.
6
u/cm9kZW8K Jun 13 '18
JS for native apps,
The biggest things native apps seem to need are a non-blocking event loop, and an easy way to hook up callbacks. This is pretty much the JS wheelhouse.
GUI apps, webpages, and simple web services all come down to pretty much the same structure; the same one JS is essentially built around.
2
Jun 13 '18
So that means I cannot run Chrome, Office, Slack all parallely with my 8GB RAM?
8
Jun 13 '18 edited Jun 13 '18
There's no chrome and no dom involved in this. React-native produces native js driven apps. I'm glad big companies start dropping electron for the memory hog that it is.
9
u/yarism Jun 13 '18
It's not electron, it compiles to native code.
2
Jun 13 '18
So there's no DOM?
1
u/gavrocheBxN Jun 13 '18
Only the virtual dom. No real DOM, the virtual dom will update native views.
0
Jun 13 '18
[deleted]
3
u/AndrewGreenh Jun 13 '18
As far as I know, nothing gets compiled. The react/javascript part runs in a separate Javascript engine. The base components only control native gui components, yet still from JavaScript.
0
Jun 13 '18
[deleted]
3
u/AndrewGreenh Jun 13 '18
This is like saying electron is compiled because parts of your electron app are compiled (the chromium instance is compiled for example). I probably should have been more specific: Not one line of the JavaScript/React Code you write is being compiled to native code.
1
1
0
u/insertfunhere Jun 13 '18
"So when I said all of, I mean the UI, the things thare are interactive and a part of the users experience. Server based, API, processing, data handling networking etc, is likely through C# etc." the UI != all, lol
-2
0
Jun 13 '18
[deleted]
16
u/dardotardo Jun 13 '18
Electron, so yes. However, that’s the desktop equivalent of a hybrid app (native WebView through Chromium).
React Native is JS on top of fully compiled native components, negating the slight translation from JS => Native, you gain significant performance over a WebView.
3
u/dogofpavlov Jun 13 '18
sorry my ignorance, I thought ReactNative was for mobile. On their website they " Build native mobile apps using JavaScript and React "
2
u/dardotardo Jun 13 '18
Right, it’s a bit different in the windows world, UWP is for both their mobile and desktop platforms.
1
Jun 14 '18
react-native is a react renderer that targets mobile. Now there are lots of renderers targeting many other platforms: Windows, macOS, Linux, etc. They all depend on the „react“ package on npm. React itself is cross platform, only host semantics are specific (div, span, View, Imange, Box, etc). Microsoft wraps renderers under the reactXP umbrella, abstracting even host differences so that one codebase apparently can drive multiple platforms.
0
0
Jun 13 '18
[deleted]
1
u/dardotardo Jun 13 '18
That’s exactly what it means.
Also means there’s a non zero chance Microsoft will start supporting desktop environments other than Windows for react native implementations.
2
u/spacejack2114 Jun 13 '18
Where are you getting that from? I didn't see anything about transitioning VSCode to React Native.
1
u/Ebuall Jun 14 '18
He does not say any news here. Just says what is already build with javascript as an example.
0
98
u/pguilbert Jun 13 '18
So, if I inderstand this well. The next version of all Office is build in JavaScript and use a React fork to go native ?