79. Salesforce Mobile Development | Gaurav Kheterpal


Salesforce Mobile Development

Gaurav Kheterpal, who joins to talk about Salesforce Mobile Development, is the CTO at MTX Group, Salesforce MVP, 31x Salesforce & Google Certified Enterprise Architect, Pluralsight Author, and Einstein Champion.


Sponsors

FormAssembly

This episode is sponsored by FormAssembly.

22 Ways to Use FormAssembly for Remote Work Success – Learn how to streamline remote work processes with FormAssembly’s all-in-one form builder and data collection platform


Main points

  • What are the various mobile development methodologies in Salesforce?
  • What are the trade-offs of each mobile development approach?
  • When should I use or not use Salesforce1 mobile app?
  • What are some of the key things to keep in mind while building a Salesforce mobile app?
  • What does Salesforce Mobile SDK contain?
  • How can one start learning Salesforce mobile development?

Links


Video Teaser

The YouTube Video URL


Contact Me

If you enjoy this podcast, please reach me out to let me know your thoughts or simply say Hello. My (Xi’s) contact info:

Take care, until next time :)!

Transcript

AI-generated, unedited.

[00:00] I'd like to welcome our sponsor Form Assembly. You can find out how Form Assembly helps streamline remote work processes in the free ebook that we've linked in today's show notes. Form Assembly's all-in-one web form platform lets you create forms for just about any use case. From contact forms to donation forms, all while take advantage of useful features such as notifications, e-signatures, and more. Not only that, but you can also connect data to systems you already use. Forma simply integrates with Salesforce, Podio, PayPal, and many other common solutions. Whatever your data collection needs are, you can be sure that Form Assembly keeps your data secure with encryption at rest and in transit on all plans. Plus compliance with GDPR, CCPA, and more regulations. At the end of the day, form simply helps you save time, money, and effort while getting the maximum benefit out of the data you collect. And I remind you, when you support our sponsors, you support the show.

[01:24] Hey everybody! Today is the new episode of Salesforce Way podcast. I'm sitting with Gaurav Kheterpal. Hello, Gaurav. Hi Z, how are you? I'm doing great. I'm doing great. Really thrilled to see your face again. You know, after more than a year already. The TDX sessions. How about you? How's life? Yeah, it's been a while since we met, and obviously the world has completely changed since we met. So it's good to see you. Yeah, time flies definitely. So, Gaurav, would you like to quickly introduce yourself? Sure. So, my name is Gaurav Kheterpal. I've been in the Salesforce ecosystem since 2007, or as my wife calls it, I have been married to Salesforce since 2007 because I give more time to Salesforce than I give to my wife. I work as CTO at MTX. It's a Salesforce and MuleSoft consulting partner, and then being around as Added some advantages. I've done a number of certifications. I became a Salesforce MVP in 2016. Einstein is one of my areas of passion. I was very fortunate that Salesforce made me an Einstein champion. Yeah, and I'm really excited and passionate about the platform and all the new developments that are happening on it. Yeah, I saw your Twitter message recently. You really had to get more certificates. Yeah, so I think this lockdown has enabled me to to do some stuff which I could not do earlier because being in office, I was. Being pulled in multiple directions and a lot of administrative work, lot of other things. But now being at

[02:54] home in my home office, I can spend a lot of time reading and preparing for exams. And then I don't have to commute much. I've not really stepped out of my house much in the last four months. So I use all that time to prepare for the exams and give exams. That's excellent. So today, Gaurav, we have you here to share a bit about Salesforce mobile development. So I have been in Salesforce for a while, but I rarely really touch the mobile development features. So I think there must be a lot of listeners just like me. So we do a lot of browser-based development. But not mobile, so it's good to have you on, you know, to get my knowledge refreshed. Yeah, I think there is a not a lot of awareness or education in terms of Salesforce mobile development because for a lot of people, Salesforce mobile development means using Salesforce One, which is the Salesforce application, and just exposing their pages or their functionality through Salesforce One. But there is a whole world beyond that, which People don't realize. So you can build your own native apps. You can build your own custom apps, and there is a ton of functionality that you can do, which you cannot do with Salesforce One. The Salesforce one is the I think they rebranded or changed the name, right? What what's that? I think it's now with the Customer 360 announcement. I think they are changing it again. But Salesforce pretty much changes the name every once in a while. I

[04:24] remember when it was introduced, it was called Salesforce Mobile App. Then at some point of time, it was Lightning One Platform, and then it became Salesforce One. I'll even have to check what the latest name is. Yeah, because I know that my company is using it, so we have a production work to manage all the employees or our related staff. And we just download it from the App Store. If you are using Android, then it's the Play Store. So it's like a download and then play. That's. Really smooth. Yeah, the good thing is they've added a lot of features. I mean, I remember being amongst the first few users of the beta application several years back when they had not even introduced it publicly, and it has come a long way. I mean, the kind of features it has now versus what it was few years back, I think there is there is no comparison. It's a completely different application in Salesforce. How many different ways? When we talk about mobile development, yeah. So I'm glad you asked that because I think a lot of people don't understand that there there is more to Salesforce mobile development than Salesforce one. So Salesforce has something called Salesforce Mobile SDK, which is actually an open source project on GitHub. So if you search for Salesforce Mobile SDK, it will actually take you to a GitHub repository, and there's one for Android and there's one for iOS. Those SDKs you can actually build either a hybrid app or a native app. So, what's the difference with native? It is essentially you

[05:54] are building the app natively on that platform. So, if you are building it for iOS, which is for iPhone and iPad. You build it using Xcode, and you build it using Swift. Or in the earlier days, you are you used to build it using Objective C. Similarly, if you are building an Android app, you build it using Java, Android Studio, and you can also build it using Kotlin now. Hybrid app, it's a little bit different in the sense that you actually build it using technologies like web technologies, HTML, JavaScript, CSS, and then you use something like Cordova under the hood to package it as a IPA or an APK so that it can be installed on an Android phone and on an iOS device. There are a lot of differences in terms of how a hybrid app differs from a native app. Primarily, it's the user experience, the the ways in which you can access hardware in a native app versus what all you can do in a hybrid app. So there are some subtle differences. So depending on the use case that your client has, and depending on Which platforms you need to support? To there is like a decision matrix that you can follow, whether you should build it natively or hybrid. And then obviously the third option is you build something like Lightning Web Components, like LWC pages, and then you expose them in Salesforce One. Ah, you just mentioned the mobile SDK. That's open source project, and there are multiple options you mentioned inside that. Because definitely we have two major mobile platform: the the Android and iOS. So both

[07:24] of these two platforms are supported. In addition to that, you also mentioned there's native app development and hybrid app development. So it's kind of like two, like four options combined. Correct. Yeah. So native iOS, hybrid iOS, native Android, hybrid Android. Those are the four options with the SDK. And they are all inside this mobile SDK. That's correct. That's correct. Yes, and the third option you mentioned is we can expose the Lightning Web Components. Into is it? Do you mean create a new solution app, or do you mean to somehow embed it into the Salesforce One? Yeah, so you can just embed your pages into the Salesforce One mobile app. So earlier, when Visual Force was around, you could do that with Visual Force as well. So when you build a Visual Force page, you can actually mark it as available in Salesforce One. And it was your responsibility. And then I think they also had a check mark, which kind of said said that expose this page in Salesforce mobile environment. If you did that, took care of some responsiveness. But again, as a developer, you needed to make certain changes. Now that Visualforce is kind of not used any longer, and LWC by default it supports responsiveness because of SLDS. You, it's much easier to expose your pages in in Salesforce One, and that's the most common way people do it. Because if you use the mobile SDK, then you are also responsible for distributing

[08:55] the app to users. It's not the Salesforce One app that they will download from App Store or Play Store. It is your own custom application. But if you want to avoid that hassle, if you just want people should be able to use Salesforce One app, then you would expose your pages in the Salesforce One application rather than build a custom application. Yeah, because in the past I have done some iOS hybrid solution development and release. It was a hassle. It's a long process. You need to, like, not only the development, you do need to release it. You have to get the security checked. You need to get all the updates all the time. So that's a lot of things to really consider. Yeah, and with Apple, it's it's a lot more harder because their app security review process is is very strict. In fact, I remember when we started off. I mean. We were very fortunate that none of our apps got rejected ever, but our clients and I would used to see the questions in partner forums and on Stack Exchange that Apple rejected my app for this reason or that reason. So it's much easier now, but it's still a hassle, and then there is a wait time as well because they they have all I mean a lot of apps that are waiting to be reviewed. So you get into a queue, and then once once your number comes, they they have a set number of metrics against which they evaluate your app, and if any of them fails, then your app is rejected. So, if I'm a Salesforce customer, I want to have

[10:25] certain mobile features, and you just mentioned all these different ways. But as a like a newcomer, how do I make the decision? Is there any like a guiding steps for us? Yeah, so it comes down to a few things. So, for example, how much of offline capabilities do you want? In your application, so if you want that the user should be pretty much able to do everything offline and then be able to sync data back to Salesforce when their internet connection is available, then probably it's best to go custom, build something custom using the mobile SDK. If you want a lot of hardware interaction, camera, accelerometer, GPS, again, those are things that are better handled in the mobile SDK with custom apps because as a developer, you have full control. Over what the app can do and what it cannot do. If it's just a a data processing application with some offline capabilities, with some customization in terms of look and feel, then Salesforce One is is probably a good idea because. It's very fast. You just need to put in your pages, and then you need to customize the application. So you don't need to go through the approval process. So it really comes down to the use cases. And then I'm personally very excited about the Salesforce Anywhere application. I think it's very new. It's just come out this week, and I've just started playing around with it. So I think that will kind of change overall in terms of how customers look at Salesforce mobile. What is this Anywhere? Yeah. So if you saw the announcements at Trailhead DX. They have a lot

[11:55] of new features. They, I think, the most exciting feature is that, again, as the pitch itself says, you can pretty much use it from anywhere. So there are some offline capabilities. There is actually a chat feature. So if you want to chat with some of your contacts, there is that chat feature. You can chat with other users as well. I'm still figuring it out, but overall, it seems to be a very exciting new development. So is it like a totally new third option? Or is it? It's a third option. Yeah, if you go to the iOS App Store, you'll actually find an app called Salesforce Anywhere. At this point of time, I don't know if Salesforce will just deprecate the old application and just continue with the Salesforce Anywhere app. So I think too early to say, but I have it on my phone and I've just started playing around with it. So I'm really excited on in terms. I see, so it's still under the forward-looking statements, right? It's not released yet. I think everything within Salesforce is under forward-looking statement, but. Yeah, I think it will be interesting on how they evolve this application to to kind of cover some of the use cases. Because I mean, in my experience, I think it has come down to mostly offline and. A lot of customers have asked for what they call as an offline first experience, which is basically I don't care if the user is online or not. I just want that they should be able to do anything and everything that they do online. And once they have internet connectivity, the app should be able to trigger these operations back into

[13:25] Salesforce. It's not easy, but again, they have kind of. Facilitated that for the mobile SDK, they provided two frameworks called Smart Store and Smart Sync. Which is basically if the user is offline, everything gets stored in a NoSQL database, which is encrypted. And Smart Sync actually detects when the when the internet connectivity is available and pushes everything back to Salesforce once the user is online. So in that sense, I think they've enabled developers to to build those applications. But Salesforce One by itself had limited offline capabilities. Like if you had visited a record earlier. You could basically visit it offline again, but it was not a full what we call as a offline CRUD experience. So you cannot do all the operations offline. There was only a subset of operations that you could do offline. So the Salesforce One because if you are building customization on top of Salesforce One app, it comes in with all the supported offline features, but that's it, right? You cannot go beyond that because you're building on top of it. But if you are using the mobile SDK, it has the full set of the features offered from the mobile SDK. You just mentioned the smart store or something smart sync and smart sync, yeah. So kind of easy to understand conceptually is that the the data is just stored in your mobile in a local database, and it makes you feel like the mobile is still connecting with the Salesforce, right? You can get the data

[14:55] from the local database, you can save the data. Without the network, and when the network comes back to your mobile, then the data start to sync automatically for you. That's the idea. Yes, yeah, I do want to point out one thing with Salesforce. One is you get a massive advantage in that sense that you only expose. The features that you wanted to build, everything else is kind of ready-made. So all those compact layouts that Salesforce provides by default. So all these standard objects you have like accounts, opportunities, leads. You have all the page layouts that are the custom. The compact layouts that are already built in. So a lot of functionality is built into the Salesforce One app. So in a lot of cases, the customer only wants. I would say 10% customization and everything else is kind of present in Salesforce One. In those scenarios, it's it's always a good idea to kind of build something within LWC framework and then expose it on Salesforce One. Because if you do it natively or hybrid using the the mobile SDK, then you have to pretty much build all the functionality which is also present in Salesforce One. So you are reinventing the wheel in that sense that there are functionalities which are available in Salesforce One, but you are building them custom. So. So there is not a smooth kind of point in between. So you have to make a decision either side, right? Either get some features from the Salesforce One feature, the mobile features, or you go. From scratch with the mobile SDK, I'll give you an example.

[16:26] So, in most common scenarios, if the customer wants to release the app for both iOS and Android, there is a very little chance that they will actually build the app natively on both iOS and Android because. It's twice the development effort. You you will need an iOS developer to build it for iPhone, and then you need an Android developer to build it for Android. They will either go hybrid because in hybrid, what you are actually doing is you are writing HTML, JavaScript, CSS code, packaging it using Cordova, and then you are just packaging it for the right format. So for Android, it's the APK, and for the iOS, it is the IPA. And then you are using the plugins. So, for example, if I want to access the camera, Cordova has a camera plugin that I will use. So, in that sense, as a developer, I am just writing my code once in JavaScript, but it's being packaged for iOS. And it's being packaged for Android, so in that sense, the effort is not doubled like it's in native. Similarly, for LWC as well, the Salesforce one approach. You're essentially writing LWC components and pages. So at the end of the day, it's being bundled into Salesforce One app, which can run on iOS or on Android. So in that sense, if you have a multi-platform strategy, then native is usually not not the best or the most cost-effective solution. I would say. Yeah, totally understand. In other industries as well, if you want to release a mobile app in both iOS and the Android. Definitely, you need to maintain two teams, right? It's a huge effort. Actually, they're totally different, separated teams. Totally different technology stack. And

[17:56] you also mentioned the hybrid. So I understand the reason to go with the hybrid is that you don't need to maintain two things because of. You are using the browser technology. It's a single code base as well, which is very important because again you you are not maintaining a separate iOS project, a separate Android project. It's just a single code base, and you have one team to maintain it. Then that doesn't mean all the customers would go with hybrid. Why do they go with the native? No, so it really depends. So, for example, if I talk about specific geographies, so again, if you are an enterprise customer and if you are building something for your own team, for your own sales folks. And you have a device policy, which is basically the company gives out iOS devices or iPhones to all the employees. Then you are likely not too much worried about building an Android application. You just want a superior experience on iPhone. In that sense, or if you have some custom requirements in the sense that the app needs to be able to do some complex image processing using the camera, and those are not available as part of. Hybrid frameworks are not available as part of Salesforce One. So, for example, I want something like measurements using pictures, and that is something which can typically be done only in native iOS applications. Again, another example is I want to do something with location, so or with accelerometer. I want to determine. I mean, how? So my sales folks are basically going to meet a customer, and

[19:26] I want to be able to track them at any point of time. Cases, use cases similar to FSL, but somewhat different. And I want full control over their, not just their location, but on their applications as well. So that is something that you cannot actually do in in a hybrid application or a Salesforce one. So that's why you might need to go native in that case. So it really comes down to specific use cases, and if you are building single platform strategy with no futuristic plans of moving to a multi-platform strategy, then it's definitely definitely worth considering native development. I see. I see. Where should we go to learn this Salesforce mobile technology? Yeah, as I said, I think the the advantage is that Trailhead is obviously a huge resource. They have some fantastic modules on Salesforce mobile development as well as. On Salesforce One, as I said, the repositories are open source on GitHub. So just search for Salesforce Mobile SDK GitHub, and it will take you to those those repositories. What they have done really well is they actually have a repository of sample applications with the each of the SDKs, the Android SDK and the iOS SDK. So what you can do is just clone that repository, run the sample applications on an emulator or a phone, try and understand how it works, and it can actually give you a good starting point for your project as well. So rather than building it from scratch. Just use one of those sample applications as the starting point. Start customizing it, and that's a that's a good approach. And I'll also be a shameless plug. I actually published a

[20:56] Plural Sight course on Salesforce mobile development. So if you are on Plural Sight, you can obviously go to Plural Sight, search for a course called Salesforce mobile development. It's a course, a play by play course which I and Don Robbins did a few years back. It's one of the popular courses on Salesforce and. A Pluralsight has all these promotions that they do from time to time. So if you time it right, you can actually get the course for free as well. And if if there's no promotion running, just always reach out to me, and I can get you a voucher to to do the course for free. That's excellent. Yeah, I will put all these links into our show notes as well. The GitHub repo and your Pluralsight course is definitely. In the past, I talked with Don Robbins, so he did an excellent job to invite all these gurus together to share knowledge. Excellent, Gaurav. Thanks a lot. So that's all I wanted to ask you before let you go. Do you still have something else you want to talk? Yeah. So I just wanted to say that I mean, like any other technology, I mean, it's not magic wand that somebody can run Salesforce, learn Salesforce mobile development in a in a couple of days or a couple of weeks. It's a process, so you need to put in effort. You need to understand the concepts, and then. But once you learn it, I think you'll you'll realize that there are a lot of possibilities that you were not aware of earlier. So it's a skill which is totally worth it, in my opinion, for any Salesforce developer. And then it's definitely a skill up. And during these these times where people have a little more

[22:26] time, I strongly recommend people to to try it out. It's it's fun and it's very exciting to be to be able to build applications on your own. I totally agree with what you just mentioned. Salesforce technology is really colliding with the the mainstream technologies like the iOS development, Android development. This is a really perfect timing if you want to learn a bit the other side of how they do the mobile development. I even remember back in the TDX 19, the best gifts from the the running, there were some gifts if you do some some lap exercises. It was the the Apple one. Do you remember? It's like a full pack of the Apple product. You get the that's right the mobile. You get the AirPods. You get the pack. You get the MacBook. So that was really a big prize. Yeah, I think they called it the TDX nineteen mobile challenge. I did that one as well. I did not really come first, but I did get a two hundred dollar Apple Store voucher. Oh, really? Okay, we we got an Apple Apple TV for our team. Wow! Excellent. All righty. Thanks a lot to Gaurav. It was excellent chatting with you, and also see your good faces again. You know. Yeah. Thank you. Thank you for having me, and stay safe. Yeah. Thank you. Thank you, Gaurav.

[23:47] Hi, I'm constantly looking for good guests. If you have any guest recommendation, please reach me out. I'll make sure they are joining to the show to share their knowledge. Otherwise, thanks for listening to the show. I'll see you next Thursday.

Leave a Reply