Write once, ship everywhere: Cross platform development
This is a modal window.
The media could not be loaded, either because the server or network failed or because the format is not supported.
Formal Metadata
Title |
| |
Title of Series | ||
Number of Parts | 46 | |
Author | ||
License | CC Attribution 3.0 Unported: You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor. | |
Identifiers | 10.5446/47172 (DOI) | |
Publisher | ||
Release Date | ||
Language |
Content Metadata
Subject Area | ||
Genre | ||
Abstract |
|
droidcon Berlin 201528 / 46
5
7
10
13
16
18
20
21
23
26
31
34
35
36
41
42
45
00:00
Computing platformOpen sourceOpen sourceComputing platformState observerWindowProcess (computing)Multiplication signPoint (geometry)Software frameworkRepository (publishing)Dependent and independent variablesCASE <Informatik>CodeVisualization (computer graphics)WeightOpen setLecture/Conference
01:21
FreewareOpen sourceSoftware developerVisualization (computer graphics)Software developerIndependence (probability theory)
01:55
Multiplication signMachine codeSlide ruleEmulatorINTEGRALBitMoment (mathematics)Cross-platformProjective planeAudiovisualisierungMereologyAndroid (robot)Visualization (computer graphics)Lecture/ConferenceMeeting/Interview
03:21
Open sourceFreewareSoftware developerKeyboard shortcutPlastikkarteHypercubeVisual systemEmulatorTouch typingMultiplicationEmulatorAudiovisualisierungData storage device1 (number)WindowOffice suiteVirtualizationVisualization (computer graphics)Uniform resource locatorComputing platformAndroid (robot)NumberMobile appSoftwareFreewareSoftware developerElectronic mailing listPoint (geometry)Formal languageSimulationGoogolMultiplication signCartesian coordinate systemLecture/Conference
04:59
Intrusion detection systemVisual systemDemo (music)EmulatorKeyboard shortcutAndroid (robot)PlastikkarteMultiplicationTouch typingInheritance (object-oriented programming)Nominal numberSurjective functionMetropolitan area networkConvex hullUniqueness quantificationOcean currentRight anglePoint (geometry)EmulatorTouch typingOperating systemRevision controlSimulationCartesian coordinate systemINTEGRALProjective planeMachine codeMobile appAndroid (robot)Normal (geometry)Uniform resource locatorField (computer science)MereologyMoment (mathematics)Semiconductor memoryVisualization (computer graphics)Virtual machineData managementDefault (computer science)Open sourceMultiplication signWindowTouchscreenAudiovisualisierungSoftware development kitFlow separationHard disk driveLecture/ConferenceComputer animation
08:58
State of matterSoftwareDrop (liquid)RoutingCartesian coordinate systemRight angleSoftware testingHard disk drivePoint (geometry)PlastikkarteInternetworkingDefault (computer science)Keyboard shortcutEmulatorHydraulic jump
10:12
Presentation of a groupMultiplication signStrategy gameCross-platformLengthQuicksortLecture/Conference
10:54
Computing platformBinary fileLengthVisual systemRight angleAndroid (robot)Connected spaceMobile appCross-platformCodeProjective planeVisualization (computer graphics)Power (physics)outputWeb applicationLengthCartesian coordinate systemMultiplication signWeb 2.0Control flowAmsterdam Ordnance DatumWeb browserPoint (geometry)Scripting languageJava appletDevice driverOffice suiteFilm editingAudiovisualisierungLecture/ConferenceProgram flowchart
13:12
Hill differential equationNormed vector spaceTwin primeMachine codeOffice suiteAndroid (robot)Tablet computerIdentity managementCodeoutput1 (number)Cartesian coordinate systemNumberAbsolute valueLecture/Conference
13:48
Peg solitaireAvatar (2009 film)Mathematical singularityHydraulic jumpSurgeryConvex hullKeyboard shortcutFreewareCartesian coordinate systemFormal languageAvatar (2009 film)1 (number)FacebookPeg solitaireComputer animationLecture/Conference
14:18
Cross-platformCodeProjective planePoint (geometry)Hacker (term)Core dumpFormal languageComputing platformSession Initiation ProtocolBuildingCartesian coordinate systemMobile WebMeeting/Interview
14:47
Android (robot)Computing platformCodeBuildingUser profileEmulatorVisual systemDefault (computer science)Mobile appLibrary (computing)Electric generatorFluid staticsAerodynamicsShared memoryTemplate (C++)Android (robot)Visualization (computer graphics)Formal languageAudiovisualisierungoutputComputer animation
15:22
Android (robot)Computing platformCodeState of matterUser profileBuildingEmulatorProjective planeVisualization (computer graphics)Cross-platformCartesian coordinate systemLibrary (computing)Android (robot)outputVolumenvisualisierungComputing platformCodeMultiplication signCubeTemplate (C++)Open setAudiovisualisierungFluid staticsCompilation albumLecture/ConferenceComputer animation
16:59
Cartesian coordinate systemCodeCubeRight angleoutputWindowKeyboard shortcutFunctional (mathematics)Android (robot)Computer animationLecture/Conference
17:43
Maxima and minimaComputing platformCodeState of matterBuildingUser profileAndroid (robot)EmulatorPoint (geometry)Slide ruleAudiovisualisierungModal logicPresentation of a groupAndroid (robot)Category of beingVisualization (computer graphics)Lecture/Conference
18:23
String (computer science)outputVisualization (computer graphics)Android (robot)Computing platformNormal (geometry)Right angleSet (mathematics)RandomizationText editorPower (physics)Source codeComputer animation
18:52
outputGame controllerBridging (networking)Hecke operatorHookingVisualization (computer graphics)Cartesian coordinate systemAudiovisualisierungService (economics)Process (computing)Profil (magazine)Meeting/Interview
19:27
Multiplication signWindowParallel portOffice suitePhysical systemVisualization (computer graphics)Android (robot)Meeting/InterviewLecture/Conference
20:03
Computing platformCodeAndroid (robot)User profileBuildingEmulatorAndroid (robot)Uniqueness quantificationVisualization (computer graphics)Message passingAudiovisualisierungSoftware developerCartesian coordinate systemPoint (geometry)Computer animationLecture/Conference
20:39
Multiplication signBuildingFacebookWeb 2.0Point (geometry)Software developerLecture/Conference
21:19
Client (computing)EmailLogicComputing platformIntrusion detection systemMobile appWeightShared memoryCodeComputing platformMachine codeShared memoryOpen sourceRevision controlWeightLecture/Conference
21:59
Bit error rateWeightGame theoryOpen sourceMultiplication sign1 (number)C sharpoutputAndroid (robot)ArmMachine codeJust-in-Time-CompilerCodeIntermediate languageMereologyLecture/ConferenceMeeting/Interview
22:44
WeightInternet forumLogicComputing platformMereologyCartesian coordinate systemCodeComputing platformFormal languageLibrary (computing)Plug-in (computing)AudiovisualisierungVisualization (computer graphics)Lecture/ConferenceMeeting/Interview
23:21
Bit error rateWindowMereologyProjective planeoutputAndroid (robot)Library (computing)Portable communications deviceCartesian coordinate systemGreatest elementC sharpVisualization (computer graphics)LogicMachine codePoint (geometry)Different (Kate Ryan album)Connectivity (graph theory)Right angleMultiplication signComputer animationLecture/ConferenceMeeting/Interview
24:09
Abstract data typeComputing platformSocial classWeightCore dumpCartesian coordinate systemMultiplicationCASE <Informatik>Task (computing)Projective planeLecture/Conference
25:12
View (database)Task (computing)Core dumpLogicLibrary (computing)CodeAndroid (robot)Drop (liquid)DatabaseCartesian coordinate systemText editoroutputFacebookNormal (geometry)Element (mathematics)Task (computing)Computer fileDressing (medical)Multiplication signDefault (computer science)Instance (computer science)Drag (physics)Right angleSequelPower (physics)WeightDirected graphComputer animation
26:57
Cartesian coordinate systemComputing platformSoftware bugBitNormal (geometry)Default (computer science)Visualization (computer graphics)ChainComputer animationLecture/Conference
27:27
Android (robot)outputProfil (magazine)WindowCategory of beingLevel (video gaming)Normal (geometry)Cartesian coordinate systemComputer configurationTask (computing)BuildingLecture/ConferenceMeeting/InterviewComputer animation
28:11
DataflowMereologyDigitizingMobile appDecision theoryProduct (business)Lecture/Conference
29:01
Cartesian coordinate systemMultiplication signSoftware developerType theoryWeb 2.0GoogolWeb applicationDirection (geometry)Ruby on RailsLecture/ConferenceMeeting/Interview
30:05
Java appletScripting languageNatural numberSoftware developerVisual systemHybrid computerComplex (psychology)Mobile appScale (map)Enterprise architectureSoftware frameworkAndroid (robot)Cartesian coordinate systemSoftware maintenance2 (number)CountingDirection (geometry)Integrated development environmentEmulator1 (number)Configuration spaceType theoryoutputWeb 2.0Computer configurationSoftware frameworkSoftware developerCustomer relationship managementWindowRight angleMultiplication signMoment (mathematics)Bootstrap aggregatingLecture/Conference
31:51
Demo (music)Computer animationLecture/Conference
32:25
Time zoneLink (knot theory)BitSoftware developer2 (number)Multiplication signCartesian coordinate systemPlug-in (computing)Default (computer science)Computer fileCASE <Informatik>CodeFront and back endsRight angleBuildingConfiguration spaceComputer animation
33:46
Demo (music)Projective planeWindowCASE <Informatik>Inclined planePower (physics)Cartesian coordinate systemTouchscreenFluxJava appletTablet computerCodeComputing platformCommunications protocolService (economics)Lecture/Conference
34:56
Right angleProjective planeCartesian coordinate systemLine (geometry)Bridging (networking)WindowJava appletVideo gameCross-platformTouch typingSoftware developerCodeMeeting/Interview
35:53
Java appletEvent horizonTouchscreenProjective planeMultiplication signRight angleCommunications protocolProduct (business)Lecture/Conference
36:23
Visualization (computer graphics)Presentation of a groupAreaSign (mathematics)TouchscreenHookingNeuroinformatikSurfaceFilm editingComputer animationLecture/ConferenceMeeting/Interview
37:00
SurfaceMultiplication signPerfect groupLecture/Conference
Transcript: English(auto-generated)
00:05
Hey, hi, so, yeah, he already spilled the beans, so Microsoft now has something called the open source team, I don't know if you guys have heard, but we started open sourcing pretty much everything that we do, .NET is open source, Mono is open source, the
00:21
build tools are open source, at this point we have about 900 repositories up on GitHub, increasing every single day and there's a whole team responsible for putting all those things in GitHub and that will be my team. My job title is open source engineer which means that I spent my whole time working with various platforms out there, in my case that is usually React or some other
00:44
JavaScript framework, and our job is to make sure that, you know, whatever they're building and whatever we are building those two things work together. So if you think about something like Wine, I don't know if people still remember Wine, was like this Windows thing for Linux, yes, so there is of course someone at Microsoft who talks to the guys at Wine about
01:02
the things that we do and that somebody would be me. So that's roughly what we do, just to give you the introduction and at the same time whenever we're not writing code, when we're not putting anything on GitHub, every now and then we're travelling around and telling people over the stuff we do and the things that we're going to talk about today are mostly Microsoft integrating other technologies into Visual Studio,
01:22
it's not necessarily that we came up with like fancy new things, it's much more about us integrating other things that already existed, which is why I'm going to talk about it. So before we go any further, there are a few things I want to find out, and I guess the most important one is that you might know Visual Studio as this really expensive development tool.
01:44
What is important to know today is that everything I'm going to be talking about is available in the Community Edition, which is available for free, especially for those engineers, but also for anybody who is a freelancer, independent developer, or for any teams that have less than five people. It's called the Visual Studio Community Edition. Everything I'm going to be talking about is available for free.
02:02
Like there's nothing I'm going to be talking about today that you have to pay for, unless it's sold by not Microsoft, right? But everything that we present is available for free. So that being said, let's briefly cover what I want to talk about. We only have about 40 minutes, which is not a lot of time.
02:21
There are roughly five things I want to cover. The first one is that we now have an Android emulator integrated in Visual Studio. There's a bunch of reasons why we did that. I'm going to get into those in a moment. Then the three more topics, all of our cross-platform, because most of the things that we built, we built them because we needed them ourselves. And depending on the project, we might need different things.
02:42
So the things we're going to talk about are C++ cross-platform. We're going to talk a bit about native code. Then we're going to talk about C-sharp, specifically with the support of Xamarin. And then at the very end, we're going to talk about Cordova, because you guys may have not checked out Cordova in a few years, because maybe it didn't really deliver the performance that you liked.
03:02
But I strongly believe that it's at least worth another look, at least if you believe in things like React or some other technologies. And then the very last part, and very, very briefly, there's going to be one slide I'm going to be talking about Project Astoria, because currently people really want to know about Project A. But that's going to be at the very end.
03:24
So, let's get started with the emulator. There's a bunch of reasons why we built one. So, as I already said, most of the things that we built, the very first customer for Visual Studio is Microsoft itself. And if you opened up the Google Play store in recent times,
03:42
you may have seen that there are a bunch of apps that are made by Microsoft, including Outlook, including Skype, the whole Office suite. Then we just recently started acquiring a bunch of small studios that build amazing applications, including Berlin's very own window list. So, we do have all these developers at Microsoft that try to build amazing software.
04:02
And as far as Android is concerned, it's really, really cool that the platform is big enough that there are a bunch of people out there building emulators, but we don't really think it's cool that the few ones that work really well are about 25 bucks a month, which, quite frankly, seems insane for an emulator.
04:20
So, we built our own one. It's available for free. And there are a bunch of reasons why we want to do that. The number one reason is that we want to build an x86-based Hyper-V powered emulator, which basically means it's really, really fast. It's just a normal virtualization you do in Windows. It also has the benefit that if you do anything else that is virtualization related, you don't have to reboot Windows,
04:40
which is something you had to do. And then we have a bunch of features in there. We have a full debugging experience. You can basically, you know, add breakpoints, step points, continue in all three major languages, including the native ones. But we also have a bunch of features around, location simulation, network simulation, all those things that you wanted to simulate.
05:02
And I think before I go any further, the best thing I can probably do is just to show you guys. That's probably the best thing. Okay. Cool. So you can see the same things that I'm seeing. I'm just going to open up a random application.
05:24
Yeah, I think I'm going to start with this one. So if you have any kind of Android application open, this is one of our C++ applications. It's one of the default Android C++ applications. The fact that it's C++ at the current moment doesn't really matter. Ignore that for just a moment.
05:41
But the important part is that we can now select a bunch of emulators right here, and we essentially have Android integrated. So if you go to tools, there's now this field called Android, which has emulator managers, SDK managers. The same things you already know. Like, none of those things are in any way unique. You may have seen this window before, right?
06:01
The whole point is that we integrate directly with the same tools you're already using. This is just a normal Android SDK. So if I feel like debugging this application, I have to build it first, but basically what is going to happen is it's going to launch the emulator, which really is just a VHD, it's a virtual hard drive and would just run Android itself as a virtual machine.
06:23
It's not necessarily an emulator, it's just straight up a virtual machine. And of course the build failed. That's beautiful. Native code. Native code is great. We can build anything else.
06:46
Let's build a blank app.
07:05
And obviously we have a bunch of VHDs available. Right now they're all based off the Android open source project because we feel like that's probably the Android you want to develop with. And this is currently the emulator starting up. While Android is actually booting, I can show you some of the tools.
07:21
This is going to take just a moment. Yeah, this is beautiful.
07:48
I'm doing the major mistake of running everything off better versions here, better version of Windows, better version of Visual Studio on a fairly small machine. But we're going to get there. We're just going to try this again.
08:11
Just going to make sure that the operating system has actually enough memory.
08:27
There we go. That actually looks a lot better. Okay, there we go. So let's open this whole thing up. This is the whole emulator and the whole emulator. And the interesting piece here is, by the way, one of the important things is that the emulator supports full multi-touch.
08:41
So if you happen to have any kind of touch screen, you can probably not see my fingers right now, but this is just a normal touch screen, right? I can just operate this like a normal phone. We support various things like you can just drag and drop an APK onto the Android emulator and it just works. At the same time, we can do things like location simulation. I'm not connected to the internet right now,
09:02
but basically you can do things like put down a bunch of drop points where you want your device to go and then you can start a route and you basically simulate the same route over and over again, which is super interesting if you have any kind of testing for location-based applications. We do the same thing with network. You can simulate all kinds of network things. You can simulate the accelerometer.
09:20
So I can do things like this, right? I can like turn the phone and, again, something like that can be automated for testing. So we have recorded data like the shake here, which just keeps shaking the device in like a very automated way, which is amazing for testing. That's pretty much exactly what we need. And then, of course, we can take screenshots,
09:41
we can simulate all kinds of camera states and battery states, and we can, of course, actually use a live camera, or we can use things that are just in there. And comparing to other emulators, there are a bunch of things that we just take for granted because we think it should work, but there are a few things that I'm just going to call out like the keyboard just works, the SD card is just a default folder on your hard drive.
10:01
There are just a bunch of things that probably work exactly the way you expect them to work, right? So that was the emulator, just very quickly. I'm actually going to close this thing again. I'm going to quickly jump back to the actual presentation
10:27
and talk about the actual cross-platform strategy. It's already reiterated a bunch of times that usually we build tools for ourselves, and then if they happen to be really, really good, we give them out and try to, you know, convince the community of also using them.
10:40
And most of the time, when you think of a cross-platform, there are sort of these two things that you have to compare. On the one hand, we have very rich, native experiences that is usually what you do if you want things to be good and great and performant. And then on the other side, we have breadth of devices, which just means I'm trying to build something that works in as many places as possible, right?
11:00
So those are the two sides, and what we're trying to do is we're basically trying to extend those. So if I go ahead and say, I want the rich experiences, for us in our Microsoft world, that would usually be two things. One would be .net, just ready to see sharp applications, and then it would be C++ native, which is the thing below.
11:23
And our way of extending that is in Visual Studio 2015, we now have full support for Xamarin, which is for the C sharp world, but we also have full support for Visual C++ for cross-platform applications, which is actually a pretty big step. It means that you can build Android applications using the Android NDK straight from Visual Studio.
11:43
You can debug them. You can do the same thing with iOS applications. We do need a connection to a Mac, but it's fully bridged, we have full breakpoints. So basically you can have one C++ project that works across devices. And then on the breadth of devices side, we have the browser-based applications,
12:00
and Cordova has already been around. There are a bunch of things that we thought demand fixing in Cordova. We've been contributing heavily to the Cordova project in the last year. There's now a bunch of code inside Cordova that has been written straight by our team, straight by Microsoft. There's a bunch of things inside Cordova that are now pretty good, but at the same time we think one of the major pieces
12:21
you can improve is actually tooling, because if you played with Cordova a few years ago, the world kind of has changed in the meantime. JavaScript has now exploded. If you checked out something like React Lady or 60 frames per second web, you can build quite powerful applications in JavaScript in a way that you really couldn't a few years ago.
12:40
So things actually in fact have changed quite dramatically. So we did improve the tooling for Apache Cordova apps to enable people to actually build good apps. Because the, and I'm going to say this right now, I'm going to reiterate it later again. Many people think they know how to write JavaScript, which is probably not true. Just because it's easy doesn't mean you know how to write it well.
13:01
So, Cordova kind of makes a comeback right now. So, let's get started with C++. The main reason we built C++ was for Office, because when we decided that we wanted to move Office over to Android and iOS, we had this decade old native code that for some reason had to now go on a tablet.
13:22
Coincidentally, that is not the worst way to do things. I already told this question to a gentleman last night, but out of the top 50 Android applications right now, just a quick guess, how many are using C++? Somebody give me a number, like anything.
13:41
Absolute silence. All the white ones are the ones that are not built in C++. Like C++ is the language to go to. If you want to build a really great application and you want to go with whatever the major people are doing, C++ is the way to go.
14:01
So, out of the top 50, Pandora, Netflix, Pinterest, then whatever that ringtones is, the Weather Channel, Magic Piano, Solitary, Wish Shopping Made Fun, Amazon Shipping, those are the only ones that are not built in C++. And that, by the way, includes things like the Facebook Messenger, for very good reason, because C++ allows you to go cross-platform
14:22
in a very, very usable way. It's the only language that is spoken by all platforms, and it's the only language that actually allows you to write code that compiles down to the very core of what those applications expect, and those platforms expect. So, now that I've already made the point that C++ is not really this funky project
14:41
that some hackers are doing in the dungeon, C++ is kind of the way to build mobile platforms today. Let's talk about the tooling that we have. Visual Studio already, for years, had amazing C++ support. If any of you ever developed some game development in some of the more advanced languages, Visual Studio is kind of the way to go anyway.
15:01
I think you can very confidently say that Visual Studio is kind of accepted as the best tooling for C++. The only thing we had to dramatically improve is how to do cross-platform stuff. This screenshot is actually outdated. We started with Android, we now also edit iOS, and I can just show you what that looks like. Actually, let me just quickly jump into Visual Studio.
15:31
Okay, so if you create a new project, in the latest build of Visual Studio,
15:40
if you, for some reason, decide to go with Visual C++, there's now this cross-platform thing. At the very top, you see native activity applications for Android, OpenGL ES. Those are the typical ways you can do, but one of the more interesting things is something like OpenGL ES application for Android and iOS.
16:01
So if you create that, we're creating a new template, we're going with the template, we're creating a new application, and what really happens is that we create a shared library that contains all the actual C code, C++ code, but then we also create solutions for the individual platforms. So at the very top, you see the native library, the native activity for Android,
16:21
and that would just be straight up C++ native Android activity, NDK, I don't know if anybody ever used the NDK, I understand it's not very popular, but if you go to the top hundred of applications, if you want to actually build the best possible application, the Android NDK is kind of the way to go. Then at the same time, we have, over here, we have a static library for iOS,
16:41
the same thing, just for iOS compiled. Then we have this shared thing. And this shared thing is really illustrating why this is important, because I'm not actually going to run the application, but if you go into the application, this is just some C++ code to render a cube, nothing big, just a tiny cube.
17:01
Ah, geez. And we're using the same code in the two applications to actually render the cube, right? I guess that makes sense. We have C++ code that is then compiled down to Android, the way Android expects code to be compiled, then we have the same code on iOS, the way iOS expects code to be compiled, and then we also can do the same thing for Windows if we feel like it.
17:20
And what actually happens inside, if you, sorry about that, this is like a latest build of Windows. It was not a smart idea to come up with a latest build of Windows. But if you actually check out the Android application, all the application is doing is, it's basically doing a JIT binding and calling the C functions, right? So I think that makes sense so far.
17:42
Let me quickly go back here into the presentation, just so I can give you guys some more points. So, the main point I want to make here is,
18:04
actually I don't know why I went back here, I'm going to show you guys in Visual Studio, there's no point in showing you the slides. This makes maybe more sense when I just show it. The main point here is that this is not necessarily a Visual Studio feature, because the main way we did this is we just went ahead and used the Android NDK.
18:21
If you check out the properties, you can see that we are using, right now we're using the CLang platform tool set. If you have something that's using GCC, we also now have GCC, which for Microsoft C++ people is actually a major step. As far as you guys are concerned, it's probably just some random string right there, but Visual Studio is essentially just using a normal Android SDK.
18:41
As far as Visual Studio is concerned, this thing is just giving you a very powerful text editor. The way it's compiled is exactly the way Android demands to be compiled. The way iOS is compiled is exactly the way iOS should be compiled. By the way, you might be wondering how the heck we're actually compiling iOS. There are a bunch of solutions to do that.
19:00
We can't actually compile iOS because of license reasons. So what we built is we built a teeny tiny bridge that you can install on any Mac, and Visual Studio can hook into the bridge, control the Mac, and then still do debugging. So if you run this application, we can still do step debugging. You get the full logger, you get the full profile, you get everything that you normally would get, except that we are controlling a Mac
19:22
for the actual build process. This is especially interesting because you don't actually have to own a Mac. There are a bunch of services out there, like Rent a Mac, where you can rent a Mac by the minute. And using Visual Studio, if you don't already happen to have a Mac, you could just rent one. If you already have a Mac, Parallels is kind of the ideal solution. The way we build it for Office or whatever,
19:41
is that we have a Mac, it's running OS X, then Parallels and Windows, and basically those two systems can talk to each other quite well. Works extremely well. At the same time also, I mean there's some IntelliSense in here, right? So if you go into Android, this is normal IntelliSense and it kind of knows about Android,
20:00
so you see we have like, there is Android things in here. It's basically normal IntelliSense. This is not really anything unique for Visual Studio, it's just that we now fully support Android. That's kind of the main message here. Okay, so next up would be Xamarin.
20:37
Native development really is the best way to build an application, I think I made that point.
20:41
At the same time, if you have to build anything today, you might not want to go with C++, mostly because, you know, it's kind of a pain in the butt. Nobody really likes to build in C++, it's not anything people choose to do, it's just something people decided to do because they made certain trade-offs. Usually the trade-off is, I have a team with a gazillion people and Facebook Messenger has to be the most best thing ever,
21:02
it doesn't matter how many millions it costs. And then what used to be the next best thing would be the web, which would be a long shot away from native development. So there used to be this gap in the middle, so this company arose to build something in the middle. What Xamarin is doing,
21:20
I don't know if you guys ever used Xamarin, you probably haven't, but it is probably the most convenient way to build a native application across platforms with shared code. The major downside is, it is so good that they charge money for it. We can't really change that, we are not Xamarin, it's an independent company, but it's so good that I have to mention it, it's kind of amazing.
21:41
So what actually happens in Xamarin, just to briefly talk about it is, have any of you ever heard of Mono? Okay, five, six hands go up. Mono is an open source version of .NET, it has been around forever. .NET itself is an open source
22:01
and Mono and .NET are kind of the same thing now, it's very confusing, don't even get into it, but at the same time, Mono is kind of amazing. Major things like Unity are based on it, if you ever used any kind of game on your phone, chances are you probably ran Mono. It's extremely fast, it's crazy fast. So what Xamarin is doing, Xamarin is using Mono to have you write in C Sharp,
22:21
they have two wrappers, one for iOS and one for Android, and they allow you to write in C Sharp. And then they just go ahead, take your C Sharp code on Android, they compile it down to intermediate language, IL, to then do just-in-time compilation on Android, if that sounds confusing to you, that is exactly the way Android is supposed to be run, and on iOS they turn it down into an ARM assembly
22:42
and then run the native application. The key part here is that Xamarin is again not about building one application that runs across platforms, it is very much about reusing code. All it's doing is allowing you to write the same language across platforms, which then allows you to reuse libraries. So what we have done is,
23:01
we basically improved the way and the workflow you did this. Xamarin used to be this kind of outsider which had to write a bunch of plugins for Visual Studio, the plugins were kind of meh. Then they built their own application which is also kind of meh. But if you take it all together and if you improve the tooling, you have something that is extremely, extremely solid. And that is what we did in Visual Studio 2015.
23:22
The interesting part is the portable class libraries and the universal projects basically allows you to build three different applications if you want to target Windows and iOS and Android. And then all those applications are written in C Sharp and they all call one common library. So you would normally have your business logic in that common library and then talk to that library.
23:41
I'm going to show you that very briefly, just what that looks like in Visual Studio. But at the same time, one of the major points I want to make because that is always the question is, yes, you can do everything you can do in Xcode or in Android Studio, you can do the same thing in Xamarin. There's something they care about very, very deeply. They compile it on the native code. The API coverage is by design always 100%.
24:02
There's absolutely no difference. It's entirely generated. There's no difference, right? So let's briefly look at that very briefly.
24:21
I'm just going to show you guys one small application that does exactly that.
24:58
And again, it's going to look the same way your application already looked in C++.
25:01
It's going to have one project with multiple solutions in there. So in this case, it's a bunch more. The tasky.droid is the one that is probably interesting to you guys. But the core idea is the same one, right? So you have tasky.droid, tasky.ios and tasky.windphone.
25:20
And this by the way is the public that is asking, hey, do you want to connect to a Mac to build iOS because it detected that we have an iOS application in there. At the same time, we also totally now have this editor for Android layout files, which we think is pretty good. We quite frankly think it might be better than the Android Studio one.
25:42
Totally tastes though. Like if you love the one in Android Studio, that's totally cool. Go ahead and keep using it. But we really like this one. We built it for ourselves. And it basically has the same thing you would expect. So on the left in the toolbox, we have all the normal Android tools and we have things like some of the default elements.
26:01
If you go, for instance, with the clocks, right? And for some reason, Android needs to have an analog clock that is like a really important thing. You can then put it in, drag and drop. And behind it, there's just normal XML. Pretty much like you would expect it to be, right? And if you look at some of the code, I think that might be the more interesting piece.
26:21
The code is pretty simple. So this is just normal C sharp. Nothing special about it except that it's almost C sharp including all its features like async and await. But most of the actual business logic is then in a common shared library. So for instance, task.core has the actual task database. It has SQLite.
26:41
And you can reference those things from all the individual solutions. So all three applications use the same data layer. There's never any kind of mismatch between individual applications. And if you're doing something like Facebook Messenger, that is extremely powerful, right? Because there's a gazillion little bugs that are hidden behind writing individual applications
27:00
for each platform. As soon as you have a data mismatch, things usually break. This is an extremely, extremely powerful solution. The only downside is that you have to pay a tiny bit of money for it. I think these days it's like 20, 25 bucks. Something like that. But it's an extremely powerful solution. And the main thing we did is that we again, integrated the normal default tool chain. So what you used to do is you used Visual Studio
27:23
to write your applications and then go outside to build it, to debug it, to deploy it. All of that is gone. It just integrated into Visual Studio. You can build and debug and profile Android and iOS and of course Windows. And all those things just work together seamlessly and you don't really have to worry about anything. Again, it's pretty much mostly about convenience.
27:42
The actual technology has already been there. So if we check out the task.droid application we go to properties and we check that out. There's a normal API level for Android. There's a normal Android manifest. Just the way you would expect your Android manifest to look. We have the normal Android options.
28:02
And for building, at the end of the day it's just gonna go down to Android and Apache and. If you wanna use Gradle, that is totally fine. We also support Gradle. Again, we're just calling the normal Android things and you can totally customize that whole flow. So that will be C Sharp.
28:21
Which leads to the very last part. Which would be the JavaScript part. So I fully assume that most of you have already heard of Apache Cordova. I also fully assume that many of you have tried it. And I also assume that many of you didn't like it for actual production.
28:41
As I didn't a few years ago. Quite frankly, it just wasn't there. Especially on, I remember that Apple for some reason did this little thing where they artificially slowed down web-based apps. Which was a great decision. But all around it was just not a great experience. And the one thing that really changed in the meantime is that people kind of came around to realize that a virtualized DOM is amazing.
29:01
So if you guys have ever heard of either Angular 2 or React or Ember 2 with Glimmer. There are now a bunch of engines out there which allow you to use a virtualized DOM. We don't have to get into the details. Basically what it means is that the web that used to be rather slow can now be extremely speedy and can render at about 60 frames per second if you feel like you wanna do that.
29:20
And there are now a bunch of applications out there which feel amazing just by rendering 60 frames per second. So Apache Cordova is still kind of the same. There's not that much that improved. At the same time, the JavaScript web application technology improved dramatically. So if you just use the new technology and use it inside Apache Cordova, things are kind of amazing.
29:40
And the way we integrated that is by we now powering Angular directly. I don't know if you guys are following Angular development, but Microsoft is now partnering with Google to build Angular 2. We are injecting something called TypeScript for trying to improve some typing there. And we also have full support for React. We're very close with the React team. And I'm actually, I'm the one working very closely with the Ember team if you
30:02
come from the Ruby on Rails crew. So I brought some examples. The main reason you would wanna use Cordova is usually for maintenance reasons. So if you have an application where really seconds don't count, those are the ones that usually go with Cordova because there are a bunch of reasons that speak for it.
30:21
One is virtually every single developer roughly knows how to speak JavaScript. If they don't, it doesn't take a year. And the other reason is that it's extremely maintainable. Updating it is a breeze. Deploying is a breeze. You can hot fix in like basically minutes. Those applications already have been out for a while, especially the BBC one. Salesforce is actually building on Cordova right now
30:41
this very moment. So Salesforce is entirely moving their whole thing over to Apache Cordova, which for them honestly makes a ton of sense, right? If you have your typical Salesforce CRM, nobody ever demanded that a CRM is written natively and it would also not make any sense anyway. So for those types of applications, Cordova is pretty amazing these days.
31:02
So let's talk about what we have done. Again, I already spoke about the things that we have done for Cordova itself. At the same time, the main thing we could do is improve interop, right? Give you one IDE that can deploy directly to a Windows emulator, to an Android emulator, to Ripple, to an iOS emulator.
31:21
You can debug your application in every single emulator that is out there. And the other thing we could dramatically improve is just make sure that you interop with the more modern web frameworks works well. So we now have direct support for Angular, we have direct support for Bootstrap, React, pretty much you name it, it's all in there. And then the very last piece is that we have some pretty UIs around some of the more
31:40
arcane configuration options inside Apache Cordova. And that, again, is one of the things I want to show you guys. So we can just open one of those up.
32:24
Compared to the C++ solution and the Xamarin solution, Cordova applications look extremely friendly. They don't even have that many files to begin with. But if you check out that config XML, what you might notice right away is that we have this pretty thing right here, which allows you to configure things
32:41
without going too deep into it. And we also have this very convenient way of installing plugins. We have full support for most of the plugins. We actually worked on, I think, 39 out of the 40 default plugins, so they all kind of have the Microsoft seal, in case you care about that. And it's just, you know, quite frankly, just a bit more convenient.
33:01
That is stuff that used to be pretty hard, it's now no longer hard. At the same time, we have full interop with the actual Cordova command line. So everything we're doing, again, we're not doing our own thing, it's just the default way. And we abstracted a tiny bit away, but in the backend, all the things that are happening are the default things that should be happening. And again, just a tiny bit of developer ease, right?
33:25
So if you check out this, we have full support for IntelliSense in Angular, Angular 2. You can build TypeScript applications if you want to do something more serious.
33:41
You can use React, all those things. Okay, I think I only have a few seconds left, so let me talk about the very last piece, which would be Project Historia. So many of you have probably heard of Project Historia,
34:01
it's something that we're working on. In case you haven't heard about it, the idea is that we take your Java code and run it on Windows. And I talked to way too many people so far that were like, oh, that sounds great, I'm just gonna wait for that. In case you have any inclination of working with any of the platforms that we want to work with,
34:22
our case, that is usually HoloLens, which is the cool new thing, or the Surface Hub, which is a big screen or anything else. The first thing I want to say is that Project Historia will only be available for phones and tablets. Doing something like that is extremely difficult, extremely hard, it demands a gigantic amount of engineering brain power, and the whole thing is still heavily in flux.
34:43
We're not entirely sure how far we're gonna get, so please do not rely on Project Historia. It's not gonna be the answer if you want to build an application for any of the devices that are not the phone. So if you look at this whole screen, Project Historia kind of ends here. Like right here, right behind the screen, okay?
35:04
And the other thing is it is not done yet. We can't really say that many things about it because it's just not done. Which is the very bottom line. I met with a team about two weeks ago, and the things I'm gonna tell you are the same things we've been talking about for a while.
35:22
If you think that you have an application that is a great candidate for something like this, you know, something like a bridge where we try to parse your Java code live and spit out a Windows app, please do get in touch because we are interested in other developers that are interested in this bridge. However, under no circumstances, ever, can we recommend that if you want to build for Windows 10, for any of these devices,
35:42
be it HoloLens or anything else, that you should wait for Project Historia. One thing I didn't talk about today at all is cross-platform for the Windows world. As far as the Windows world is concerned, you build one binary, just one application for all of these devices, including HoloLens, including the big screen, including the phone. So it's fairly easy,
36:00
especially for people that already know Java. So again, reiterating, please, do not wait for Project Historia because we will probably disappoint you, and we don't want to do that, right? So the reason it's called a project and the reason it's called experimental is really because it's pretty experimental. So that would be the whole thing on Project Historia. You may have noticed that we didn't really have time
36:21
to go deep on anything today, really anything. If you go downstairs to the exhibition area and if you go outside, you will see this giant purple truck. It kind of looks like my presentation, it's very purple with a bunch of Visual Studio signs on it. I'm gonna be hanging out there for pretty much the next two days,
36:40
but also we decided that if any of you want to see more, please come and talk to me on Friday 11 a.m. We're gonna, I think, hook up my computer to the screens or something like that. So please do come by. If you want any other reason to come by, we're also giving away Surface Pro 3 to anybody who takes a picture with that dude. He's not here in person, but we have the cut out.
37:02
If you take a picture with him, you can win a Surface Pro 3. Yes, I'm probably over time. No, you're perfect. Thank you, Felix. Thank you.