Drift Facade

App Development: Choosing the Programming Language

When thinking about programming languages, frameworks, and SDKs for mobile web app development, you should consider the front-end (UI) development environment as well as the  back-end (server-side) development environment.

 

The developers who are coding the front end are usually different from the ones who are coding the back end, but they generally work with each other. In this article, we’ll review today’s popular programming languages and development frameworks for mobile applications.

Types of mobile apps

From a coding perspective, developers can choose to create one of three types of mobile apps:

  • Native mobile apps are those written in a language that is natively supported by the device operating system (OS) vendor. The platform’s fundamental APIs are 100% available to the application code. The operating system provides the UI component library. The structuring process converts this code into an executable application with native operating system byte code.
  • Cross-platform mobile apps are those that are written in one language and can run on all platforms. Cross-platform development allows you to target multiple platforms with one codebase. While it’s possible to target multiple desktop and mobile platforms at the same time.
  • Mobile web apps are the applications that run on the smartphone, using browsers. Developing a Mobile Web application is not as easy as developing a website or web application. There are various important factors to be considered while developing the mobile web application.
  • Responsive programming is a style of website programming in which the layout of the website is organized to fit the format of the device.  These sites can also be used on a desktop. 
  • Progressive programming creates progressive web apps that are normal websites. They have the look and feel of a traditional mobile app when navigating from a browser on a mobile device. Progressive web apps can add a link to the Home screen (so you get an application icon) and can also be performed offline when you are not connected to the internet, through the local storage of content on the device.

 

Developing mobile apps for the iOS platform

The iOS platform is a proprietary platform made by Apple. The iOS platform is available for mobile devices (iPhone) and tablets (iPad). You can develop apps for the iOS platform and target the same app to either an iPhone or an iPad. When developing the app, the space limitations of each of the devices must be taken into account. iOS apps can be installed on your iPhone or iPad via the Apple App Store.

To develop iOS apps, you need to have an Apple developer account and Xcode IDE on a Mac computer. There is no way to efficiently develop and perform the debugging process using just one machine with a Windows system. 

Xcode includes all the necessary Apple development toolkits: SDKs, a code editor, compile/build tools, simulator, rs, and a debugger. You will have to use CocoaPods or Carthage as package managers to embed third-party SDKs or submit an SDK written by you.

Applications for iOS devices can be developed using the native iOS SDK with Objective-C and Swift or with the various cross-platform technologies that are written in the SDK for that framework but are targeted towards iOS.

Objective-C

Objective-C was Apple’s first supported language for iOS mobile application development. It is an object-oriented (OO) language that derives the language syntax from the C and the OO aspect of Smalltalk. This language is commonly criticized for having ay clunky syntax, verbose, and braces that make the debugging process difficult. Despite this criticism, it is a stable and mature language, which is why it has been used by developers for several years.

Swift

Apple released Swift in 2014 as a language specification and made it available for mobile app development in Xcode in 2015. After a major revision of the Swift language in 2016 (v 3.0), Swift has surpassed Objective-C as the language to write native iOS apps. 

While Swift and Objective-C can coexist, (meaning libraries written in Objective-C and utilities in Objective-C can be used in Swift) Apple is making it very clear that Swift is the new default choice for application development i.e. iOS. Swift is an easier, simpler, and more compact language compared to Objective-C. Developers currently using Objective-C should have no problems migrating to Swift.

Developing mobile apps for the Android platform

Android is an open-source platform, developed and promoted by Google. Google promotes its mobile device brand, Pixel (and the earlier brand, Nexus). However, there are a large number of manufacturers, such as Samsung, Huawei, Xiao, mi, and Oppo, that sell their brands of phones and tablets with Android technology and derivatives of the Android operating system, such as CyanogenMod and MIUI. 

In terms of form, Android operating systems are available on a multitude of devices. From phones to tablets, as there are a variety of manufacturers with model series aimed at meeting different user preferences.

To develop Android apps, you need the Android development toolkit which contains the necessary SDK, debugger, emulators, etc. For an IDE, Android Studio is by far the most popular, but there are other equally popular IDEs like Netbeans and IntelliJ Idea. You can have the development environment on any operating system (Mac, Windows, or Linux). Android uses Gradle for the build system, and Android Studio makes code templates and other performance assessment and improvement tools available.

Third-party libraries are added to the application through a Gradle package policy. A large number of third-party SDKs on Android are distributed using a package manager called maven, popularly known as maven central. Apps developed for Android are distributed in the default Google Play Store, managed by Google.

Apps can be developed for Android devices via the native Android SDK with Java and Kotlin, or with the various cross-platform technologies that are written in that framework’s SDK but targeted towards iOS.

Java

Java has been the standard language for writing Android applications since the Android platform was introduced in 2008. It is an object-oriented programming language originally developed by Sun Microsystems in 1995. It was very popular as a pure, object-oriented language (compared to C++), and was quickly adopted by the Android platform.

The platform compiles to “bytecode” interpreted at runtime by the Java Virtual Machine (JVM) running on the operating system. Mobile apps are written in Java and programmed in Android SDK. Critics of the language say that Java requires a lot of “ boilerplate code” to perform a simple task, and concepts such as exceptions are difficult to understand. So far, this is the most used language for Android application development.

Despite this, as of 2019, Kotlin became the language of choice for Android development, according to Google.

Kotlin

In 2017, Google announced support for Kotlin as a high-performance alternative language for Android programming. Kotlin is interoperable with Java and all Java libraries can be powered by Kotlin. It can be said that Kotlin is a more organized form of Java. The learning curve from Java to Kotlin is smooth. As for run level, Kotlin compiles to Java Bytecode.

Developing mobile apps for both iOS and Android platforms

When it comes to approaches to building native applications, it is necessary to maintain codebases per platform. The size of the code repository is proportional to the platforms that need to be supported. You need to develop for both platforms, but you don’t need the features of the native language. 

Fortunately, some technologies allow you to write in one language or framework and target the application to both platforms, which means that developers not familiar with Java and Swift but specialized in other technologies, such as Web and C#, can use your skills to develop apps for Android and iOS.

Several open-source companies have crafted frameworks that have an affinity with their developer base for Android and iOS development. These frameworks come with the ecosystem of tools and IDEs, offering greater convenience for developers familiar with them. For example, Xamarin’s C# tool system is geared toward using Microsoft Visual Studio, and Apache Cordova is geared toward using web IDEs like VSCode. 

However, the development environment tools for Android and iOS must still be for the cross-platform tools to take advantage of the native SDKs and packages. Sometimes frameworks are included the in simulators but often end up using the simulator from the core Android or iOS native development environments.

The following cross-platform frameworks rely on maven or NuGet to distribute third-party plug-ins and SDKs. Some developers also list their plugins for sale.

HTML5 and Apache Cordova

Apache Cordova started as an Adobe project called PhoneGap. With Apache Cordova, you can run HTML and JavaScript (JS) code in a secure browser instance (using the codebases g captive portal ) called Webview. Using Webview, you can write code once and then run it anywhere. One of the criticisms of the cross-platform approach is that the response can be slow due to JavaScript code running in the review. 

The HTML code is included in the app itself and is installed on the mobile device. This makes it possible to use a wide variety of web UI frameworks like Jquery, React JS, Bootstrap, Angular, JS, or Vue. 

There are also other frameworks on adjacent layers, such as Ionic, that end up running on Cordova. In addition to the UI libraries, there is a plug-in concept that allows JS code to access native device resources such as camera, contact list, or location. A vast ecosystem of third-party plug-ins is available.

The most popular package manager is npm.

Popular IDEs among the developer community is Visual Studio Code and Eclipse. Ionic, which appears as a wrapper on top of Apache Cordova and currently uses Angular JS, also has its IDE, available for purchase, called Ionic Creator. However, you can still develop an application with Ionic Angular JS using any other IDE as mentioned earlier.

C# and Xamarin

C# is an object-oriented programming language developed by Microsoft. The Xamarin framework allows you to program in C# on the .NET framework , which is implemented on the iOS platform through an open-source implementation called mono.

The most popular IDE for writing code in C# and Xamarin is Microsoft’s Visual Studio Code. C# code is cross-compiled and runs natively on the iOS or Android device. This allows for lag-free execution very close to that of native development. 

There are special extensions called Xamarin.iOS and Xamarin.Android, which you can use to access native iOS and Android features that can be called from C#. For iOS, you need XCode on a Mac computer to build the installable iOS app.

JavaScript and React Native

React Native was launched in 2015 by Facebook and uses JavaScript as a programming language to write mobile apps. HTML is not used to write applications in React Native. This code is then interpreted at runtime and executed through a “bridge” to access the device’s SDK native resources. 

React Native apps use the platform’s native UI library to render the UI components, which makes the UI truly native. React Native has become very popular due to the simple learning curve of JavaScript.

Dart and Flutter

Although Dart was released by Google in 2011, the first stable release was in 2017. Dart is an object-oriented programming language. Flutter framework uses it to write mobile apps for iOS.

The most popular IDEs are Android Studio, IntelliJ, and Visual Studio Code (VSCode). One of the unique features of Flutter is that it comes with its library frameworks of widgets UI, which is based on Material Design, also from Google, as well as the widgets typical UI of iOS.

Developing mobile apps for the web platform

While they are not an installed app, it is important to consider the UIs that are generated when navigating to a web URL. Generating websites has some value for certain cases, such as an app for incidental, short-lived events and for capturing small amounts of information such as name and address without forcing a user to install an app. 

With the advent of progressive web apps (PWAs), the user experience across apps and websites is indistinguishable. These mobile-optimized sites are written using web technologies (HTML, JavaScript, and CSS) and typically a UI framework.

Optimized mobile sites

Using any of the frameworks like Material, Bootstrap, AP, or Foundation, you can generate a responsive website. Responsive web design features include layouts that adapt to available space through a native experience. For example, a website might have a 5-column layout when accessed in a laptop browser, but that same website will be reduced to a 2-column layout when viewed in a mobile browser in portrait mode. 

The two main differences between a mobile-optimized site and viewing a normal site on a mobile phone are that you don’t need to zoom in to view the content and there’s no horizontal scrolling.

Progressive web apps (PWAs)

Progressive web apps are sites represented as native applications. Browsers have evolved to detect a PWA and remove the adjacent browser to give web content the full space of the device. 

When you add a shortcut to this website, it creates an icon on your phone’s home screen so you can launch it like a normal app. The browser also caches specified content locally on your device so you have a fast and reliable loading time and a progressive offline experience as well. This is accomplished using:

  • A service worker running in the background to pre-cache content;
  • Responsive design for rendering optimization;
  • A web app manifestto notify the browser that it can be installed.

Conclusion

Mobile platforms may not necessarily undergo a drastic change except for the enhancement of new features by Apple and Google on their respective platforms, but the cross-platform landscape has seen a lot of turmoil. 

You can expect that every year there will be a new preferred framework. It is important to choose the development approach based on collective skills and application requirements. 

To succeed in mobile development, developers need to be aware of changes in tools and platforms as mobile development is still an evolving technology space, with AI and machine learning coming to mobile devices. The ability to adapt in any business environment is a major key to success.

Tripti Sangal
Tripti Sangal