Why choose cross-platform development?

Why choose cross-platform development?

It's been time since the cross-platform development has gained popularity and now that we are entering a phase (in the technical world) where there is this increasing demand for rapid prototyping and less time-to-market, pretty much everything cross-platform development offers, I believe it's only gonna take-off as compared to native development (no offence to anyone). You can see the popularity of cross-platform frameworks in the below image:

popularity.pngImage from Statistica

Nonetheless, I have also interacted with developers who are of a different point of view, because they have the opinion that there's stuff (or say the true potential of the beast) that can only be unlocked via native development. But don't worry, we will be exploring all those aspects in brief shortly.

Available options

While there are multiple cross-platform tools available in the market, I will talk about the three options I've come across that seemed pretty popular among developers. But if you are willing to look for more, Google is always there for rescue :P

1. Flutter

Flutter is Google's toolkit used to develop natively compiled applications for mobile, web and desktop from a single codebase (Cool, isn't it?). It was initially released by Google in May 2017.

flutter.png

The first time I came across Flutter was about a year ago, it was there in a newsletter where the author talked about how Flutter is still in its beta for desktop and web and it would take a lot of time for it to become stable, and maybe someone in the dev team read that article and got offended, so what happens a few months later is that Google releases another version and voila, there is now stable support for Web, Windows and Linux.

So the developer writes code in Dart (the cross-platform language Flutter uses), and the code is then natively compiled for the platform you choose. Moreover, Dart is an easy language to understand for the people coming from Java or Javascript background because they'll find quite a few things similar, but even if you do not know these two languages, learning Flutter won't be difficult, take this from someone who is not into Java or Javascript either. xD Flutter does everything using widgets, so if you are looking for an application tailored to your needs with a beautiful UI, you now know where to look.

2. React Native

The next to make it up to my list is React Native (RN). It is another popular Javascript based mobile app framework. It facilitates you in building natively rendered apps for iOS and Android. It was first released by Facebook in 2015, and sometimes it's said that Flutter was Google's reply to this Facebook stunt but then some also say that Flutter was in the works around 2012-13.

react_native_logo.png

React Native allows you to build apps while using Javascript as the programming language, and this was one among the multiple reasons why React Native gained so much popularity among developers in a really short period of time. One can take a guess at its popularity by looking at the numbers of contributors on RN's GitHub repo.

Even though I have developed some aversion towards Javascript or any of its offsprings, RN seems quite fascinating to me. RN's components wrap existing native code and interact with native APIs via React's UI paradign and Javascript. The app is rendered in native platform UI thus using the same API the other apps do. Moreover, it gives you a strong side by giving you the option to write your modules in languages such as C, Swift and Java.

3. Xamarin

The last one here is Microsoft Visual Studio Xamarin. It allows you to build apps for platforms such as Windows, iOS and Android using a single .net code.

Xamarin.png

Now I must say that I have not seen a lot of Xamarin developers but it's still worth to talk about it since the best part of this cross-platform tool is that the apps built using this look and feel like native apps. This might be mostly because it uses native interfaces to serve out to the user's needs. Most of the time, around 70-80% of your code would remain the same while working for different platforms so you don't need to worry about all the platform specific code everytime you start building something.

Why cross-platform development is advantageous?

Needless to say, there are multiple benefits we have while using cross-platform solutions.

  • Faster app delivery: The usage of single codebase manifests itself beautifully to offer a lesser build time while development, thus reducing the time in development, prototyping and even the time to market.

  • Reusable code: Now that we know we can use the same code over multiple platforms, it would be easier to use the same code everywhere and maintaining that code would be even easier as compared to native solutions.

  • Reduced costs: Cost reduction is a very crucial factor if you are in a team building an app for several platforms. Developers do not have to invest their time and money on learning different technologies for different platforms. So in turn, the overall cost for the development of an application here is much less as compared to native development.

Setbacks of cross-platform development

Before I begin, I'll say that there aren't many setbacks, all the cross-platform frameworks offer almost all the things one needs to develop an application.

  • Performance issues: Apps sometimes face performance issues as they are not exactly native and face difficulty in native-level performance. On the contrary, dev communities are constantly working to improve these cross-platform frameworks so that the performance is at par with the native solutions.

  • Delay in receiving new features: Everytime a new component or a feature is added to a platform, it takes a little more time for it to be available on these cross-platform solutions. Developers, thus, have to wait for some time to get their hands dirty with those new features.

  • Larger app size: It's been a long time since I've started cross-platform development and although I have not faced much of an issue with the app size but yes, sometimes, the app size gets too large even for an app which doesn't do much. On the contrary, I will say that most of the times, a larger app size won't affect anything while you are building an application.

Where to see cross-platform development in 5 years? xD

Here comes the most dreaded question of all time, and formally we should be allowed to answer it with, "Let's see whether I'm gonna make it to 5 years with the same tech space or not."

Jokes apart, there surely are many things that are going to be in the market in the upcoming years, the tech space is rapidly changing with every new solution being better than the previous one. But on the other hand, the demand for cross-platform development has already increased in the industry with the tech giants such as Google and Facebook moving towards migrating their native-apps to their cross-platform counterparts.

Companies are now looking for developers in the same segment, again because of the advantages mentioned. Developers are loving the simplicity. And in the end, users are enjoying a good end product. So in my opinion, the cross-platform app space is only going to grow in the next 5 years, unless we get something better ofcourse.


I will also be adding links how to begin with all the platforms I have mentioned here, until then, you can checkout my profiles on LinkedIn ( vaibhavk20 ), GitHub ( vaibhav-yb ) and Twitter ( _vaibhavk_ ).