8 ms·
How Microsoft Uses C++ to Deliver Office Applications Across Multiple Platforms
- mmastrac 12y agoSecond part is here: https://www.youtube.com/watch?v=MGMoRu5yrVc https://www.youtube.com/watch?v=MGMoRu5yrVc
- tkubacki 12y agohmm if Linux could get something like Android runtime - this could bring Office to Linux desktop ?
- frozenport 12y agoAndroid is almost Linux. I believe it has been done, although I am not sure about the user experience or the compatibility with native applications, you are still running an x86 computer... http://www.sabayon.org/article/sabayon-runs-android-market-google-play-apps-natively http://www.sabayon.org/article/sabayon-runs-android-market-g...
- izacus 12y agoThere is a huge difference between your run of the mill desktop distribution and Android - all they have in common is a Linux kernel and that's about it, Android replaces pretty much all user space. (Also kernel is patched and GPU drivers don't use X compatible interface for acceleration.)
- frozenport 12y agoSeriously? If I build my Gentoo differently it won't be Linux, because I used a different userland? Take a look at the link, there is the store running native.
- ori_b 12y agoIf you replace glibc, coreutils, bash, Xorg, and just about any other part that you as either a developer or user interact with, then no, it's not recognizably linux, any more than the BSDs are Linux. In fact, as far as I know, the BSDs will be easier to port to, because Bionic libc is really a stub, with lots of Posix bits left out.
- frozenport 12y ago>>If you replace glibc, coreutils, bash, Xorg, and just about any other part that you as either a developer or user interact with, then no, it's not recognizably linux, any more than the BSDs are Linux I had to add a driver for a USB device and it was Linux to me. I could not have done the same for BSD (never used it) or Windows using code from Kernel.org . I have personally used an Android kernel to boot one of those arm `mini-netbooks` into xfce. Indeed you would find that glibc has iterated through different ABIs but we don't call these different operating systems, and we can fix them by simply installing the appropriate binaries.
- jmnicolas 12y agoOn the principle I agree with you, but I find it funny that when you take out the GNU in "GNU/Linux" it's not Linux anymore.
- pjmlp 12y agoThere is hardly anything from a traditional GNU/Linux on Android. You have a 100% Java based userland, and only a very limited set of C and C++ libraries available to native applications. There isn't even a full POSIX support. Google could change Linux kernel with e.g. QNX, and hardly anyone would notice.
- antimagic 12y agoIf I go and get a book on "Linux Programming", it'll tell me a whole lot about file descriptors, mmap, signals, forking processes, threading and so on. Pretty much none of that is available to someone writing applications for Android.
- 12y ago
- dmacvicar 12y agoApril 1st post?
- justintocci 12y agotl;dr they use a client-server model, then use the ui frameworks that are provided by the vendor. Really excellent talk, highly recommend it if you're interested in this sort of stuff.
- Htsthbjig 12y agoIs very interesting how people on Microsoft got to the same conclusions that we got: get rid of Java and any other exotic language in the sharing code and use only c++. Use other languages in the interface for different platforms,or in the testbench code. We got to this conclusion after years of painful practical problems, but it is hard because it goes against the common philosophy of theoretical people that write best practice books(but not code too much) and natural inclinations of programmers(to use the new shiny thing).
- stinos 12y agoWe started like this, sort of a gamble, and until now it never gave us major problems. So it's indeed a sort of relief to see other companies use this road as well. The core of our software is grabbing data from an external device and signal processing. On top of that we've built a plain C API, an plain C RPC lib over TCP with the same interface as the main C API, and a C++/CLI dll for interfacing with .Net. On top of that we've built the main C# ui and a lot of custom applications in C/C++/Labview/Matlab/Python. And it all just works which makes me wonder wether there even were other choices than C++ for this particular job.
- Dewie 12y ago> and natural inclinations of programmers(to use the new shiny thing). It seems like C++ keeps getting shinier. Though organizations might try to stick to a limited subset of C++ anyway.
- raverbashing 12y ago> It seems like C++ keeps getting shinier. Though organizations might try to stick to a limited subset of C++ anyway. I agree with both points. And I'm glad the shiny new parts of C++ are very usable
- adenner 12y agoFor the parts that are still missing I have found the Boost library to help round it out in a cross platform sort of way. (http://www.boost.org/ http://www.boost.org/)
- D_Guidi 12y agolooks similar to this old submission: https://news.ycombinator.com/item?id=8486627 https://news.ycombinator.com/item?id=8486627
- gambiting 12y agoThere is another area where this approach is common - games programming. I work on a project which is written entirely in C++, and compiles from the same codebase(and from within the same IDE - VS2012) on Wii/WiiU/X360/XOne/PS3/PS4. It's interesting because every one of them uses a different compiler and builds for entirely different architectures and yet the same code builds on all.
- rebootthesystem 12y agoHave you considered writting about your experiences? It would be very interesting to learn more about the good, bad and ugly of developing code for such a range of platforms.
- corysama 12y agoNot quite what you are looking for, but here's something: http://www.reddit.com/r/gamedev/comments/xddlp/describe_what_developing_for_each_console_youve/c5lg7px http://www.reddit.com/r/gamedev/comments/xddlp/describe_what...
- gambiting 12y agoQuite possibly :-) At the moment I can definitely share an Ugly part - the code has thousands of #defines everywhere, and you will find parts with C++11 code(for PS4/X1) and parts which use some hardcore custom methods for everything since they don't have access to STL(for WII....which is a horrible console to write for). So within one file you can see code which uses autos and for each(C++11 parts) and then bits which can't even use Vectors. It's bizarre. And then you have gigabytes of ram on next gen console, but everything you do also needs to fit in the tiny, 128MB ram of WII. It makes you really aware how you write code - which I think is good.
- jdswain 12y agoWe do this as well, targeting Mac, Windows, Linux, iOS and Android with the same C++ core libs. It seemed to be the only way to target multiple platforms without a huge team. It's not all easy though, the work of maintaining the JNI bridge is large, even with most of the code being generated automatically, With the woeful state of native debugging on Android it may have been almost as easy to recode in Java, but maintaining two code bases would have been a real hassle, its hard enough keeping all the UI's in sync.
- pjmlp 12y agoI just do Android and WP as hobby. SDL was ok for games, but now with a real app, I tried the Qt way, only to discover there are still lots of issues. So I figured out, better use JNI and C++/CX directly and save the pain of figuring out bugs in Qt. In the end, the JNI pain is bigger than figuring out Qt bugs and helping those guys. For small devshops there is a lot of time to be saved by letting third parties like Digia and Xamarin have to go through the pain of writing platform specific wrappers. If I was doing mobile OSs for work, I would gladly pay for them.
- ryandrake 12y agoSame here, C++ for the business logic, maths, engine, etc., OpenGL for the graphics, and then a relatively thin platform-specific layer of Obj-C,Java/JNI,Qt just for the UI. Saved a lot in terms of not having to have multiple teams basically writing the same stuff in different languages. One of the weirdest things we had to overcome was actually the cultural aspect. For the Linux client, nobody had any problem with the architecture: Get the Qt client working and hook it up to the plumbing. Done. For the iOS guys, still no problem, but let's make sure we separate the C++ cleanly from the Objective-C through a solid, well-understood interface so our food doesn't mix. The Java guys basically threw a hissy fit, objecting to all of this C++ nonsense infecting the purity of their Java. Every time the app crashed: they blamed the C++ code. Every performance problem was because C++. Grandma got sick? C++. When tracking down a bug, they'd step through their Java layer, and as soon as it hit the JNI, they'd just stop and file a bug to the core team rather than dirty themselves stepping through C++. They culturally wouldn't accept C++, and wanted to instead have a separate parallel tree with Java business logic, Java math, Java graphics, etc. The hard reality, however, was that the Android client wasn't bringing in enough revenue to justify a full parallel team and code base. Despite all the grumbling, going the C++ route was a huge success, letting us support multiple platforms with mostly the same code base. I'm curious as to whether this borderline religious anti-C++ attitude is common in the Java/Android ecosystem, or an outlier? I found it really bizarre.
- twen_ty 12y agoGreat stuff! The biggest takeaway for me is that investing in c/c++ paid off immensely for Microsoft. For a massive codebase that's 30+ years old this is a huge win. No other programming language could have and still give that level of ubiquity. It also highlights how important it was for C++ to have stayed backwards compatible with C, despite the pain. c++ (and c) is here to stay.
- w8rbt 12y agoYes, absolutely. C++ is the silent workhorse that is used almost everywhere. It's especially huge in embedded and systems programming. There'll be a significant number of programmers paid to maintain and enhance C++ programs for at least the next 50 to 100 years, probably longer.