Rencore TechTalks: Episode 2 – A chat about cross-platform development in the Enterprise with Sahil Malik

17 min read
17 min read

In this episode, I’m catching up with Sahil Malik on the topic of cross-platform development. We had a nice chat about Sahil’s experiences and comments on cross-platform development, and why it matters.

[Recorded: 2016-12-08]

Listen to this show to learn more about things like:

  • Definition / What is cross-platform development?
  • How do organizations embrace cross-platform development?
  • Any strong pros/cons
  • Is it important for mobile apps these days?
  • And more

Guest: Sahil Malik

Sahil Malik on cross-platform development

Sahil Malik, the founder, and principal of has been a Microsoft MVP for the past 10+ years, author and reviewer of many books and numerous articles in leading technology journals.

As a consultant and trainer with experience in 5 continents and 18 countries, Sahil brings an immense amount of experience making the most complex topics extremely easy to understand. You can follow him on twitter at @sahilmalik.

Show notes:

Full transcript

[Tobias] = Tobias Zimmergren
[Sahil] = Sahil Malik

[Tobias]: We’re here again in a new episode of the Tech Talks and today I have with me Sahil Malik, welcome!

[Sahil]: Hello.

[Tobias]: Today we are going to talk a bit about cross-platform development in the enterprise, and as I understand it you’re a bit experienced with this. So, would you mind telling the audience just slightly about your background, and what you’ve done, and where you come from, and what you do today?

[Sahil]: Sure. So, I’m a developer and in college I was in the Linux / Unix land and then I started diving into the Microsoft land, worked in the Microsoft land for quite a while and then I headed over to SharePoint. Around when Windows 8 was released, I just couldn’t deal with Windows 8 anymore. When they introduced the start button. So that’s when I bought a Mac and I was like, ” Well I bought this overpriced machine let’s put it to good use.” And I started seriously looking into cross-platform dev. And luckily Microsoft embraced cross-platform dev after that and now that I’m coming back to Windows as my primary driver machine, but I’m going to keep a Mac, and this is what I’m doing these days. And of course coming from a SharePoint Office 365 background I’m still deeply involved in that. But when you write something for SharePoint and Office 365 today, you’re just consuming services for the most part, and it really doesn’t matter what your dev platform is like. Every developer is an Office 365 developer now.

[Tobias]: Right, exactly. So that kind of leads me to one of the first questions I have about this topic. It’s what is cross-platform development for people who maybe have been stuck in Windows for a long time or for a specific platform? What does it mean to be a cross-platform developer and what kind of applications does that mean that you’re building? What’s the difference between traditional development for Windows for example and being a cross-platform developer?

[Sahil]: Sure. So a cross-platform developer means you’re writing for the web and you’re writing for Android and you’re writing for IOS. You’re writing for Windows Phone, if that ever takes off. And you’re writing Windows desktop apps, and Mac desktop apps, and if needed Linux desktop apps.

[Tobias]: So kind of run anywhere applications?

Sahil: Pretty much, and it also depends on picking the right tool for the right job. So sometimes you’re writing Objective-C, next day you are writing SWIFT, and then you’re diving into Java, then you’re picking things like Cordova, Electron, Xamarin or just playing with a little C#.

[Tobias]: Okay so. When you do this kind of development, myself I’ve been coming from a very heavy Windows-based background, what do I need to do or rethink when it comes to tooling? So are there specific tools or frameworks that you use, or can anyone who has done Windows dev just become a cross-platform developer developing for any device. What kind of thresholds or challenges are there for a developer looking into doing that kind of work with for example Visual Studio?

[Sahil]: Sure, so one interesting thing is space is changing very, very rapidly because Microsoft has entered this space and they’re making some massive changes. So let’s say that you want to target Android, then you would typically use Android Studio, or if your target is IOS or Mac you would use X-Code, but there are so many other options other than those two. So, typically if people would say if I want to write an ISO app I need to use X-Code and a Mac. You need to use a Mac that is true, but what they’re doing is there are other options, there is Cordova and there is Xamarin. And Visual Studio you have it available on Windows but you need a Mac on the network, or now they have Visual Studio for Mac which is Xamarin plus .NET Core plus a few things like that. Those are the tools of trade that you would typically be using, so on a daily basis I’m often VS core typing and some angular 2, Typescript or dive into Objective-C, see if need be depending upon the nature of the project or dive into Xamarin or then all tab get into Windows VM and write up some C# to write some Web API that we’re calling authenticating with ADFS. It is extremely interesting.

[Tobias]: Yeah. So that kind of leads me to what’s the difference between building a cross-platform app for a native, like for IOS or for Android directly, or the hybrid HTML find kind of explat apps like Cordova or Phone Gap something like that? What differs those two models or concepts?

[Sahil]: Well let me preface the answer saying there seems to be an impression there’s a battle going on between whether Cordova is better or Xamarin is better. But the reality is I think the right way to right mobile apps is a mix and match of both.

The right developers pick the right tool for the right job. And whenever I actually have a Pluralsight course coming up on Cordova when I talk about this extensively, picking the right tool for the right job. So the first easiest approach is to write a website, but when you write a website then everything sucks on it, so the UX sucks, and you can do geo-location, but not very well, you can do camera, but not really well etc. So then the first step you take is let’s try Cordova, because these are my skills. I know HTML, I know JavaScript. Let’s type it into Cordova. So classically people say that Cordova the performance sucks, but I think Cordova performance can actually be pretty good. Where Cordova performance can suck especially, is when you go over the JavaScript to native boundary. So when you start using a plugin and you start marshaling a string a hundred thousand times, in a loop, that’s going to be bad.

And some operation like that can take 60 seconds, but Cordova has a huge advantage that you can create the user interface very easily and a good-looking user interface. So then you say, “Well okay let’s dive into native, you know like our native binary that runs on the individual platform and then you have two choices. You can either go the Xamarin route, or you can go native-native as in well you know Xamarin is native first of all but by native-native I mean something that the vendor supplies. Like Apple will insist that you write stuff in Objective or SWIFT.

And there are pros and cons there too. So when you use classic Xamarin then it’s almost as good as writing native-native. It’s writing things in Objective-C, and writing things in classic Xamarin the performance difference is very, very little. Of course the native-native wins. The performance is so little that it really doesn’t matter, but the biggest advantage there is that you are writing C# for every platform, and that’s a big deal.

[Tobias]: Yeah that enables a lot more people to actually embrace it, doesn’t it?

[Sahil]: Absolutely and frankly if you’re a Microsoft developer, you’re going to feel more at home in Visual Studio for Mac than in X-Code.

So that’s also there, but then there is also Xamarin forms, and I feel as if Xamarin forms either makes you very productive, but it’s at the cost of producing an extremely large binary and having a performance impact. You know the more abstraction layers you have the more price you pay.

So you really have to pick the right tool for the right job. Perhaps you don’t need that level of performance in your app, and perhaps you care about the one code base that runs everywhere, and you want to use a combination of HTML Typescript angular and a Xamarin for your native code, and that’s a pretty good combination. And that’s what I end up doing a lot.

[Tobias]: Right, yeah. That actually sounds like a good plan to use the tools and the techniques that you are familiar with to build something, and if there would be a requirement from the project organization to do something out of that scope then, of course, that’s maybe something you’ll have to dig into. But like using Xamarin in studio or using Visual Studio for the Mac like you mentioned is probably an easier step for people with a C# background like myself to start doing those kinds of applications as well.

[Sahil]: Yeah. I did but did you know Xamarin is also like an entry-level drug? Because when you’re writing targeting IOS in Xamarin, if you’re writing C#, but it feels like you are writing Objective-C, as in Objective-C the language sucks, but you still have to know all the concepts, you have to know the framework, and you have to know concepts like Hey is a bundle ID, this is what key chain access means, this is what registering an URL means or the P-list file. So you do have to understand those concepts, but once you’ve mastered those concepts then the only thing left to learn at that point is the language which is SWIFT or Objective-C, and then you dive into X-Code and feel completely at home.

[Tobias]: Okay. Cool. So what does that really mean for an organization if they usually standardize their development and why would they be interested in going to some kind of cross-platform development today if for exactly everyone in the org is running Windows 10 and have a BlackBerry? Is there still a reason for them to look into that or it depends on the question?

Sahil: Well, even if you are a hundred percent window shop I think it makes sense to look at technologies that are JavaScript. Especially TypeScript and Angular2. Angular2 from a performance point of view is just absolutely amazing. You can create a starter app as small as a 25 kilobyte download, so that is amazing.

[Tobias]: Sweet.

[Sahil]: Yeah. And TypeScript allows you to scale, so why you should look into these is because even in a hundred percent Window Shop it is not feasible to deliver Windows applications, take applications and run them reliably across your entire organization. But when you deliver something from the browser it’s very compelling. Other than that if you’re a hundred percent Windows or a Blackberry shop then just stick with what you have. If you don’t have a need for targeting IOS there’s no need to do it. But you know we are developers and you know one of the things that I really like about cross-platform dev is it allows me as an individual to reach my potential market. Like you could write an app, put it on the App Store and be an overnight millionaire, you know, you could do that.

[Tobias]: Right, there’s a lot of potential.

[Sahil]: It’s not just about money. I just wanted to write something cool and just put it on my phone and show it to you rather than set up a server, boot my laptop, it’s a different world and I think it’s a lot more exciting.

[Tobias]: Yep. So like coming from the enterprise kind of perspective how do you see how organizations embrace cross-platform developments? Are they more open today, because I know a couple of years back being a consultant discussing mobile project it was a big No-No, and there was really no sense or using doing it, but seeing as everything is mobile-first today most big platforms and services and software we use have a mobile-friendly user interface out of the box. So, how do people kind of embrace that in their organizations as developers? Is it a core requirement to see that or when you talk to your customers do they say, “Hey, look whatever we build it needs to be mobile-enabled or mobile-friendly?”

[Sahil]: You know if you look at the IOS App store the top hundred apps: 90% of them are games! So you know there’s a tremendous amount of untapped potential for enterprisey business apps on the mobile platform and people aren’t done this year. But at the same time companies are providing everybody with an iPhone or an Android device. All the employees have it and there is a lot of value in being able to pull out your phone and accessing the information you need. Imagine somebody who needs to approve an invoice. If you can do that on your phone, imagine the level of efficiency you have. Or an organization that really cares about document secrecy and your typical Windows or Mac or Linux desktop operating systems are just not locked down enough to guarantee that you can push a document and erase a document when you need. But these newer platforms that are quite locked down enable those scenarios.

And I just feel that organizations that are paying for these supercomputers that are sitting in our pockets and are not making full use of these are making a big mistake. So I think it’s not going to replace work on desktops, but I think it opens a completely new avenue, only limited by our imagination right now. And there are organizations that see that, and they are taking advantage of that. Like I have heard that interesting story where people used in a pilot these huge flight manuals in their cockpits and they replace that with an iPad, just the weight savings alone paid for that project and fuel costs.

[Tobias]: Yeah that makes a lot of sense as long as the battery will last, right?

Sahil: Well the battery will last, I mean there’s a power source in the plane so that’s probably not an issue unless the plane burns down.

[Tobias]: Yeah, of course. But I see that as a shift I’ve seen with a lot of things and like you mentioned before there is a lot of games dominating the App Store, but things that I am as a consumer, not speaking from the enterprise dev kind of perspective, but as a consumer I see things like Uber for example. Enabling anyone anywhere to very quickly, without instant payment, just jump in a car, jump out of a car, get a taxi, wherever you are, they will find you, pick you up and you’re done. And that’s all in the mobile. You don’t have to pay with a credit card, or cash, or anything that’s just taking care of for you. So, for me, that’s a perfect example.

[Sahil]: Or even in the enterprise you would imagine somebody on the floor of a shop or factory, they’re not going to walk around with a laptop. If they want to do a survey, make an incident report, they’re not going to hold your laptop and have a client take the picture with the webcam and laptop, it’s just a whole lot easier to pull out your phone that has an internet connection. It will geotag the picture so you know exactly when it happened, where it happened, and these cameras on these phones are very powerful. Or like a traveling executive who wants to create an expense report and he gets a receipt. How many times have we lost receipts? But imagine that you take a picture of a receipt, connects it with your credit card account and just for currency and submits your expense report.

[Tobias]: Yeah and you’re done.

[Sahil]: And you’re done. It’s about efficiency and I think companies that are not taking advantage of the immense power that mobile devices introduce are totally missing out.

[Tobias]: Yeah, I guess that makes a lot of sense. And I’ve been seeing more and more business apps showing up as well. Like you mention if you’re a factory worker or whatever it is, if you are a traveling sales guy and you are doing your reports. I’ve seen apps like the expense kind of report you mentioned as well that actually work pretty well. I used that myself when I was running my consultancy. There was a lot of trips, and there was a lot of travels, and there were 5-10 receipts every single day and it was a hassle keeping track of those.

[Sahil]: And you would lose some of them.

[Tobias]: Yeah. And I did that a couple times, but that kind of tipped over when those apps got introduced. Just like you said you take a picture, it’s validated, it says okay everything is safe, you can throw away the paper.

[Sahil]: Absolutely

[Tobias]: That is such an enabler, and I agree with you there. If people or companies are not looking into what they can do with their mobile for the people in their organization, they might actually be missing out on a couple of things.

[Sahil]: Yeah. And you know when we think of SharePoint background we think information work helping you make the right decision and we think of a person looking at reports on a screen, but remember that 90% of the economy is not somebody sitting on a desk looking at reports on the screen. Or who are those people that when you create a team site on SharePoint and they look so happy and they are talking with each other everybody is wearing a tie. But that’s not where 90% of the economy is. 90% of the economy is people working on the streets, people working on a shop floor. Imagine if they had – and they are not going to carry a laptop. Imagine if we enable them to carry a computer and enable the power of computers in their hands. That’s really what a mobile dev is.

[Tobias]: And all the efficiency it introduces as well, right? You can skip so many steps in the process by just enabling people to do things quickly.

[Sahil]: The way I see this, is you know, the companies are being competitive with each other. The only way to do this is to innovate and you try to be more efficient than your peers. And one way to do that is work longer hours and outsource and there’s a limit to that. But the other way is just get more out of the people that you already have by giving them the right tools. I mean that’s really how I see it. So I think companies that are not looking at are missing out. In fairness, a lot of companies are looking at it.

[Tobias]: Yeah. So in general related to that do you see any strong pros and cons for cross-platform development? Maybe mostly the cons because the pros like we just discussed there’s quite a few of those. But is there anything that might make you not look into mobile dev or is there some kind of con on cross-platform dev or any reasons why someone would be hesitant to look into it?

[Sahil]: Well, I mean the biggest con perhaps is that these platforms are so different from what we were used to. Especially coming from a Microsoft World. I was happy writing WSPs. Well, not really happy, but you know what I mean.

[Tobias]: You did it.

Sahil: Yeah, we did it, but we were isolated in that world. And I think, if you did only WSPs, it was very easy to just try WSPs and be fooled into thinking that you retired writing WSPs. That’s not going to happen. And similarly, I think if you’re sitting in a comfortable spot where you are a poor Windows developer as in “I do .NET and that’s all I do” I think you are fooling yourself. When the company that made .NET has moved out of just Windows and they have embraced cross-platform dev themselves so aggressively, I think you should do it too as a developer.

[Tobias]: That makes sense. I mean since you’re a Pluralsight author and you have a couple of trainings there, you have done a tremendous amount of trainings and workshops. Related to that what’s the most asked questions that you get from people trying to learn these new technologies for the modern cross-platform landscape if you will?

[Sahil]: I think the biggest challenge is the bewildering array of choices. So within the Microsoft world and if you think of how many ways are there to connect to a database? Well, there is .NET, there is Entity Frameworks, but four or five ways and you’re done. But I think when you talk about cross-platform devs, you want to target IOS, there are five different ways of doing that. Maybe a bit more. And none of them are right. It just depends on your app and you really have to know them and the landscape is changing constantly. You know, things are updating every month literally and my dev environment has the stability of a carnation marriage. Every time I start MPM, install it, there pops up a wall that looks like the side effects of the drugs you’ve been taking.

This will make you impotent and this will kill you, and your children, and so on and so forth, and this will make you radioactive, and these whatever. So you start and the application works. It’s just a bewildering array of choices and I think the answer to that changes every month because new things keep coming.

[Tobias]: Yeah. So, to round that up then what advice would you give to any individual or organization looking into building cross-platforms, if they haven’t done that before. What’s your top advice for anyone looking into starting? Where do they start? What do you start to look into?

[Sahil]: For developers, I would say: “Do it!”. You owe it to yourself to learn all these new things, because if you don’t, you are missing out. Coming from a SharePoint World, just writing WSPs you’re doing yourself a disservice, if you don’t keep up with all the other changes. And for businesses I would say just observe the things you do every single day and see where you would benefit, if you had a mobile device with you on which you can access your business functionalities security.

[Tobias]: Yeah. Alright yeah. That makes a lot of sense. So is there anything else you would like to share with people regarding cross-platform dev in general? Or I know you have some Pluralsight courses coming up or maybe they’re already out, anything like that you’d like the listeners to be aware of?

[Sahil]: I look for the learning from everyone, because – to be honest – there is just too much to keep up with. I have a cross-platform dev workshop coming up in London. I forgot the date but I think it’s the second week of January. So that should be interesting. I see, you know like I tweet, I am on Facebook and other than the jokes part I apologize for that in advance, but we do a lot of technical discussions that we have as well I hope, and I’m looking forward to learning from you. So please interact, if you tried something cool, please share it! See me on a tweet I’d love to look at what you’ve done or see what you’re learning and hopefully we can learn from each other.

[Tobias]: And for anyone listening, we will put all the contact details and twitter handles and whatever in the show notes as well. So you’ll find it there.

[Sahil]: Cool, thanks.

[Tobias]: Alright thank you, thank you Sahil. This was awesome. I hope you want to come back and do another show some time as well.

[Sahil]: Yeah I’d love to. The most recent thing I’ve been fighting with is I was looking at authenticating open ID connect back with ADFS 4 on IOS and Android using a brokered Authentication, so basically like, you know there’s a concept of key-chain access on IOS, and there’s an App called Microsoft Authenticator. So you are leveraging Microsoft Authenticator to authenticate you via Delve in iOS, so we can dive into maybe the various authentication challenges, or the various protocols, why certain protocols are a good fit, not good fit. If you are interested, we can talk more about that.

[Tobias]: Yeah that sounds like an entirely different show we can do as well. Cool! So thank you very much.

[Sahil]: Thank you. Thank you for having me. Bye.






Subscribe to our newsletter