Zum Inhalt springen

English:Mobile App Development

Aus MOOCsWiki Staging
Die Druckversion wird nicht mehr unterstützt und kann Darstellungsfehler aufweisen. Bitte aktualisiere deine Browser-Lesezeichen und verwende stattdessen die Standard-Druckfunktion des Browsers.
aiMOOC-Siegel

Mobile App Development



Introduction

Mobile App Development is the engineering process of designing, implementing, testing, deploying, and maintaining software for smartphones, tablets, foldables, and other mobile devices. In this university-level aiMOOC, you will connect software engineering with human-computer interaction, software architecture, security, data management, testing, accessibility, and product thinking.

Mobile devices create constraints that differ from conventional desktop software: limited battery and memory, intermittent networks, many screen sizes, touch interaction, sensors, permissions, background-execution limits, and platform-specific distribution rules. A successful mobile application therefore requires more than code. You must reason about users, device capabilities, architecture, lifecycle behavior, privacy, quality, and long-term maintenance.

By the end of this course, you should be able to choose an appropriate development approach, model an app architecture, design accessible interfaces, connect an app to local and remote data, test important behavior, identify common security risks, and plan a responsible release.


Learning Objectives

After completing the aiMOOC, you should be able to:

  1. Requirements engineering: Translate a user problem into mobile requirements, user stories, acceptance criteria, and a realistic minimum viable product.
  2. Mobile operating system: Explain how platform lifecycles, permissions, resource limits, sensors, and app stores influence implementation.
  3. Software architecture: Separate user interface, domain logic, and data responsibilities so that an app is maintainable and testable.
  4. User experience design: Design touch-first, responsive, accessible interfaces for different devices and user needs.
  5. Application programming interface: Integrate remote services and local persistence while handling latency, errors, and offline states.
  6. Software testing: Select unit, integration, UI, accessibility, and device tests based on risk.
  7. Mobile security: Apply secure storage, authentication, authorization, network, privacy, and dependency-management practices.
  8. Continuous integration: Plan build, signing, release, monitoring, analytics, crash reporting, and iterative improvement.


Prerequisites and Working Method

You should be comfortable with basic programming concepts such as variables, functions, classes or data types, control flow, and version control. Experience with Git is useful. You do not need to know every mobile framework. The central academic goal is to understand transferable engineering principles and then apply them in one stack.

For practical work, choose one primary route:

  1. Native Android with Kotlin and Jetpack Compose.
  2. Native Apple platform development with Swift and SwiftUI.
  3. Cross-platform development with a framework such as Flutter or React Native.


The Mobile Development Landscape


Native, Cross-Platform, Hybrid, and Web Approaches

A native app uses the platform's own SDKs and programming model. Native Android development commonly uses Kotlin with Android APIs and Jetpack libraries, while Apple-platform development commonly uses Swift with frameworks such as SwiftUI. Native development usually offers direct access to new platform capabilities and platform-specific behavior, but supporting two ecosystems can require separate codebases or specialized teams.

A cross-platform app shares substantial application code across platforms. Flutter uses Dart and its own widget framework; React Native uses JavaScript or TypeScript with a bridge and platform integrations. Cross-platform development can reduce duplicated work, but teams still need platform knowledge for build systems, permissions, deep links, accessibility, performance, store requirements, and native extensions.

A hybrid app typically combines web technologies with a native container. A progressive web app runs primarily through web technologies and can provide installable, app-like behavior on supporting platforms. The correct choice depends on required hardware access, performance, team expertise, product lifetime, UI expectations, release strategy, and cost.

Decision principle: do not choose a framework only because a demo is fast to build. Evaluate the full lifecycle: development speed, debugging, automated testing, accessibility, security, performance, dependency risk, platform updates, developer hiring, and maintenance.


Platform Toolchains

Mobile development uses integrated toolchains that combine editors, compilers, package managers, debuggers, simulators or emulators, profilers, signing tools, and build systems. Android Studio is the primary IDE for Android development. Xcode is Apple's integrated development environment for building, testing, and distributing software for Apple platforms.

An emulator or simulator lets you test many configurations efficiently, but it does not replace physical devices. Real hardware is necessary for reliable evaluation of sensors, cameras, Bluetooth, biometric authentication, thermal behavior, battery usage, radio conditions, and some performance characteristics.


From Problem to Product


Requirements, Users, and Scope

Start with a problem rather than a feature list. Identify the target users, context of use, constraints, and evidence that the problem matters. Convert this understanding into user stories and acceptance criteria. A useful story describes who needs something, what they need, and why; an acceptance criterion describes observable behavior that makes the story testable.

For a university project, define a minimum viable product that proves the core value with the smallest responsible feature set. For example, a campus study-space app might include account-free browsing, filtering, room details, favorites, and offline access to recently viewed data before adding recommendation algorithms or social features.

Risk-driven planning is stronger than feature accumulation. Ask: What could make the app unusable, unsafe, inaccessible, too slow, impossible to maintain, or impossible to release?


Prototyping and User Flows

Sketch the complete flow before polishing individual screens. A flow might include launch, onboarding, permission request, home, search, details, editing, error recovery, and sign-out. Low-fidelity prototypes expose structural problems cheaply; high-fidelity prototypes help test visual hierarchy, motion, and interaction details.

When requesting sensitive permissions such as camera, microphone, contacts, precise location, or notifications, ask only when the feature needs them and explain the user benefit in context. Design a useful degraded mode when permission is denied.


User Interface and User Experience


Declarative UI and State

Modern mobile UI frameworks often use a declarative model: you describe how the interface should look for a given state, and the framework updates the rendered interface when state changes. This model appears in Jetpack Compose, SwiftUI, Flutter, and modern React-based development.

Treat the UI as a function of state. Typical state includes loading, content, empty, offline, permission-denied, and error conditions. If you design only the successful content state, your app is incomplete.

A reliable interaction loop is:

User event → state-changing logic → updated state → rendered UI

This pattern supports predictable behavior and automated testing.


Responsive and Adaptive Layouts

Mobile no longer means one narrow phone. Your interface may run on tablets, foldables, landscape screens, desktop-sized windows, and devices with dynamic text scaling. Avoid fixed assumptions about width, height, orientation, or font size.

Use flexible layout rules, semantic components, constraints, and breakpoints when appropriate. Keep important actions reachable, preserve readable line lengths, and test with increased text size. An adaptive layout may use one pane on a phone and a list-detail arrangement on a large screen while preserving the same underlying task.


Accessibility as an Engineering Requirement

Accessibility is not a final polish step. Build it into component selection, semantics, content descriptions, focus order, keyboard support, touch target size, color contrast, motion choices, and testing.

Test with screen readers such as TalkBack or VoiceOver, with large text, reduced motion where applicable, and alternative input. Do not encode meaning only through color. Give controls meaningful accessible names and ensure state changes are announced when needed.


Architecture and State Management


Separation of Concerns

As an app grows, architecture controls complexity. Separate responsibilities so that UI code does not also perform networking, persistence, business decisions, analytics, and authentication. A common layered design distinguishes:

  1. Presentation layer: Screens, reusable UI components, navigation, and observable UI state.
  2. Domain model: Business rules and use cases when the application benefits from an explicit domain layer.
  3. Data access layer: Repositories, local databases, network clients, caches, and data-source coordination.

The exact labels differ between frameworks, but the principle is stable: define boundaries and make data movement explicit.

The Model-View-ViewModel pattern is one way to separate UI from presentation state and logic. It is not a universal recipe. Choose architecture based on project scale, team structure, testing needs, and platform conventions.


Unidirectional Data Flow and Single Sources of Truth

A single source of truth means that one authoritative owner controls a particular piece of application data. Unidirectional data flow means that state moves toward the UI while events move back toward the logic that can update state. These principles reduce conflicting copies of data and make debugging easier.

For example, a repository may expose the current list of saved articles. A screen observes a ViewModel or equivalent state holder. When the user saves an item, an event travels to the state holder, which asks the repository to update the data. The UI then renders the new state.


Data, Networking, and Offline Behavior


Local Persistence

Mobile apps often store preferences, structured records, cached API responses, media metadata, or encrypted credentials. Choose storage according to the data:

  1. Key-value storage for small preferences or configuration.
  2. Relational database for structured local data with queries and relationships.
  3. File system storage for user-generated or cached files.
  4. Platform-protected credential storage for secrets such as tokens or cryptographic keys.

Never assume local data lives forever. The operating system may remove caches, the user may clear app data, and the app may be reinstalled. Define which data is authoritative, which data is cached, and how recovery works.


APIs and Network Failure

Apps commonly communicate with services through HTTP APIs. Treat the network as unreliable. Requests can be slow, duplicated, interrupted, rejected, or return malformed data. Your code should use timeouts, clear error models, retry strategies where appropriate, and idempotent operations when possible.

Keep transport models separate from core domain models when that separation improves clarity. Validate server responses rather than trusting them blindly. Avoid placing secret server credentials inside a distributed mobile binary because users can inspect application packages.

An offline-first design makes local data the immediate source of usable state and synchronizes with remote services when connectivity permits. This approach can improve reliability but introduces difficult questions about freshness, conflicts, deletion, and synchronization.


Device Capabilities, Permissions, and Lifecycle


Sensors and Platform Services

Mobile devices expose cameras, microphones, location, motion sensors, Bluetooth, notifications, biometric authentication, and other capabilities. Each integration adds technical and privacy responsibilities. Use the least capability necessary, minimize collection, and provide transparent user controls.

Code must also respect lifecycle changes. Screens can be recreated, processes can be stopped, apps can enter the background, and network access can change. Persist important state at the correct layer and avoid relying on transient UI objects as the sole owner of essential data.


Background Work and Energy

Background execution is constrained to protect battery, memory, and privacy. Schedule deferrable work with platform-supported background mechanisms instead of keeping arbitrary processes alive. Batch work where possible, reduce unnecessary network wakeups, and use push notifications rather than constant polling when the architecture permits it.

Performance is multidimensional: startup time, frame rendering, memory, network use, storage, battery, thermal behavior, and binary size can all affect user experience.


Testing and Quality Engineering


A Risk-Based Test Strategy

Different tests answer different questions:

  1. Unit testing checks isolated logic quickly.
  2. Integration testing checks collaboration between components such as repositories, databases, and network clients.
  3. UI testing checks behavior across rendered screens and interactions.
  4. Accessibility testing checks semantics and interaction with assistive technologies.
  5. Device testing checks hardware, operating system versions, screen classes, and real-world constraints.

Use a test pyramid or test portfolio as a thinking tool, not as a rigid quota. Put many fast tests around deterministic logic, use integration tests at meaningful boundaries, and reserve end-to-end tests for critical journeys.

Datei:Android Espresso Test Example in action.webm


Observability and Production Quality

Testing ends before production; learning continues after release. Monitor crashes, application-not-responding events where applicable, performance traces, network failures, and selected product metrics. Define metrics before collecting them, minimize personal data, and document why each event is necessary.

A useful quality loop is:

Observe → diagnose → reproduce → fix → test → release → verify

Crash-free sessions alone do not prove a good product. An app can be stable yet inaccessible, confusing, slow, privacy-invasive, or incorrect.


Security, Privacy, and Trust


Threat Modeling

Threat modeling asks what you are protecting, who might attack it, how they might act, and what controls reduce the risk. Mobile threats include stolen devices, malicious apps, insecure networks, reverse engineering, tampered clients, credential theft, vulnerable dependencies, and unsafe backend APIs.

Treat the mobile client as an untrusted environment from the server's perspective. Do not enforce critical authorization only in the app. The server must verify what each authenticated identity is allowed to do.


Security Controls

Important control areas include secure local storage, cryptography, authentication, authorization, network communication, safe interaction with platform APIs, code quality, resilience, and privacy. The OWASP Mobile Application Security Verification Standard provides a structured baseline for mobile security verification.

Practical rules include:

  1. Store secrets using platform-protected mechanisms instead of plain text.
  2. Use secure transport and validate certificates through platform networking stacks.
  3. Request the minimum permissions needed for each feature.
  4. Keep dependencies current and review their security and privacy impact.
  5. Avoid logging credentials, tokens, personal data, or private message content.
  6. Validate authorization on trusted backend systems.
  7. Plan how users can delete accounts or data when the product collects personal information.


Build, Release, and Maintenance


Version Control and Continuous Integration

Use small, reviewable commits and protect the main branch with automated checks. A continuous integration pipeline can compile the app, run static analysis, execute tests, verify formatting, build artifacts, and generate signed release candidates through protected credentials.

Separate build configuration from secrets. Signing keys and store credentials require careful access control, backup, and rotation policies. Reproducible build steps reduce the difference between a developer laptop and the release pipeline.


App Store Delivery

Distribution normally involves application identifiers, versioning, signing, privacy declarations, screenshots, metadata, age or content classifications, platform policy compliance, and review. Requirements change, so teams must treat store policy as a maintained dependency rather than a one-time checklist.

Use staged or phased releases when available. Monitor quality after deployment, pause rollout when critical regressions appear, and maintain a rollback or hotfix strategy.


Team Practice and Technical Decision-Making


Working in a Mobile Team

Professional mobile projects involve collaboration among developers, designers, product managers, testers, backend engineers, security specialists, and sometimes data or ML teams. High-quality collaboration depends on shared definitions of done, design-system components, API contracts, code review, issue tracking, and explicit architectural decisions.

An architecture decision record captures an important decision, alternatives, context, and consequences. This is especially useful when choosing a framework, database, navigation approach, state-management system, analytics SDK, or authentication design.


Capstone Project Pattern

A strong university capstone is small enough to finish but rich enough to demonstrate engineering judgment. One possible brief is an offline-capable campus service app with three to five core screens, one remote API, local persistence, responsive layouts, accessibility support, authentication only if justified, automated tests, and a release pipeline.

Your submission should include:

  1. A concise problem statement and user group.
  2. A clickable prototype or flow diagram.
  3. A repository with readable commits and a documented setup.
  4. An architecture diagram and one decision record.
  5. Automated tests for critical logic and one important UI flow.
  6. A short security and privacy review.
  7. Evidence from user or peer testing.
  8. A release build plus a retrospective explaining trade-offs and next steps.


Interactive Tasks


Quiz: Test Your Knowledge

What is the strongest reason to separate UI code from data access code? (It improves maintainability and testability) (!It guarantees zero bugs) (!It removes the need for APIs) (!It makes permissions unnecessary)




Which approach shares substantial application code across multiple mobile platforms? (Cross-platform development) (!Native-only development) (!Manual device testing) (!Server-side rendering only)




What should be the primary source for enforcing authorization to protected backend data? (The trusted backend) (!The visible app screen) (!A local color theme) (!The app store description)




What does a single source of truth reduce? (Conflicting copies of application state) (!The need for user research) (!All network latency) (!Every form of technical debt)




Which test is best suited to isolated deterministic business logic? (Unit test) (!Store review) (!Manual screenshot comparison) (!Release note review)




Why should developers test on physical devices as well as emulators? (Some hardware and real-world behavior cannot be reproduced reliably) (!Emulators cannot run application code) (!Physical devices remove the need for tests) (!App stores reject emulator-tested apps)




What is a good strategy when a user denies a nonessential permission? (Provide a useful degraded mode) (!Terminate the application) (!Request every permission repeatedly) (!Store the permission result on a public server)




Which design practice supports users of assistive technologies? (Meaningful accessibility labels and semantic controls) (!Color-only status indicators) (!Fixed tiny text) (!Unlabeled icon buttons)




What is a key purpose of continuous integration? (Automate repeatable build and quality checks) (!Replace all code review) (!Guarantee store approval) (!Eliminate version control)




What should an offline-first architecture define explicitly? (How local and remote data synchronize) (!A permanent network connection) (!Only one screen size) (!No local storage)





Memory Game

Repository Coordinates access to one or more data sources
ViewModel Holds presentation state and logic outside the rendered screen
Emulator Runs a virtualized mobile device configuration for development and testing
Accessibility Practice of making interaction usable by people with diverse abilities
Signing Cryptographic process used to identify and authorize application builds
Synchronization Process that reconciles data between local and remote sources





Drag and Drop

Match the correct terms. Topic
Platform-specific SDK and language Native development
Shared codebase targeting several platforms Cross-platform development
Authoritative owner of application data Single source of truth
Automated check of isolated logic Unit testing
Structured analysis of assets threats and controls Threat modeling




...


Crossword Puzzle

Kotlin Which programming language is commonly used for modern native Android development?
Swift Which programming language is central to modern Apple-platform app development?
Flutter Which cross-platform framework uses Dart and a widget-based UI model?
Emulator What virtual device environment is used to test mobile apps without dedicated hardware?
Repository What architecture component commonly coordinates access to data sources?
Accessibility What discipline aims to make apps usable by people with diverse abilities?





LearningApps


Cloze Text

Complete the text.
A mobile project should begin with a clearly defined

. A native application uses the target platform's own

. Cross-platform development can share substantial

between platforms. Declarative interfaces are commonly rendered from application

. A single authoritative owner of data is called a

. Network code must expect latency and

. Automated tests should be selected according to project

. Sensitive credentials should use platform-protected

. A secure backend must enforce

rather than trusting the client. After release, teams should monitor production behavior and continue

.




Open-Ended Tasks


Easy

  1. User flow sketch: Choose a simple app idea and draw a complete flow from launch to one successful task, including one error state and one permission-denied state.
  2. Interface critique: Select an open-source mobile app and write a one-page critique of navigation, feedback, readability, touch targets, and accessibility.
  3. State inventory: Pick one screen and list its loading, content, empty, offline, and error states; create a small visual storyboard for all five.
  4. Platform comparison: Create a concise comparison chart showing how the same feature could be implemented in native Android, native Apple development, and one cross-platform framework.


Standard

  1. Prototype study: Build a clickable prototype for a three-screen app and conduct short usability sessions with at least three participants; summarize patterns without exposing personal data.
  2. API integration: Implement one read-only remote API feature with loading, success, empty, timeout, and failure handling; document the data flow from network response to UI state.
  3. Accessibility audit: Evaluate a prototype or app with a screen reader and increased text size, record barriers, fix the three most important issues, and present before-and-after evidence.
  4. Automated test suite: Write tests for one business rule, one data-layer interaction, and one critical UI flow; explain what each test can and cannot prove.


Advanced

  1. Offline-first feature: Implement a feature that remains useful without a network connection, then define synchronization, freshness, conflict, and deletion rules in an architecture note.
  2. Mobile threat model: Create a threat model for an app handling personal data, identify assets and trust boundaries, map major risks to security controls, and justify residual risk.
  3. Performance investigation: Measure startup, memory, rendering, or network behavior on at least two device configurations, identify one bottleneck, implement an improvement, and compare the results.
  4. Capstone release: Build and release a small production-style app or internal beta with version control, CI checks, privacy documentation, testing evidence, an architecture decision record, and a retrospective video.



Learning Assessment

  1. Architecture defense: Given a feature-rich app scenario, propose a layered architecture and defend where state, networking, persistence, and business rules belong; evaluate one alternative.
  2. Framework decision: Compare native and cross-platform implementation for a specified product under constraints for performance, team expertise, accessibility, time, and maintenance, then justify a choice.
  3. Failure analysis: Diagnose a scenario in which an app works online but corrupts user expectations offline; redesign the data flow and define tests that would detect the problem.
  4. Security review: Analyze a mobile design that stores tokens in plain text and trusts client-side role checks; identify the risks and propose concrete client and server controls.
  5. Accessibility transfer: Redesign a visually attractive but inaccessible interface so that its information hierarchy and actions remain understandable with screen readers, large text, and reduced motion.
  6. Release strategy: Design a staged deployment plan for a major update, including automated checks, monitoring signals, rollback criteria, and communication responsibilities.




Evidence of Learning

Evidence of learning should show both a working product and the reasoning behind it.

Evidence type What strong evidence demonstrates
Knowledge You can explain mobile platform constraints, application lifecycles, architecture, data flow, accessibility, security, testing, and distribution using accurate technical vocabulary.
Engineering skills You can build and debug a mobile feature, integrate data sources, manage state, handle failures, use version control, and create automated tests.
Design skills You can turn user needs into flows and interfaces that adapt to device size, permissions, error states, and assistive technologies.
Products You can present a runnable app or beta, source repository, architecture diagram, test evidence, accessibility findings, and release documentation.
Reasoning You can justify framework, architecture, storage, security, and testing decisions in relation to explicit requirements and trade-offs.
Transfer You can apply the same principles to a new mobile domain, platform, or framework instead of repeating one tutorial mechanically.




OERs on the Topic

Useful open and authoritative resources for further study include Android software development, Swift, Flutter, React Native, Model–view–viewmodel, Software testing, Web API, and Computer security.

For current platform guidance, consult the official Android Developers architecture documentation, Apple Developer SwiftUI resources, Flutter documentation, and the OWASP Mobile Application Security project. Because mobile platforms and store policies evolve, current primary documentation should take precedence over old tutorials when they conflict.


Linked Learning Areas

The topic connects computer science theory with practical software engineering, interface design, cybersecurity, distributed systems, data management, quality assurance, and product development. At university level, the most important transferable achievement is not memorizing one framework API but learning to make defensible engineering decisions under changing technical constraints.


aiMOOC Projects