Mobile Development Research - bounswe/bounswe2024group12 GitHub Wiki
Mobile app development is the process of creating software that run on a mobile device, and a typical mobile app utilizes a network connection to work with remote computing resources. Hence, the mobile development process involves creating installable software bundles (code, binaries, assets, etc.), implementing back-end services such as data access with an application programming interface (API), and testing the application on target devices.
In mobile application development, whether opting for native or hybrid approaches, a key challenge lies in the limited resources of mobile devices compared to desktops or servers. Developers need to adjust goals to create less resource-intensive apps. For resource-intensive tasks, you can connect your app to the cloud using APIs.
There are two dominant platforms in the modern smartphone market: iOS and Android. iOS is from Apple, Android is from Google. Android is used not only by Google devices but also by many other OEMs (online equipment manufacturers) to build their own devices.
Developing for iOS vs. Android involves using different software development kits (SDKs) and different development toolchain. Developers can build apps for hundreds of millions of devices by targeting both of these platforms.
When choosing a platform for mobile app development, teams often prioritize Android due to its dominant market share (around 70% of smartphones) and fewer restrictions on the Google Play Store. However, iOS appeals with simpler optimization, fewer device variations, and higher user retention. Considerations like target audience, organizational needs, and user behavior based on geography and culture play crucial roles in deciding between Android and iOS development.
To develop an iPhone app, you'll need a current Mac computer. Download the free Xcode app from the Mac App Store and subscribe to a $99/year Apple Developer account. Only active members can publish apps on the App Store, and for an app to be eligible, it must be signed and published using Xcode. Xcode exclusively runs on macOS, available only on Apple computers. Xcode includes a design interface, code editor, testing tools, and other features designed for iOS-based technologies.
For making iPhone apps, you have two programming languages: Objective-C and Swift. Objective-C has been around since the 1980s and was the main language for Apple products. It's good for older apps but not as user-friendly as Swift. Swift is the newer language, considered the official one for iOS now. It's similar to Objective-C but simpler, more secure, and easier to learn. If you're starting fresh, go with Swift; if you have old apps, you might stick with Objective-C.
After completing iOS app development, testing is crucial. In Xcode, you can perform automated UI testing, simulating user interactions thoroughly. Despite this, human beta testing is essential to cover all possible user interactions. Apple's TestFlight app allows internal testing with up to 25 team members on 30 devices each. After internal testing, you can release the app to external testers, inviting up to 10,000 users. TestFlight enables A/B testing, providing usage data and allowing users to submit feedback easily.
Android is great for app development. It has a bunch of tools like APIs for cloud integration and works well with various devices. Google Play makes it easy to distribute apps for a $25 fee. Using Java for coding ensures compatibility. Android Studio helps with development, and the platform follows material design principles for a consistent user experience.
Java has long been the main language for Android apps, but Kotlin is gaining popularity since Google officially recognized it in 2017. Kotlin is simpler and more efficient than Java, requiring less code for the same tasks, making it easier for developers to understand. It also helps reduce errors, particularly null reference exceptions, a common problem in Java. Kotlin restricts which objects can point to a null reference, preventing potential app crashes.
You can also use C++ with the Android Native Development Kit (NDK) for powerful apps. Android lets you test on different systems using emulation. Overall, it's a solid ecosystem for making apps for different devices.
There are four major development approaches when building mobile applications:
Native mobile applications are written in the programming language and frameworks provided by the iOS and Android platforms, such as Swift and Kotlin, respectively.
-
Best runtime performance
-
Direct access to device APIs
-
Higher costs when building and maintaining your app
-
Multiple code-bases for each platform
Cross-platform native mobile applications can be written in variety of different programming languages and frameworks, but they are compiled into a native application running directly on the operating system of the device. Examples of such frameworks are React Native and Flutter.
-
Single code base for multiple platforms
-
Easy to build and maintain your app
-
Dependents on bridges and libraries for native device features
-
Performance limitations due to bridging
Hybrid mobile applications are built with standard web technologies - such as JavaScript, CSS, and HTML5 - and they are bundled as app installation packages. Contrary to the native apps, hybrid apps work on a 'web container' which provides a browser runtime and a bridge for native device APIs via Apache Cordova.
-
Shared code base between web and mobile apps
-
Using web development skillset for building mobile apps
-
Lower performance compared to native apps
-
Limited support for native device features
PWAs offer an alternative approach to traditional mobile app development by skipping app store delivery and app installations. PWAs are web applications that utilize a set of browser capabilities - such as working offline, running a background process, and adding a link to the device home screen - to provide an 'app like' user experience.
-
Same app is available both for web and mobile
-
No installation required, accessible through a URL
-
Limited support for native device features
-
App capabilities depend on the browser in use
At the highest level, there are four main ways that native apps differ from hybrid apps as illustrated in the following table.
Native | Hybrid |
Platform Specific | Cross Platform |
Compiled Language | Scripting / Compiled |
Access to Device Hardware | Plugins / Native Modules |
Platform Frameworks | Web Frameworks |
There are two interlinked core components of a mobile app: 1) the “front-end” that resides on the device, and 2) the services “back-end” that supports the mobile front-end.
The mobile front-end is the visual and interactive part of the app the user experiences. It usually resides on the device. The application can be downloaded from the platform app store, side-loaded directly onto the device, or can be reached through the device’s browser, as in the case for PWAs.
When a developer says they are a mobile application developer, they are most often referring to this front-end part of the application.
Front-end development may involve creating dedicated visual elements for the application like icons, backgrounds, colors, and themes. The development may also involve user experience (UX) and user interface (UI) design which include the layout of the components and how they interact with each other and the user. In the case of certain types of apps, development may involve creating motion graphics and even physics engines that govern the physics of how components move in the app, like a car in a racing game.
Another critical element of the development effort is building the app logic that is responsible for making network calls to the back-end services, retrieve data and update the data in the back-end systems with new information generated from the app.
These back-end services are typically accessed through a variety of APIs. There are different types of APIs, such as REST and GraphQL, and there are also a wide variety of means and styles of accessing them. While some back-end service APIs are available directly to the application through calls in the platform itself, many of the specialized services have to be integrated into the app via a software development kit (SDK). Once the SDK has been added to the app via the development environment, then the application can make use of the APIs defined in the SDK.
An example of a back-end service for a mobile front-end could be a database that contains information used in the app. To access the database directly, the mobile developer would have to know the network location of the database, the protocol for accessing the database, the credentials for authenticating and authorizing the data access, and the specific database commands needed to extract the needed data.
Alternatively, the developer can utilize a specialized API when interacting with the database; the developer may only have to know the parameters needed in a method call to get or updated the needed information. In some cases, the mobile developer may develop these APIs themselves or use the API definition provided to them by the owner/operator of the back-end resource.
Typically, a REST API is used to interact with data sources on the cloud, such as a cloud database. A GraphQL API is also another option for developers, as it makes easy to work with back-end data in a mobile application. GraphQL provides querying support through a single API endpoint, and a data schema that can be used to build and easily extend data models that are used in the app.
Regardless of what front-end platform or development methodology is being used, delivering high-quality mobile applications that delight and retain users requires reliable back-end services.
Given the critical importance of back-end services for the success of the mobile application, the developers have several important architectural decisions that they must consider. These decisions include which services should they build themselves and which third party services should they leverage, and then should they run and maintain their own services or should they take advantage of 3rd party services.
To improve developer productivity and efficiency, mobile app programmers should only build their own services if they are highly specific to the domain of the application and embody unique intellectual property. Also, even for the services they build themselves, they should almost always leverage cloud-based services to build and maintain their back-end infrastructure.