Peculiarities of mobile app development Part2.
- Alexey Dubrovin
- July 8, 2024
- Digital transformation, Mobile development
4. Developing your app Cross-platform way – Pros and Cons
The Cross-platform development tools are Microsoft Xamarin, Embarcadero Delphi, Kotlin – they compile native machine code to be executed on OS with 100% utilisation of native components.MS Xamarin compiles the IL (intermediate language), which has to be run by .NET Framework implementation. But this is the same idea as Java and all Android apps are Java – this is the same approach. At the end of the day, it is 100% native control base is used.
Pros
- Code can be shared between different platforms (up to 100% in simple cases)
- The User Interface is rendered using ‘native’ controls, so UI performance can be as fast as native.
- The app behaviour is consistent between platforms
Cons
- Some native code may still need to be written
- Some latest hardware features might be unsupported by your tool
- There is typically a delay between the release of new OS and release of the development tool for 100% OS support, sometimes the developer has to avoid upgrading OS for the sake of compatibility. Which is (typically) not a big problem as the OS upgrades tend to maintain apps created for running on previous OS versions.
Hybrid development Pros and Cons.
Hybrid is a subset of Cross-platform development, with the same idea – to share code between the platforms taken even further – what if it is possible to share code between Web and mobile platforms?
A hybrid solution is a Javascript + HTML (the tech which is normally run in your browser) which is run on top of a container/bridge in order to make it possible to interact with the mobile platform. The examples of this approach are Ionic, Sencha, Apache Cordova, PhoneGap, React Native
Pros
- The code (not everything but most of it) is shared between all platforms
- You can extend skills of your web developer(s) to mobile devices
Cons
- Not everything is possible – in terms of utilising platform specific features – some may be not supported by the medium running the JS code.
- It is a Javascript – JS solution nowadays are built with help of high amount of 3d party packages. If these packages are not updated to the most recent versions – the code is susceptible to the vulnerabilities which are found too often.
- With exception of React Native – the UI look is not native to the platform
React Native and Flutter
A few comments to the popular tools – React Native and Flutter.
These two are special ones: they hang somewhere between the cross-platform tools developing native applications and hybrid development tools: they do not produce a native app but (that is the reason to count them as hybrid) but they operate on principles close to those of Java and .NET.
Yes, Flutter even compiles code into a native library, but one does not make a whole app – it requires a Flutter library medium to delegate the OS specific tasks.
There are bunches of articles explaining the details of these tools for developers but what is the difference to the customer (the app owner)?
Pros:
- You will be able to significantly cut the costs of development. React Native allows sharing some code even with your web site project (assuming you web site is created in React as well). And the Google aims to use Dart for creating apps for new device types.
- App efficiency is high – both Facebook and Google keep focus on this parameter
- Both tools are open source and rely on a high number of 3d party libraries. These libraries as every program are created with mistakes and oversights which are getting fixed but require regular updating. And because the libraries are open source too – the vulnerabilities are much easier to be found and utilised by hackers. The 3d party libraries you use the more potential security holes are there, especially if you are using such a popular language as javascript.
- Despite the popularity and the massive support from communities – some things may not be possible or not so easy to do and for you as an owner that means they will be more expensive to do if still possible
In conclusion, developing a mobile app involves choosing between Native, Cross-Platform, and Hybrid approaches, each with unique pros and cons.
Native development offers optimal performance and full access to device features but requires separate codebases for each platform.
Cross-Platform development allows for significant code sharing, reducing costs and time, but may lag in adopting new OS features.
Hybrid development, including React Native and Flutter, maximizes code reuse across web and mobile but may face limitations with platform-specific features and security vulnerabilities.
Understanding these options helps you make an informed decision that fits your project’s needs.