7. Chapter 6 - Conclusion and Next Steps
7.1. What Was Built
This document has ported the core functionality and authentication of the [RdvMedecins] application from the original 2014 document to a native Android app:
- a complete [NestJS] server (the same as in the Angular, React, Vue.js, and Flutter versions of the course, installed and tested in Chapter 2 but whose code is not covered here), exposing the same JSON business routes as the original Spring 4 server, all protected by a JWT token;
- an Android client written in [Kotlin] using [Jetpack Compose] (Material 3) offering the same features as the original AngularJS 1.x client—selecting a doctor and a date, viewing the schedule, booking and canceling an appointment—supplemented by a login screen, a persistent session ([SharedPreferences]), an interface tailored to the logged-in user’s role, and the ability to switch the interface between French and English ([TranslationsService], with the dictionaries from the other variants of the course).
This client replicates the Flutter client’s architecture file by file. The most notable differences stem from the platform rather than the language: the recreation of the activity when the screen rotates, which requires [ViewModel] and [rememberSaveable]; the prohibition of network access on the main thread, which requires coroutines; and the manifest settings (permissions [INTERNET] and HTTP in plain text). On the interface side, Compose makes the code shorter than Flutter: functions rather than classes, and automatically observed states rather than [setState(...)] and [notifyListeners()].
7.2. What remains outside the scope or needs to be addressed
7.2.1. French/English internationalization—covered in this document
The original document proposed switching the interface between French and English using the angular-translate library. This port implements this functionality with [TranslationsService] (see Chapter 4) and the dictionaries [fr.json]/[en.json] from the other variants of the course, embedded in the application’s [assets/] folder. Like its predecessors, it switches languages on the fly, without restarting the application.
7.2.2. The client’s “debug” mode—deliberately excluded from the scope
The original document included a technical display mode that provided access to the raw template of the current view. This port does not recreate it: Android Studio now offers, outside the app, much more comprehensive tools—the debugger, the layout inspector ([Layout Inspector], which shows the tree of @Composable functions, their parameters, and the number of recompositions), and the log ([Logcat]).
7.2.3. Artificial network delay—postponed
The original document allowed you to set an artificial delay before each server response to observe the interface’s behavior on a slow network. This feature does not yet have an equivalent in this port. However, the Android emulator allows you to simulate a slow network ([Extended Controls / Cellular / Network type]).
7.3. A note on the methodology used in this document
The client described in this document was compiled and run by Claude himself, in the Android emulator on the reviewer’s computer and with the reviewer’s consent: each feature was tested (logging in with both roles, failed login, selecting a doctor and date, booking, canceling, changing the language, logging out, screen rotation), and the screenshots in Chapter 4 were taken during these tests. These tests revealed two issues, which were corrected and documented in Chapter 5: the address [10.0.2.2] was unreachable on this computer, and a button was cut off on the phone’s narrow screen.
7.4. To take it further right now
- add an appointment details screen to explore screen navigation using the [Navigation Compose] library;
- display a loading indicator ([CircularProgressIndicator]) during server calls by adding an [inProgress] state to [AppViewModel];
- replace [SharedPreferences] with [DataStore], the fully asynchronous API storage method currently recommended (functions [suspend] and [Flow]);
- Write tests: unit tests for [decodeResponse(...)] or [TranslationsService.t(...)], followed by interface tests with the [compose-ui-test] library;
- review the README file in each client folder: each one summarizes the purpose of the files it contains.